309 lines
1.8 MiB
309 lines
1.8 MiB
function W5(r,e){return function(){return r.apply(e,arguments)}}const{toString:FK}=Object.prototype,{getPrototypeOf:LC}=Object,O_=(r=>e=>{const t=FK.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),Pa=r=>(r=r.toLowerCase(),e=>O_(e)===r),N_=r=>e=>typeof e===r,{isArray:Df}=Array,nv=N_("undefined");function UK(r){return r!==null&&!nv(r)&&r.constructor!==null&&!nv(r.constructor)&&_n(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}const q5=Pa("ArrayBuffer");function VK(r){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(r):e=r&&r.buffer&&q5(r.buffer),e}const zK=N_("string"),_n=N_("function"),j5=N_("number"),B_=r=>r!==null&&typeof r=="object",GK=r=>r===!0||r===!1,Sy=r=>{if(O_(r)!=="object")return!1;const e=LC(r);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in r)&&!(Symbol.iterator in r)},HK=Pa("Date"),$K=Pa("File"),WK=Pa("Blob"),qK=Pa("FileList"),jK=r=>B_(r)&&_n(r.pipe),XK=r=>{let e;return r&&(typeof FormData=="function"&&r instanceof FormData||_n(r.append)&&((e=O_(r))==="formdata"||e==="object"&&_n(r.toString)&&r.toString()==="[object FormData]"))},YK=Pa("URLSearchParams"),[KK,ZK,QK,JK]=["ReadableStream","Request","Response","Headers"].map(Pa),eZ=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Jv(r,e,{allOwnKeys:t=!1}={}){if(r===null||typeof r>"u")return;let i,n;if(typeof r!="object"&&(r=[r]),Df(r))for(i=0,n=r.length;i<n;i++)e.call(null,r[i],i,r);else{const a=t?Object.getOwnPropertyNames(r):Object.keys(r),s=a.length;let o;for(i=0;i<s;i++)o=a[i],e.call(null,r[o],o,r)}}function X5(r,e){e=e.toLowerCase();const t=Object.keys(r);let i=t.length,n;for(;i-- >0;)if(n=t[i],e===n.toLowerCase())return n;return null}const _u=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Y5=r=>!nv(r)&&r!==_u;function Ux(){const{caseless:r}=Y5(this)&&this||{},e={},t=(i,n)=>{const a=r&&X5(e,n)||n;Sy(e[a])&&Sy(i)?e[a]=Ux(e[a],i):Sy(i)?e[a]=Ux({},i):Df(i)?e[a]=i.slice():e[a]=i};for(let i=0,n=arguments.length;i<n;i++)arguments[i]&&Jv(arguments[i],t);return e}const tZ=(r,e,t,{allOwnKeys:i}={})=>(Jv(e,(n,a)=>{t&&_n(n)?r[a]=W5(n,t):r[a]=n},{allOwnKeys:i}),r),rZ=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),iZ=(r,e,t,i)=>{r.prototype=Object.create(e.prototype,i),r.prototype.constructor=r,Object.defineProperty(r,"super",{value:e.prototype}),t&&Object.assign(r.prototype,t)},nZ=(r,e,t,i)=>{let n,a,s;const o={};if(e=e||{},r==null)return e;do{for(n=Object.getOwnPropertyNames(r),a=n.length;a-- >0;)s=n[a],(!i||i(s,r,e))&&!o[s]&&(e[s]=r[s],o[s]=!0);r=t!==!1&&LC(r)}while(r&&(!t||t(r,e))&&r!==Object.prototype);return e},aZ=(r,e,t)=>{r=String(r),(t===void 0||t>r.length)&&(t=r.length),t-=e.length;const i=r.indexOf(e,t);return i!==-1&&i===t},sZ=r=>{if(!r)return null;if(Df(r))return r;let e=r.length;if(!j5(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=r[e];return t},oZ=(r=>e=>r&&e instanceof r)(typeof Uint8Array<"u"&&LC(Uint8Array)),lZ=(r,e)=>{const i=(r&&r[Symbol.iterator]).call(r);let n;for(;(n=i.next())&&!n.done;){const a=n.value;e.call(r,a[0],a[1])}},uZ=(r,e)=>{let t;const i=[];for(;(t=r.exec(e))!==null;)i.push(t);return i},cZ=Pa("HTMLFormElement"),hZ=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,i,n){return i.toUpperCase()+n}),yP=(({hasOwnProperty:r})=>(e,t)=>r.call(e,t))(Object.prototype),fZ=Pa("RegExp"),K5=(r,e)=>{const t=Object.getOwnPropertyDescriptors(r),i={};Jv(t,(n,a)=>{let s;(s=e(n,a,r))!==!1&&(i[a]=s||n)}),Object.defineProperties(r,i)},dZ=r=>{K5(r,(e,t)=>{if(_n(r)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const i=r[t];if(_n(i)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},pZ=(r,e)=>{const t={},i=n=>{n.forEach(a=>{t[a]=!0})};return Df(r)?i(r):i(String(r).split(e)),t},vZ=()=>{},gZ=(r,e)=>r!=null&&Number.isFinite(r=+r)?r:e,Cb="abcdefghijklmnopqrstuvwxyz",_P="0123456789",Z5={DIGIT:_P,ALPHA:Cb,ALPHA_DIGIT:Cb+Cb.toUpperCase()+_P},mZ=(r=16,e=Z5.ALPHA_DIGIT)=>{let t="";const{length:i}=e;for(;r--;)t+=e[Math.random()*i|0];return t};function yZ(r){return!!(r&&_n(r.append)&&r[Symbol.toStringTag]==="FormData"&&r[Symbol.iterator])}const _Z=r=>{const e=new Array(10),t=(i,n)=>{if(B_(i)){if(e.indexOf(i)>=0)return;if(!("toJSON"in i)){e[n]=i;const a=Df(i)?[]:{};return Jv(i,(s,o)=>{const l=t(s,n+1);!nv(l)&&(a[o]=l)}),e[n]=void 0,a}}return i};return t(r,0)},bZ=Pa("AsyncFunction"),SZ=r=>r&&(B_(r)||_n(r))&&_n(r.then)&&_n(r.catch),Q5=((r,e)=>r?setImmediate:e?((t,i)=>(_u.addEventListener("message",({source:n,data:a})=>{n===_u&&a===t&&i.length&&i.shift()()},!1),n=>{i.push(n),_u.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",_n(_u.postMessage)),TZ=typeof queueMicrotask<"u"?queueMicrotask.bind(_u):typeof process<"u"&&process.nextTick||Q5,ne={isArray:Df,isArrayBuffer:q5,isBuffer:UK,isFormData:XK,isArrayBufferView:VK,isString:zK,isNumber:j5,isBoolean:GK,isObject:B_,isPlainObject:Sy,isReadableStream:KK,isRequest:ZK,isResponse:QK,isHeaders:JK,isUndefined:nv,isDate:HK,isFile:$K,isBlob:WK,isRegExp:fZ,isFunction:_n,isStream:jK,isURLSearchParams:YK,isTypedArray:oZ,isFileList:qK,forEach:Jv,merge:Ux,extend:tZ,trim:eZ,stripBOM:rZ,inherits:iZ,toFlatObject:nZ,kindOf:O_,kindOfTest:Pa,endsWith:aZ,toArray:sZ,forEachEntry:lZ,matchAll:uZ,isHTMLForm:cZ,hasOwnProperty:yP,hasOwnProp:yP,reduceDescriptors:K5,freezeMethods:dZ,toObjectSet:pZ,toCamelCase:hZ,noop:vZ,toFiniteNumber:gZ,findKey:X5,global:_u,isContextDefined:Y5,ALPHABET:Z5,generateString:mZ,isSpecCompliantForm:yZ,toJSONObject:_Z,isAsyncFn:bZ,isThenable:SZ,setImmediate:Q5,asap:TZ};function ot(r,e,t,i,n){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=r,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),i&&(this.request=i),n&&(this.response=n,this.status=n.status?n.status:null)}ne.inherits(ot,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ne.toJSONObject(this.config),code:this.code,status:this.status}}});const J5=ot.prototype,e4={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(r=>{e4[r]={value:r}});Object.defineProperties(ot,e4);Object.defineProperty(J5,"isAxiosError",{value:!0});ot.from=(r,e,t,i,n,a)=>{const s=Object.create(J5);return ne.toFlatObject(r,s,function(l){return l!==Error.prototype},o=>o!=="isAxiosError"),ot.call(s,r.message,e,t,i,n),s.cause=r,s.name=r.name,a&&Object.assign(s,a),s};const xZ=null;function Vx(r){return ne.isPlainObject(r)||ne.isArray(r)}function t4(r){return ne.endsWith(r,"[]")?r.slice(0,-2):r}function bP(r,e,t){return r?r.concat(e).map(function(n,a){return n=t4(n),!t&&a?"["+n+"]":n}).join(t?".":""):e}function wZ(r){return ne.isArray(r)&&!r.some(Vx)}const CZ=ne.toFlatObject(ne,{},null,function(e){return/^is[A-Z]/.test(e)});function F_(r,e,t){if(!ne.isObject(r))throw new TypeError("target must be an object");e=e||new FormData,t=ne.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,g){return!ne.isUndefined(g[v])});const i=t.metaTokens,n=t.visitor||c,a=t.dots,s=t.indexes,l=(t.Blob||typeof Blob<"u"&&Blob)&&ne.isSpecCompliantForm(e);if(!ne.isFunction(n))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(ne.isDate(p))return p.toISOString();if(!l&&ne.isBlob(p))throw new ot("Blob is not supported. Use a Buffer instead.");return ne.isArrayBuffer(p)||ne.isTypedArray(p)?l&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function c(p,v,g){let m=p;if(p&&!g&&typeof p=="object"){if(ne.endsWith(v,"{}"))v=i?v:v.slice(0,-2),p=JSON.stringify(p);else if(ne.isArray(p)&&wZ(p)||(ne.isFileList(p)||ne.endsWith(v,"[]"))&&(m=ne.toArray(p)))return v=t4(v),m.forEach(function(_,b){!(ne.isUndefined(_)||_===null)&&e.append(s===!0?bP([v],b,a):s===null?v:v+"[]",u(_))}),!1}return Vx(p)?!0:(e.append(bP(g,v,a),u(p)),!1)}const h=[],d=Object.assign(CZ,{defaultVisitor:c,convertValue:u,isVisitable:Vx});function f(p,v){if(!ne.isUndefined(p)){if(h.indexOf(p)!==-1)throw Error("Circular reference detected in "+v.join("."));h.push(p),ne.forEach(p,function(m,y){(!(ne.isUndefined(m)||m===null)&&n.call(e,m,ne.isString(y)?y.trim():y,v,d))===!0&&f(m,v?v.concat(y):[y])}),h.pop()}}if(!ne.isObject(r))throw new TypeError("data must be an object");return f(r),e}function SP(r){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,function(i){return e[i]})}function kC(r,e){this._pairs=[],r&&F_(r,this,e)}const r4=kC.prototype;r4.append=function(e,t){this._pairs.push([e,t])};r4.toString=function(e){const t=e?function(i){return e.call(this,i,SP)}:SP;return this._pairs.map(function(n){return t(n[0])+"="+t(n[1])},"").join("&")};function AZ(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function i4(r,e,t){if(!e)return r;const i=t&&t.encode||AZ,n=t&&t.serialize;let a;if(n?a=n(e,t):a=ne.isURLSearchParams(e)?e.toString():new kC(e,t).toString(i),a){const s=r.indexOf("#");s!==-1&&(r=r.slice(0,s)),r+=(r.indexOf("?")===-1?"?":"&")+a}return r}class TP{constructor(){this.handlers=[]}use(e,t,i){return this.handlers.push({fulfilled:e,rejected:t,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){ne.forEach(this.handlers,function(i){i!==null&&e(i)})}}const n4={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},DZ=typeof URLSearchParams<"u"?URLSearchParams:kC,EZ=typeof FormData<"u"?FormData:null,IZ=typeof Blob<"u"?Blob:null,PZ={isBrowser:!0,classes:{URLSearchParams:DZ,FormData:EZ,Blob:IZ},protocols:["http","https","file","blob","url","data"]},RC=typeof window<"u"&&typeof document<"u",zx=typeof navigator=="object"&&navigator||void 0,MZ=RC&&(!zx||["ReactNative","NativeScript","NS"].indexOf(zx.product)<0),LZ=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",kZ=RC&&window.location.href||"http://localhost",RZ=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:RC,hasStandardBrowserEnv:MZ,hasStandardBrowserWebWorkerEnv:LZ,navigator:zx,origin:kZ},Symbol.toStringTag,{value:"Module"})),qi={...RZ,...PZ};function OZ(r,e){return F_(r,new qi.classes.URLSearchParams,Object.assign({visitor:function(t,i,n,a){return qi.isNode&&ne.isBuffer(t)?(this.append(i,t.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},e))}function NZ(r){return ne.matchAll(/\w+|\[(\w*)]/g,r).map(e=>e[0]==="[]"?"":e[1]||e[0])}function BZ(r){const e={},t=Object.keys(r);let i;const n=t.length;let a;for(i=0;i<n;i++)a=t[i],e[a]=r[a];return e}function a4(r){function e(t,i,n,a){let s=t[a++];if(s==="__proto__")return!0;const o=Number.isFinite(+s),l=a>=t.length;return s=!s&&ne.isArray(n)?n.length:s,l?(ne.hasOwnProp(n,s)?n[s]=[n[s],i]:n[s]=i,!o):((!n[s]||!ne.isObject(n[s]))&&(n[s]=[]),e(t,i,n[s],a)&&ne.isArray(n[s])&&(n[s]=BZ(n[s])),!o)}if(ne.isFormData(r)&&ne.isFunction(r.entries)){const t={};return ne.forEachEntry(r,(i,n)=>{e(NZ(i),n,t,0)}),t}return null}function FZ(r,e,t){if(ne.isString(r))try{return(e||JSON.parse)(r),ne.trim(r)}catch(i){if(i.name!=="SyntaxError")throw i}return(0,JSON.stringify)(r)}const eg={transitional:n4,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const i=t.getContentType()||"",n=i.indexOf("application/json")>-1,a=ne.isObject(e);if(a&&ne.isHTMLForm(e)&&(e=new FormData(e)),ne.isFormData(e))return n?JSON.stringify(a4(e)):e;if(ne.isArrayBuffer(e)||ne.isBuffer(e)||ne.isStream(e)||ne.isFile(e)||ne.isBlob(e)||ne.isReadableStream(e))return e;if(ne.isArrayBufferView(e))return e.buffer;if(ne.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(a){if(i.indexOf("application/x-www-form-urlencoded")>-1)return OZ(e,this.formSerializer).toString();if((o=ne.isFileList(e))||i.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return F_(o?{"files[]":e}:e,l&&new l,this.formSerializer)}}return a||n?(t.setContentType("application/json",!1),FZ(e)):e}],transformResponse:[function(e){const t=this.transitional||eg.transitional,i=t&&t.forcedJSONParsing,n=this.responseType==="json";if(ne.isResponse(e)||ne.isReadableStream(e))return e;if(e&&ne.isString(e)&&(i&&!this.responseType||n)){const s=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(o){if(s)throw o.name==="SyntaxError"?ot.from(o,ot.ERR_BAD_RESPONSE,this,null,this.response):o}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:qi.classes.FormData,Blob:qi.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ne.forEach(["delete","get","head","post","put","patch"],r=>{eg.headers[r]={}});const UZ=ne.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),VZ=r=>{const e={};let t,i,n;return r&&r.split(`
|
||
`).forEach(function(s){n=s.indexOf(":"),t=s.substring(0,n).trim().toLowerCase(),i=s.substring(n+1).trim(),!(!t||e[t]&&UZ[t])&&(t==="set-cookie"?e[t]?e[t].push(i):e[t]=[i]:e[t]=e[t]?e[t]+", "+i:i)}),e},xP=Symbol("internals");function md(r){return r&&String(r).trim().toLowerCase()}function Ty(r){return r===!1||r==null?r:ne.isArray(r)?r.map(Ty):String(r)}function zZ(r){const e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=t.exec(r);)e[i[1]]=i[2];return e}const GZ=r=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());function Ab(r,e,t,i,n){if(ne.isFunction(i))return i.call(this,e,t);if(n&&(e=t),!!ne.isString(e)){if(ne.isString(i))return e.indexOf(i)!==-1;if(ne.isRegExp(i))return i.test(e)}}function HZ(r){return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,i)=>t.toUpperCase()+i)}function $Z(r,e){const t=ne.toCamelCase(" "+e);["get","set","has"].forEach(i=>{Object.defineProperty(r,i+t,{value:function(n,a,s){return this[i].call(this,e,n,a,s)},configurable:!0})})}class ji{constructor(e){e&&this.set(e)}set(e,t,i){const n=this;function a(o,l,u){const c=md(l);if(!c)throw new Error("header name must be a non-empty string");const h=ne.findKey(n,c);(!h||n[h]===void 0||u===!0||u===void 0&&n[h]!==!1)&&(n[h||l]=Ty(o))}const s=(o,l)=>ne.forEach(o,(u,c)=>a(u,c,l));if(ne.isPlainObject(e)||e instanceof this.constructor)s(e,t);else if(ne.isString(e)&&(e=e.trim())&&!GZ(e))s(VZ(e),t);else if(ne.isHeaders(e))for(const[o,l]of e.entries())a(l,o,i);else e!=null&&a(t,e,i);return this}get(e,t){if(e=md(e),e){const i=ne.findKey(this,e);if(i){const n=this[i];if(!t)return n;if(t===!0)return zZ(n);if(ne.isFunction(t))return t.call(this,n,i);if(ne.isRegExp(t))return t.exec(n);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=md(e),e){const i=ne.findKey(this,e);return!!(i&&this[i]!==void 0&&(!t||Ab(this,this[i],i,t)))}return!1}delete(e,t){const i=this;let n=!1;function a(s){if(s=md(s),s){const o=ne.findKey(i,s);o&&(!t||Ab(i,i[o],o,t))&&(delete i[o],n=!0)}}return ne.isArray(e)?e.forEach(a):a(e),n}clear(e){const t=Object.keys(this);let i=t.length,n=!1;for(;i--;){const a=t[i];(!e||Ab(this,this[a],a,e,!0))&&(delete this[a],n=!0)}return n}normalize(e){const t=this,i={};return ne.forEach(this,(n,a)=>{const s=ne.findKey(i,a);if(s){t[s]=Ty(n),delete t[a];return}const o=e?HZ(a):String(a).trim();o!==a&&delete t[a],t[o]=Ty(n),i[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return ne.forEach(this,(i,n)=>{i!=null&&i!==!1&&(t[n]=e&&ne.isArray(i)?i.join(", "):i)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
|
||
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const i=new this(e);return t.forEach(n=>i.set(n)),i}static accessor(e){const i=(this[xP]=this[xP]={accessors:{}}).accessors,n=this.prototype;function a(s){const o=md(s);i[o]||($Z(n,s),i[o]=!0)}return ne.isArray(e)?e.forEach(a):a(e),this}}ji.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ne.reduceDescriptors(ji.prototype,({value:r},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>r,set(i){this[t]=i}}});ne.freezeMethods(ji);function Db(r,e){const t=this||eg,i=e||t,n=ji.from(i.headers);let a=i.data;return ne.forEach(r,function(o){a=o.call(t,a,n.normalize(),e?e.status:void 0)}),n.normalize(),a}function s4(r){return!!(r&&r.__CANCEL__)}function Ef(r,e,t){ot.call(this,r??"canceled",ot.ERR_CANCELED,e,t),this.name="CanceledError"}ne.inherits(Ef,ot,{__CANCEL__:!0});function o4(r,e,t){const i=t.config.validateStatus;!t.status||!i||i(t.status)?r(t):e(new ot("Request failed with status code "+t.status,[ot.ERR_BAD_REQUEST,ot.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function WZ(r){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return e&&e[1]||""}function qZ(r,e){r=r||10;const t=new Array(r),i=new Array(r);let n=0,a=0,s;return e=e!==void 0?e:1e3,function(l){const u=Date.now(),c=i[a];s||(s=u),t[n]=l,i[n]=u;let h=a,d=0;for(;h!==n;)d+=t[h++],h=h%r;if(n=(n+1)%r,n===a&&(a=(a+1)%r),u-s<e)return;const f=c&&u-c;return f?Math.round(d*1e3/f):void 0}}function jZ(r,e){let t=0,i=1e3/e,n,a;const s=(u,c=Date.now())=>{t=c,n=null,a&&(clearTimeout(a),a=null),r.apply(null,u)};return[(...u)=>{const c=Date.now(),h=c-t;h>=i?s(u,c):(n=u,a||(a=setTimeout(()=>{a=null,s(n)},i-h)))},()=>n&&s(n)]}const Zy=(r,e,t=3)=>{let i=0;const n=qZ(50,250);return jZ(a=>{const s=a.loaded,o=a.lengthComputable?a.total:void 0,l=s-i,u=n(l),c=s<=o;i=s;const h={loaded:s,total:o,progress:o?s/o:void 0,bytes:l,rate:u||void 0,estimated:u&&o&&c?(o-s)/u:void 0,event:a,lengthComputable:o!=null,[e?"download":"upload"]:!0};r(h)},t)},wP=(r,e)=>{const t=r!=null;return[i=>e[0]({lengthComputable:t,total:r,loaded:i}),e[1]]},CP=r=>(...e)=>ne.asap(()=>r(...e)),XZ=qi.hasStandardBrowserEnv?function(){const e=qi.navigator&&/(msie|trident)/i.test(qi.navigator.userAgent),t=document.createElement("a");let i;function n(a){let s=a;return e&&(t.setAttribute("href",s),s=t.href),t.setAttribute("href",s),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:t.pathname.charAt(0)==="/"?t.pathname:"/"+t.pathname}}return i=n(window.location.href),function(s){const o=ne.isString(s)?n(s):s;return o.protocol===i.protocol&&o.host===i.host}}():function(){return function(){return!0}}(),YZ=qi.hasStandardBrowserEnv?{write(r,e,t,i,n,a){const s=[r+"="+encodeURIComponent(e)];ne.isNumber(t)&&s.push("expires="+new Date(t).toGMTString()),ne.isString(i)&&s.push("path="+i),ne.isString(n)&&s.push("domain="+n),a===!0&&s.push("secure"),document.cookie=s.join("; ")},read(r){const e=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(r){this.write(r,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function KZ(r){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}function ZZ(r,e){return e?r.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):r}function l4(r,e){return r&&!KZ(e)?ZZ(r,e):e}const AP=r=>r instanceof ji?{...r}:r;function Zu(r,e){e=e||{};const t={};function i(u,c,h){return ne.isPlainObject(u)&&ne.isPlainObject(c)?ne.merge.call({caseless:h},u,c):ne.isPlainObject(c)?ne.merge({},c):ne.isArray(c)?c.slice():c}function n(u,c,h){if(ne.isUndefined(c)){if(!ne.isUndefined(u))return i(void 0,u,h)}else return i(u,c,h)}function a(u,c){if(!ne.isUndefined(c))return i(void 0,c)}function s(u,c){if(ne.isUndefined(c)){if(!ne.isUndefined(u))return i(void 0,u)}else return i(void 0,c)}function o(u,c,h){if(h in e)return i(u,c);if(h in r)return i(void 0,u)}const l={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:o,headers:(u,c)=>n(AP(u),AP(c),!0)};return ne.forEach(Object.keys(Object.assign({},r,e)),function(c){const h=l[c]||n,d=h(r[c],e[c],c);ne.isUndefined(d)&&h!==o||(t[c]=d)}),t}const u4=r=>{const e=Zu({},r);let{data:t,withXSRFToken:i,xsrfHeaderName:n,xsrfCookieName:a,headers:s,auth:o}=e;e.headers=s=ji.from(s),e.url=i4(l4(e.baseURL,e.url),r.params,r.paramsSerializer),o&&s.set("Authorization","Basic "+btoa((o.username||"")+":"+(o.password?unescape(encodeURIComponent(o.password)):"")));let l;if(ne.isFormData(t)){if(qi.hasStandardBrowserEnv||qi.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((l=s.getContentType())!==!1){const[u,...c]=l?l.split(";").map(h=>h.trim()).filter(Boolean):[];s.setContentType([u||"multipart/form-data",...c].join("; "))}}if(qi.hasStandardBrowserEnv&&(i&&ne.isFunction(i)&&(i=i(e)),i||i!==!1&&XZ(e.url))){const u=n&&a&&YZ.read(a);u&&s.set(n,u)}return e},QZ=typeof XMLHttpRequest<"u",JZ=QZ&&function(r){return new Promise(function(t,i){const n=u4(r);let a=n.data;const s=ji.from(n.headers).normalize();let{responseType:o,onUploadProgress:l,onDownloadProgress:u}=n,c,h,d,f,p;function v(){f&&f(),p&&p(),n.cancelToken&&n.cancelToken.unsubscribe(c),n.signal&&n.signal.removeEventListener("abort",c)}let g=new XMLHttpRequest;g.open(n.method.toUpperCase(),n.url,!0),g.timeout=n.timeout;function m(){if(!g)return;const _=ji.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders()),T={data:!o||o==="text"||o==="json"?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:_,config:r,request:g};o4(function(C){t(C),v()},function(C){i(C),v()},T),g=null}"onloadend"in g?g.onloadend=m:g.onreadystatechange=function(){!g||g.readyState!==4||g.status===0&&!(g.responseURL&&g.responseURL.indexOf("file:")===0)||setTimeout(m)},g.onabort=function(){g&&(i(new ot("Request aborted",ot.ECONNABORTED,r,g)),g=null)},g.onerror=function(){i(new ot("Network Error",ot.ERR_NETWORK,r,g)),g=null},g.ontimeout=function(){let b=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const T=n.transitional||n4;n.timeoutErrorMessage&&(b=n.timeoutErrorMessage),i(new ot(b,T.clarifyTimeoutError?ot.ETIMEDOUT:ot.ECONNABORTED,r,g)),g=null},a===void 0&&s.setContentType(null),"setRequestHeader"in g&&ne.forEach(s.toJSON(),function(b,T){g.setRequestHeader(T,b)}),ne.isUndefined(n.withCredentials)||(g.withCredentials=!!n.withCredentials),o&&o!=="json"&&(g.responseType=n.responseType),u&&([d,p]=Zy(u,!0),g.addEventListener("progress",d)),l&&g.upload&&([h,f]=Zy(l),g.upload.addEventListener("progress",h),g.upload.addEventListener("loadend",f)),(n.cancelToken||n.signal)&&(c=_=>{g&&(i(!_||_.type?new Ef(null,r,g):_),g.abort(),g=null)},n.cancelToken&&n.cancelToken.subscribe(c),n.signal&&(n.signal.aborted?c():n.signal.addEventListener("abort",c)));const y=WZ(n.url);if(y&&qi.protocols.indexOf(y)===-1){i(new ot("Unsupported protocol "+y+":",ot.ERR_BAD_REQUEST,r));return}g.send(a||null)})},eQ=(r,e)=>{const{length:t}=r=r?r.filter(Boolean):[];if(e||t){let i=new AbortController,n;const a=function(u){if(!n){n=!0,o();const c=u instanceof Error?u:this.reason;i.abort(c instanceof ot?c:new Ef(c instanceof Error?c.message:c))}};let s=e&&setTimeout(()=>{s=null,a(new ot(`timeout ${e} of ms exceeded`,ot.ETIMEDOUT))},e);const o=()=>{r&&(s&&clearTimeout(s),s=null,r.forEach(u=>{u.unsubscribe?u.unsubscribe(a):u.removeEventListener("abort",a)}),r=null)};r.forEach(u=>u.addEventListener("abort",a));const{signal:l}=i;return l.unsubscribe=()=>ne.asap(o),l}},tQ=function*(r,e){let t=r.byteLength;if(t<e){yield r;return}let i=0,n;for(;i<t;)n=i+e,yield r.slice(i,n),i=n},rQ=async function*(r,e){for await(const t of iQ(r))yield*tQ(t,e)},iQ=async function*(r){if(r[Symbol.asyncIterator]){yield*r;return}const e=r.getReader();try{for(;;){const{done:t,value:i}=await e.read();if(t)break;yield i}}finally{await e.cancel()}},DP=(r,e,t,i)=>{const n=rQ(r,e);let a=0,s,o=l=>{s||(s=!0,i&&i(l))};return new ReadableStream({async pull(l){try{const{done:u,value:c}=await n.next();if(u){o(),l.close();return}let h=c.byteLength;if(t){let d=a+=h;t(d)}l.enqueue(new Uint8Array(c))}catch(u){throw o(u),u}},cancel(l){return o(l),n.return()}},{highWaterMark:2})},U_=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",c4=U_&&typeof ReadableStream=="function",nQ=U_&&(typeof TextEncoder=="function"?(r=>e=>r.encode(e))(new TextEncoder):async r=>new Uint8Array(await new Response(r).arrayBuffer())),h4=(r,...e)=>{try{return!!r(...e)}catch{return!1}},aQ=c4&&h4(()=>{let r=!1;const e=new Request(qi.origin,{body:new ReadableStream,method:"POST",get duplex(){return r=!0,"half"}}).headers.has("Content-Type");return r&&!e}),EP=64*1024,Gx=c4&&h4(()=>ne.isReadableStream(new Response("").body)),Qy={stream:Gx&&(r=>r.body)};U_&&(r=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Qy[e]&&(Qy[e]=ne.isFunction(r[e])?t=>t[e]():(t,i)=>{throw new ot(`Response type '${e}' is not supported`,ot.ERR_NOT_SUPPORT,i)})})})(new Response);const sQ=async r=>{if(r==null)return 0;if(ne.isBlob(r))return r.size;if(ne.isSpecCompliantForm(r))return(await new Request(qi.origin,{method:"POST",body:r}).arrayBuffer()).byteLength;if(ne.isArrayBufferView(r)||ne.isArrayBuffer(r))return r.byteLength;if(ne.isURLSearchParams(r)&&(r=r+""),ne.isString(r))return(await nQ(r)).byteLength},oQ=async(r,e)=>{const t=ne.toFiniteNumber(r.getContentLength());return t??sQ(e)},lQ=U_&&(async r=>{let{url:e,method:t,data:i,signal:n,cancelToken:a,timeout:s,onDownloadProgress:o,onUploadProgress:l,responseType:u,headers:c,withCredentials:h="same-origin",fetchOptions:d}=u4(r);u=u?(u+"").toLowerCase():"text";let f=eQ([n,a&&a.toAbortSignal()],s),p;const v=f&&f.unsubscribe&&(()=>{f.unsubscribe()});let g;try{if(l&&aQ&&t!=="get"&&t!=="head"&&(g=await oQ(c,i))!==0){let T=new Request(e,{method:"POST",body:i,duplex:"half"}),x;if(ne.isFormData(i)&&(x=T.headers.get("content-type"))&&c.setContentType(x),T.body){const[C,D]=wP(g,Zy(CP(l)));i=DP(T.body,EP,C,D)}}ne.isString(h)||(h=h?"include":"omit");const m="credentials"in Request.prototype;p=new Request(e,{...d,signal:f,method:t.toUpperCase(),headers:c.normalize().toJSON(),body:i,duplex:"half",credentials:m?h:void 0});let y=await fetch(p);const _=Gx&&(u==="stream"||u==="response");if(Gx&&(o||_&&v)){const T={};["status","statusText","headers"].forEach(I=>{T[I]=y[I]});const x=ne.toFiniteNumber(y.headers.get("content-length")),[C,D]=o&&wP(x,Zy(CP(o),!0))||[];y=new Response(DP(y.body,EP,C,()=>{D&&D(),v&&v()}),T)}u=u||"text";let b=await Qy[ne.findKey(Qy,u)||"text"](y,r);return!_&&v&&v(),await new Promise((T,x)=>{o4(T,x,{data:b,headers:ji.from(y.headers),status:y.status,statusText:y.statusText,config:r,request:p})})}catch(m){throw v&&v(),m&&m.name==="TypeError"&&/fetch/i.test(m.message)?Object.assign(new ot("Network Error",ot.ERR_NETWORK,r,p),{cause:m.cause||m}):ot.from(m,m&&m.code,r,p)}}),Hx={http:xZ,xhr:JZ,fetch:lQ};ne.forEach(Hx,(r,e)=>{if(r){try{Object.defineProperty(r,"name",{value:e})}catch{}Object.defineProperty(r,"adapterName",{value:e})}});const IP=r=>`- ${r}`,uQ=r=>ne.isFunction(r)||r===null||r===!1,f4={getAdapter:r=>{r=ne.isArray(r)?r:[r];const{length:e}=r;let t,i;const n={};for(let a=0;a<e;a++){t=r[a];let s;if(i=t,!uQ(t)&&(i=Hx[(s=String(t)).toLowerCase()],i===void 0))throw new ot(`Unknown adapter '${s}'`);if(i)break;n[s||"#"+a]=i}if(!i){const a=Object.entries(n).map(([o,l])=>`adapter ${o} `+(l===!1?"is not supported by the environment":"is not available in the build"));let s=e?a.length>1?`since :
|
||
`+a.map(IP).join(`
|
||
`):" "+IP(a[0]):"as no adapter specified";throw new ot("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return i},adapters:Hx};function Eb(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new Ef(null,r)}function PP(r){return Eb(r),r.headers=ji.from(r.headers),r.data=Db.call(r,r.transformRequest),["post","put","patch"].indexOf(r.method)!==-1&&r.headers.setContentType("application/x-www-form-urlencoded",!1),f4.getAdapter(r.adapter||eg.adapter)(r).then(function(i){return Eb(r),i.data=Db.call(r,r.transformResponse,i),i.headers=ji.from(i.headers),i},function(i){return s4(i)||(Eb(r),i&&i.response&&(i.response.data=Db.call(r,r.transformResponse,i.response),i.response.headers=ji.from(i.response.headers))),Promise.reject(i)})}const d4="1.7.7",OC={};["object","boolean","number","function","string","symbol"].forEach((r,e)=>{OC[r]=function(i){return typeof i===r||"a"+(e<1?"n ":" ")+r}});const MP={};OC.transitional=function(e,t,i){function n(a,s){return"[Axios v"+d4+"] Transitional option '"+a+"'"+s+(i?". "+i:"")}return(a,s,o)=>{if(e===!1)throw new ot(n(s," has been removed"+(t?" in "+t:"")),ot.ERR_DEPRECATED);return t&&!MP[s]&&(MP[s]=!0,console.warn(n(s," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(a,s,o):!0}};function cQ(r,e,t){if(typeof r!="object")throw new ot("options must be an object",ot.ERR_BAD_OPTION_VALUE);const i=Object.keys(r);let n=i.length;for(;n-- >0;){const a=i[n],s=e[a];if(s){const o=r[a],l=o===void 0||s(o,a,r);if(l!==!0)throw new ot("option "+a+" must be "+l,ot.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new ot("Unknown option "+a,ot.ERR_BAD_OPTION)}}const $x={assertOptions:cQ,validators:OC},fo=$x.validators;class Mu{constructor(e){this.defaults=e,this.interceptors={request:new TP,response:new TP}}async request(e,t){try{return await this._request(e,t)}catch(i){if(i instanceof Error){let n;Error.captureStackTrace?Error.captureStackTrace(n={}):n=new Error;const a=n.stack?n.stack.replace(/^.+\n/,""):"";try{i.stack?a&&!String(i.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(i.stack+=`
|
||
`+a):i.stack=a}catch{}}throw i}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=Zu(this.defaults,t);const{transitional:i,paramsSerializer:n,headers:a}=t;i!==void 0&&$x.assertOptions(i,{silentJSONParsing:fo.transitional(fo.boolean),forcedJSONParsing:fo.transitional(fo.boolean),clarifyTimeoutError:fo.transitional(fo.boolean)},!1),n!=null&&(ne.isFunction(n)?t.paramsSerializer={serialize:n}:$x.assertOptions(n,{encode:fo.function,serialize:fo.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=a&&ne.merge(a.common,a[t.method]);a&&ne.forEach(["delete","get","head","post","put","patch","common"],p=>{delete a[p]}),t.headers=ji.concat(s,a);const o=[];let l=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(t)===!1||(l=l&&v.synchronous,o.unshift(v.fulfilled,v.rejected))});const u=[];this.interceptors.response.forEach(function(v){u.push(v.fulfilled,v.rejected)});let c,h=0,d;if(!l){const p=[PP.bind(this),void 0];for(p.unshift.apply(p,o),p.push.apply(p,u),d=p.length,c=Promise.resolve(t);h<d;)c=c.then(p[h++],p[h++]);return c}d=o.length;let f=t;for(h=0;h<d;){const p=o[h++],v=o[h++];try{f=p(f)}catch(g){v.call(this,g);break}}try{c=PP.call(this,f)}catch(p){return Promise.reject(p)}for(h=0,d=u.length;h<d;)c=c.then(u[h++],u[h++]);return c}getUri(e){e=Zu(this.defaults,e);const t=l4(e.baseURL,e.url);return i4(t,e.params,e.paramsSerializer)}}ne.forEach(["delete","get","head","options"],function(e){Mu.prototype[e]=function(t,i){return this.request(Zu(i||{},{method:e,url:t,data:(i||{}).data}))}});ne.forEach(["post","put","patch"],function(e){function t(i){return function(a,s,o){return this.request(Zu(o||{},{method:e,headers:i?{"Content-Type":"multipart/form-data"}:{},url:a,data:s}))}}Mu.prototype[e]=t(),Mu.prototype[e+"Form"]=t(!0)});class NC{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(a){t=a});const i=this;this.promise.then(n=>{if(!i._listeners)return;let a=i._listeners.length;for(;a-- >0;)i._listeners[a](n);i._listeners=null}),this.promise.then=n=>{let a;const s=new Promise(o=>{i.subscribe(o),a=o}).then(n);return s.cancel=function(){i.unsubscribe(a)},s},e(function(a,s,o){i.reason||(i.reason=new Ef(a,s,o),t(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=i=>{e.abort(i)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new NC(function(n){e=n}),cancel:e}}}function hQ(r){return function(t){return r.apply(null,t)}}function fQ(r){return ne.isObject(r)&&r.isAxiosError===!0}const Wx={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Wx).forEach(([r,e])=>{Wx[e]=r});function p4(r){const e=new Mu(r),t=W5(Mu.prototype.request,e);return ne.extend(t,Mu.prototype,e,{allOwnKeys:!0}),ne.extend(t,e,null,{allOwnKeys:!0}),t.create=function(n){return p4(Zu(r,n))},t}const Dr=p4(eg);Dr.Axios=Mu;Dr.CanceledError=Ef;Dr.CancelToken=NC;Dr.isCancel=s4;Dr.VERSION=d4;Dr.toFormData=F_;Dr.AxiosError=ot;Dr.Cancel=Dr.CanceledError;Dr.all=function(e){return Promise.all(e)};Dr.spread=hQ;Dr.isAxiosError=fQ;Dr.mergeConfig=Zu;Dr.AxiosHeaders=ji;Dr.formToJSON=r=>a4(ne.isHTMLForm(r)?new FormData(r):r);Dr.getAdapter=f4.getAdapter;Dr.HttpStatusCode=Wx;Dr.default=Dr;window.axios=Dr;window.axios.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";var Jy=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function tg(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function v4(r){if(r.__esModule)return r;var e=r.default;if(typeof e=="function"){var t=function i(){return this instanceof i?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(i){var n=Object.getOwnPropertyDescriptor(r,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return r[i]}})}),t}var rp;typeof window<"u"?rp=window:typeof Jy<"u"?rp=Jy:typeof self<"u"?rp=self:rp={};var V_=rp;const H=tg(V_),dQ={},pQ=Object.freeze(Object.defineProperty({__proto__:null,default:dQ},Symbol.toStringTag,{value:"Module"})),vQ=v4(pQ);var LP=typeof Jy<"u"?Jy:typeof window<"u"?window:{},gQ=vQ,ip;typeof document<"u"?ip=document:(ip=LP["__GLOBAL_DOCUMENT_CACHE@4"],ip||(ip=LP["__GLOBAL_DOCUMENT_CACHE@4"]=gQ));var g4=ip;const pe=tg(g4);var BC={exports:{}};function or(){return or=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)({}).hasOwnProperty.call(t,i)&&(r[i]=t[i])}return r},or.apply(null,arguments)}const mQ=Object.freeze(Object.defineProperty({__proto__:null,get default(){return or}},Symbol.toStringTag,{value:"Module"})),yQ=v4(mQ);var _Q=SQ,bQ=Object.prototype.toString;function SQ(r){if(!r)return!1;var e=bQ.call(r);return e==="[object Function]"||typeof r=="function"&&e!=="[object RegExp]"||typeof window<"u"&&(r===window.setTimeout||r===window.alert||r===window.confirm||r===window.prompt)}function TQ(r,e){var t=typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(t)return(t=t.call(r)).next.bind(t);if(Array.isArray(r)||(t=xQ(r))||e){t&&(r=t);var i=0;return function(){return i>=r.length?{done:!0}:{done:!1,value:r[i++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xQ(r,e){if(r){if(typeof r=="string")return kP(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Array.from(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return kP(r,e)}}function kP(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,i=new Array(e);t<e;t++)i[t]=r[t];return i}var wQ=function(){function r(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1}var e=r.prototype;return e.getIsEnabled=function(){return this.enabled_},e.enable=function(){this.enabled_=!0},e.disable=function(){this.enabled_=!1},e.reset=function(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1},e.addInterceptor=function(i,n){this.typeToInterceptorsMap_.has(i)||this.typeToInterceptorsMap_.set(i,new Set);var a=this.typeToInterceptorsMap_.get(i);return a.has(n)?!1:(a.add(n),!0)},e.removeInterceptor=function(i,n){var a=this.typeToInterceptorsMap_.get(i);return a&&a.has(n)?(a.delete(n),!0):!1},e.clearInterceptorsByType=function(i){var n=this.typeToInterceptorsMap_.get(i);return n?(this.typeToInterceptorsMap_.delete(i),this.typeToInterceptorsMap_.set(i,new Set),!0):!1},e.clear=function(){return this.typeToInterceptorsMap_.size?(this.typeToInterceptorsMap_=new Map,!0):!1},e.getForType=function(i){return this.typeToInterceptorsMap_.get(i)||new Set},e.execute=function(i,n){for(var a=this.getForType(i),s=TQ(a),o;!(o=s()).done;){var l=o.value;try{n=l(n)}catch{}}return n},r}(),CQ=wQ,AQ=function(){function r(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1}var e=r.prototype;return e.getIsEnabled=function(){return this.enabled_},e.enable=function(){this.enabled_=!0},e.disable=function(){this.enabled_=!1},e.reset=function(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1},e.getMaxAttempts=function(){return this.maxAttempts_},e.setMaxAttempts=function(i){this.maxAttempts_=i},e.getDelayFactor=function(){return this.delayFactor_},e.setDelayFactor=function(i){this.delayFactor_=i},e.getFuzzFactor=function(){return this.fuzzFactor_},e.setFuzzFactor=function(i){this.fuzzFactor_=i},e.getInitialDelay=function(){return this.initialDelay_},e.setInitialDelay=function(i){this.initialDelay_=i},e.createRetry=function(i){var n=i===void 0?{}:i,a=n.maxAttempts,s=n.delayFactor,o=n.fuzzFactor,l=n.initialDelay;return new DQ({maxAttempts:a||this.maxAttempts_,delayFactor:s||this.delayFactor_,fuzzFactor:o||this.fuzzFactor_,initialDelay:l||this.initialDelay_})},r}(),DQ=function(){function r(t){this.maxAttempts_=t.maxAttempts,this.delayFactor_=t.delayFactor,this.fuzzFactor_=t.fuzzFactor,this.currentDelay_=t.initialDelay,this.currentAttempt_=1}var e=r.prototype;return e.moveToNextAttempt=function(){this.currentAttempt_++;var i=this.currentDelay_*this.delayFactor_;this.currentDelay_=this.currentDelay_+i},e.shouldRetry=function(){return this.currentAttempt_<this.maxAttempts_},e.getCurrentDelay=function(){return this.currentDelay_},e.getCurrentMinPossibleDelay=function(){return(1-this.fuzzFactor_)*this.currentDelay_},e.getCurrentMaxPossibleDelay=function(){return(1+this.fuzzFactor_)*this.currentDelay_},e.getCurrentFuzzedDelay=function(){var i=this.getCurrentMinPossibleDelay(),n=this.getCurrentMaxPossibleDelay();return i+Math.random()*(n-i)},r}(),EQ=AQ,IQ=V_,PQ=function(e,t){return t===void 0&&(t=!1),function(i,n,a){if(i){e(i);return}if(n.statusCode>=400&&n.statusCode<=599){var s=a;if(t)if(IQ.TextDecoder){var o=MQ(n.headers&&n.headers["content-type"]);try{s=new TextDecoder(o).decode(a)}catch{}}else s=String.fromCharCode.apply(null,new Uint8Array(a));e({cause:s});return}e(null,a)}};function MQ(r){return r===void 0&&(r=""),r.toLowerCase().split(";").reduce(function(e,t){var i=t.split("="),n=i[0],a=i[1];return n.trim()==="charset"?a.trim():e},"utf-8")}var LQ=PQ,m4=V_,kQ=yQ,RQ=_Q,y4=CQ,OQ=EQ;vr.httpHandler=LQ;vr.requestInterceptorsStorage=new y4;vr.responseInterceptorsStorage=new y4;vr.retryManager=new OQ;/**
|
||
* @license
|
||
* slighly modified parse-headers 2.0.2 <https://github.com/kesla/parse-headers/>
|
||
* Copyright (c) 2014 David Björklund
|
||
* Available under the MIT license
|
||
* <https://github.com/kesla/parse-headers/blob/master/LICENCE>
|
||
*/var NQ=function(e){var t={};return e&&e.trim().split(`
|
||
`).forEach(function(i){var n=i.indexOf(":"),a=i.slice(0,n).trim().toLowerCase(),s=i.slice(n+1).trim();typeof t[a]>"u"?t[a]=s:Array.isArray(t[a])?t[a].push(s):t[a]=[t[a],s]}),t};BC.exports=vr;BC.exports.default=vr;vr.XMLHttpRequest=m4.XMLHttpRequest||VQ;vr.XDomainRequest="withCredentials"in new vr.XMLHttpRequest?vr.XMLHttpRequest:m4.XDomainRequest;BQ(["get","put","post","patch","head","delete"],function(r){vr[r==="delete"?"del":r]=function(e,t,i){return t=_4(e,t,i),t.method=r.toUpperCase(),FC(t)}});function BQ(r,e){for(var t=0;t<r.length;t++)e(r[t])}function FQ(r){for(var e in r)if(r.hasOwnProperty(e))return!1;return!0}function _4(r,e,t){var i=r;return RQ(e)?(t=e,typeof r=="string"&&(i={uri:r})):i=kQ({},e,{uri:r}),i.callback=t,i}function vr(r,e,t){return e=_4(r,e,t),FC(e)}function FC(r){if(typeof r.callback>"u")throw new Error("callback argument missing");if(r.requestType&&vr.requestInterceptorsStorage.getIsEnabled()){var e={uri:r.uri||r.url,headers:r.headers||{},body:r.body,metadata:r.metadata||{},retry:r.retry,timeout:r.timeout},t=vr.requestInterceptorsStorage.execute(r.requestType,e);r.uri=t.uri,r.headers=t.headers,r.body=t.body,r.metadata=t.metadata,r.retry=t.retry,r.timeout=t.timeout}var i=!1,n=function(T,x,C){i||(i=!0,r.callback(T,x,C))};function a(){u.readyState===4&&!vr.responseInterceptorsStorage.getIsEnabled()&&setTimeout(l,0)}function s(){var b=void 0;if(u.response?b=u.response:b=u.responseText||UQ(u),m)try{b=JSON.parse(b)}catch{}return b}function o(b){if(clearTimeout(y),clearTimeout(r.retryTimeout),b instanceof Error||(b=new Error(""+(b||"Unknown XMLHttpRequest Error"))),b.statusCode=0,!h&&vr.retryManager.getIsEnabled()&&r.retry&&r.retry.shouldRetry()){r.retryTimeout=setTimeout(function(){r.retry.moveToNextAttempt(),r.xhr=u,FC(r)},r.retry.getCurrentFuzzedDelay());return}if(r.requestType&&vr.responseInterceptorsStorage.getIsEnabled()){var T={headers:_.headers||{},body:_.body,responseUrl:u.responseURL,responseType:u.responseType},x=vr.responseInterceptorsStorage.execute(r.requestType,T);_.body=x.body,_.headers=x.headers}return n(b,_)}function l(){if(!h){var b;clearTimeout(y),clearTimeout(r.retryTimeout),r.useXDR&&u.status===void 0?b=200:b=u.status===1223?204:u.status;var T=_,x=null;if(b!==0?(T={body:s(),statusCode:b,method:f,headers:{},url:d,rawRequest:u},u.getAllResponseHeaders&&(T.headers=NQ(u.getAllResponseHeaders()))):x=new Error("Internal XMLHttpRequest Error"),r.requestType&&vr.responseInterceptorsStorage.getIsEnabled()){var C={headers:T.headers||{},body:T.body,responseUrl:u.responseURL,responseType:u.responseType},D=vr.responseInterceptorsStorage.execute(r.requestType,C);T.body=D.body,T.headers=D.headers}return n(x,T,T.body)}}var u=r.xhr||null;u||(r.cors||r.useXDR?u=new vr.XDomainRequest:u=new vr.XMLHttpRequest);var c,h,d=u.url=r.uri||r.url,f=u.method=r.method||"GET",p=r.body||r.data,v=u.headers=r.headers||{},g=!!r.sync,m=!1,y,_={body:void 0,headers:{},statusCode:0,method:f,url:d,rawRequest:u};if("json"in r&&r.json!==!1&&(m=!0,v.accept||v.Accept||(v.Accept="application/json"),f!=="GET"&&f!=="HEAD"&&(v["content-type"]||v["Content-Type"]||(v["Content-Type"]="application/json"),p=JSON.stringify(r.json===!0?p:r.json))),u.onreadystatechange=a,u.onload=l,u.onerror=o,u.onprogress=function(){},u.onabort=function(){h=!0,clearTimeout(r.retryTimeout)},u.ontimeout=o,u.open(f,d,!g,r.username,r.password),g||(u.withCredentials=!!r.withCredentials),!g&&r.timeout>0&&(y=setTimeout(function(){if(!h){h=!0,u.abort("timeout");var b=new Error("XMLHttpRequest timeout");b.code="ETIMEDOUT",o(b)}},r.timeout)),u.setRequestHeader)for(c in v)v.hasOwnProperty(c)&&u.setRequestHeader(c,v[c]);else if(r.headers&&!FQ(r.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in r&&(u.responseType=r.responseType),"beforeSend"in r&&typeof r.beforeSend=="function"&&r.beforeSend(u),u.send(p||null),u}function UQ(r){try{if(r.responseType==="document")return r.responseXML;var e=r.responseXML&&r.responseXML.documentElement.nodeName==="parsererror";if(r.responseType===""&&!e)return r.responseXML}catch{}return null}function VQ(){}var zQ=BC.exports;const b4=tg(zQ);var S4={exports:{}},RP=g4,UC=Object.create||function(){function r(){}return function(e){if(arguments.length!==1)throw new Error("Object.create shim only accepts one parameter.");return r.prototype=e,new r}}();function hn(r,e){this.name="ParsingError",this.code=r.code,this.message=e||r.message}hn.prototype=UC(Error.prototype);hn.prototype.constructor=hn;hn.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}};function VC(r){function e(i,n,a,s){return(i|0)*3600+(n|0)*60+(a|0)+(s|0)/1e3}var t=r.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return t?t[3]?e(t[1],t[2],t[3].replace(":",""),t[4]):t[1]>59?e(t[1],t[2],0,t[4]):e(0,t[1],t[2],t[4]):null}function Dp(){this.values=UC(null)}Dp.prototype={set:function(r,e){!this.get(r)&&e!==""&&(this.values[r]=e)},get:function(r,e,t){return t?this.has(r)?this.values[r]:e[t]:this.has(r)?this.values[r]:e},has:function(r){return r in this.values},alt:function(r,e,t){for(var i=0;i<t.length;++i)if(e===t[i]){this.set(r,e);break}},integer:function(r,e){/^-?\d+$/.test(e)&&this.set(r,parseInt(e,10))},percent:function(r,e){return e.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(e=parseFloat(e),e>=0&&e<=100)?(this.set(r,e),!0):!1}};function np(r,e,t,i){var n=i?r.split(i):[r];for(var a in n)if(typeof n[a]=="string"){var s=n[a].split(t);if(s.length===2){var o=s[0].trim(),l=s[1].trim();e(o,l)}}}function GQ(r,e,t){var i=r;function n(){var o=VC(r);if(o===null)throw new hn(hn.Errors.BadTimeStamp,"Malformed timestamp: "+i);return r=r.replace(/^[^\sa-zA-Z-]+/,""),o}function a(o,l){var u=new Dp;np(o,function(c,h){switch(c){case"region":for(var d=t.length-1;d>=0;d--)if(t[d].id===h){u.set(c,t[d].region);break}break;case"vertical":u.alt(c,h,["rl","lr"]);break;case"line":var f=h.split(","),p=f[0];u.integer(c,p),u.percent(c,p)&&u.set("snapToLines",!1),u.alt(c,p,["auto"]),f.length===2&&u.alt("lineAlign",f[1],["start","center","end"]);break;case"position":f=h.split(","),u.percent(c,f[0]),f.length===2&&u.alt("positionAlign",f[1],["start","center","end"]);break;case"size":u.percent(c,h);break;case"align":u.alt(c,h,["start","center","end","left","right"]);break}},/:/,/\s/),l.region=u.get("region",null),l.vertical=u.get("vertical","");try{l.line=u.get("line","auto")}catch{}l.lineAlign=u.get("lineAlign","start"),l.snapToLines=u.get("snapToLines",!0),l.size=u.get("size",100);try{l.align=u.get("align","center")}catch{l.align=u.get("align","middle")}try{l.position=u.get("position","auto")}catch{l.position=u.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},l.align)}l.positionAlign=u.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},l.align)}function s(){r=r.replace(/^\s+/,"")}if(s(),e.startTime=n(),s(),r.substr(0,3)!=="-->")throw new hn(hn.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '-->'): "+i);r=r.substr(3),s(),e.endTime=n(),s(),a(r,e)}var Ib=RP.createElement&&RP.createElement("textarea"),HQ={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},OP={white:"rgba(255,255,255,1)",lime:"rgba(0,255,0,1)",cyan:"rgba(0,255,255,1)",red:"rgba(255,0,0,1)",yellow:"rgba(255,255,0,1)",magenta:"rgba(255,0,255,1)",blue:"rgba(0,0,255,1)",black:"rgba(0,0,0,1)"},$Q={v:"title",lang:"lang"},NP={rt:"ruby"};function T4(r,e){function t(){if(!e)return null;function p(g){return e=e.substr(g.length),g}var v=e.match(/^([^<]*)(<[^>]*>?)?/);return p(v[1]?v[1]:v[2])}function i(p){return Ib.innerHTML=p,p=Ib.textContent,Ib.textContent="",p}function n(p,v){return!NP[v.localName]||NP[v.localName]===p.localName}function a(p,v){var g=HQ[p];if(!g)return null;var m=r.document.createElement(g),y=$Q[p];return y&&v&&(m[y]=v.trim()),m}for(var s=r.document.createElement("div"),o=s,l,u=[];(l=t())!==null;){if(l[0]==="<"){if(l[1]==="/"){u.length&&u[u.length-1]===l.substr(2).replace(">","")&&(u.pop(),o=o.parentNode);continue}var c=VC(l.substr(1,l.length-2)),h;if(c){h=r.document.createProcessingInstruction("timestamp",c),o.appendChild(h);continue}var d=l.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!d||(h=a(d[1],d[3]),!h)||!n(o,h))continue;if(d[2]){var f=d[2].split(".");f.forEach(function(p){var v=/^bg_/.test(p),g=v?p.slice(3):p;if(OP.hasOwnProperty(g)){var m=v?"background-color":"color",y=OP[g];h.style[m]=y}}),h.className=f.join(" ")}u.push(d[1]),o.appendChild(h),o=h;continue}o.appendChild(r.document.createTextNode(i(l)))}return s}var BP=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function WQ(r){for(var e=0;e<BP.length;e++){var t=BP[e];if(r>=t[0]&&r<=t[1])return!0}return!1}function qQ(r){var e=[],t="",i;if(!r||!r.childNodes)return"ltr";function n(o,l){for(var u=l.childNodes.length-1;u>=0;u--)o.push(l.childNodes[u])}function a(o){if(!o||!o.length)return null;var l=o.pop(),u=l.textContent||l.innerText;if(u){var c=u.match(/^.*(\n|\r)/);return c?(o.length=0,c[0]):u}if(l.tagName==="ruby")return a(o);if(l.childNodes)return n(o,l),a(o)}for(n(e,r);t=a(e);)for(var s=0;s<t.length;s++)if(i=t.charCodeAt(s),WQ(i))return"rtl";return"ltr"}function jQ(r){if(typeof r.line=="number"&&(r.snapToLines||r.line>=0&&r.line<=100))return r.line;if(!r.track||!r.track.textTrackList||!r.track.textTrackList.mediaElement)return-1;for(var e=r.track,t=e.textTrackList,i=0,n=0;n<t.length&&t[n]!==e;n++)t[n].mode==="showing"&&i++;return++i*-1}function z_(){}z_.prototype.applyStyles=function(r,e){e=e||this.div;for(var t in r)r.hasOwnProperty(t)&&(e.style[t]=r[t])};z_.prototype.formatStyle=function(r,e){return r===0?0:r+e};function e0(r,e,t){z_.call(this),this.cue=e,this.cueDiv=T4(r,e.text);var i={color:"rgba(255, 255, 255, 1)",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingMode:e.vertical===""?"horizontal-tb":e.vertical==="lr"?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(i,this.cueDiv),this.div=r.document.createElement("div"),i={direction:qQ(this.cueDiv),writingMode:e.vertical===""?"horizontal-tb":e.vertical==="lr"?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:e.align==="middle"?"center":e.align,font:t.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(i),this.div.appendChild(this.cueDiv);var n=0;switch(e.positionAlign){case"start":case"line-left":n=e.position;break;case"center":n=e.position-e.size/2;break;case"end":case"line-right":n=e.position-e.size;break}e.vertical===""?this.applyStyles({left:this.formatStyle(n,"%"),width:this.formatStyle(e.size,"%")}):this.applyStyles({top:this.formatStyle(n,"%"),height:this.formatStyle(e.size,"%")}),this.move=function(a){this.applyStyles({top:this.formatStyle(a.top,"px"),bottom:this.formatStyle(a.bottom,"px"),left:this.formatStyle(a.left,"px"),right:this.formatStyle(a.right,"px"),height:this.formatStyle(a.height,"px"),width:this.formatStyle(a.width,"px")})}}e0.prototype=UC(z_.prototype);e0.prototype.constructor=e0;function Ei(r){var e,t,i,n;if(r.div){t=r.div.offsetHeight,i=r.div.offsetWidth,n=r.div.offsetTop;var a=(a=r.div.childNodes)&&(a=a[0])&&a.getClientRects&&a.getClientRects();r=r.div.getBoundingClientRect(),e=a?Math.max(a[0]&&a[0].height||0,r.height/a.length):0}this.left=r.left,this.right=r.right,this.top=r.top||n,this.height=r.height||t,this.bottom=r.bottom||n+(r.height||t),this.width=r.width||i,this.lineHeight=e!==void 0?e:r.lineHeight}Ei.prototype.move=function(r,e){switch(e=e!==void 0?e:this.lineHeight,r){case"+x":this.left+=e,this.right+=e;break;case"-x":this.left-=e,this.right-=e;break;case"+y":this.top+=e,this.bottom+=e;break;case"-y":this.top-=e,this.bottom-=e;break}};Ei.prototype.overlaps=function(r){return this.left<r.right&&this.right>r.left&&this.top<r.bottom&&this.bottom>r.top};Ei.prototype.overlapsAny=function(r){for(var e=0;e<r.length;e++)if(this.overlaps(r[e]))return!0;return!1};Ei.prototype.within=function(r){return this.top>=r.top&&this.bottom<=r.bottom&&this.left>=r.left&&this.right<=r.right};Ei.prototype.overlapsOppositeAxis=function(r,e){switch(e){case"+x":return this.left<r.left;case"-x":return this.right>r.right;case"+y":return this.top<r.top;case"-y":return this.bottom>r.bottom}};Ei.prototype.intersectPercentage=function(r){var e=Math.max(0,Math.min(this.right,r.right)-Math.max(this.left,r.left)),t=Math.max(0,Math.min(this.bottom,r.bottom)-Math.max(this.top,r.top)),i=e*t;return i/(this.height*this.width)};Ei.prototype.toCSSCompatValues=function(r){return{top:this.top-r.top,bottom:r.bottom-this.bottom,left:this.left-r.left,right:r.right-this.right,height:this.height,width:this.width}};Ei.getSimpleBoxPosition=function(r){var e=r.div?r.div.offsetHeight:r.tagName?r.offsetHeight:0,t=r.div?r.div.offsetWidth:r.tagName?r.offsetWidth:0,i=r.div?r.div.offsetTop:r.tagName?r.offsetTop:0;r=r.div?r.div.getBoundingClientRect():r.tagName?r.getBoundingClientRect():r;var n={left:r.left,right:r.right,top:r.top||i,height:r.height||e,bottom:r.bottom||i+(r.height||e),width:r.width||t};return n};function XQ(r,e,t,i){function n(g,m){for(var y,_=new Ei(g),b=1,T=0;T<m.length;T++){for(;g.overlapsOppositeAxis(t,m[T])||g.within(t)&&g.overlapsAny(i);)g.move(m[T]);if(g.within(t))return g;var x=g.intersectPercentage(t);b>x&&(y=new Ei(g),b=x),g=new Ei(_)}return y||_}var a=new Ei(e),s=e.cue,o=jQ(s),l=[];if(s.snapToLines){var u;switch(s.vertical){case"":l=["+y","-y"],u="height";break;case"rl":l=["+x","-x"],u="width";break;case"lr":l=["-x","+x"],u="width";break}var c=a.lineHeight,h=c*Math.round(o),d=t[u]+c,f=l[0];Math.abs(h)>d&&(h=h<0?-1:1,h*=Math.ceil(d/c)*c),o<0&&(h+=s.vertical===""?t.height:t.width,l=l.reverse()),a.move(f,h)}else{var p=a.lineHeight/t.height*100;switch(s.lineAlign){case"center":o-=p/2;break;case"end":o-=p;break}switch(s.vertical){case"":e.applyStyles({top:e.formatStyle(o,"%")});break;case"rl":e.applyStyles({left:e.formatStyle(o,"%")});break;case"lr":e.applyStyles({right:e.formatStyle(o,"%")});break}l=["+y","-x","+x","-y"],a=new Ei(e)}var v=n(a,l);e.move(v.toCSSCompatValues(t))}function If(){}If.StringDecoder=function(){return{decode:function(r){if(!r)return"";if(typeof r!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(r))}}};If.convertCueToDOMTree=function(r,e){return!r||!e?null:T4(r,e)};var YQ=.05,KQ="sans-serif",ZQ="1.5%";If.processCues=function(r,e,t){if(!r||!e||!t)return null;for(;t.firstChild;)t.removeChild(t.firstChild);var i=r.document.createElement("div");i.style.position="absolute",i.style.left="0",i.style.right="0",i.style.top="0",i.style.bottom="0",i.style.margin=ZQ,t.appendChild(i);function n(c){for(var h=0;h<c.length;h++)if(c[h].hasBeenReset||!c[h].displayState)return!0;return!1}if(!n(e)){for(var a=0;a<e.length;a++)i.appendChild(e[a].displayState);return}var s=[],o=Ei.getSimpleBoxPosition(i),l=Math.round(o.height*YQ*100)/100,u={font:l+"px "+KQ};(function(){for(var c,h,d=0;d<e.length;d++)h=e[d],c=new e0(r,h,u),i.appendChild(c.div),XQ(r,c,o,s),h.displayState=c.div,s.push(Ei.getSimpleBoxPosition(c))})()};If.Parser=function(r,e,t){t||(t=e,e={}),e||(e={}),this.window=r,this.vttjs=e,this.state="INITIAL",this.buffer="",this.decoder=t||new TextDecoder("utf8"),this.regionList=[]};If.Parser.prototype={reportOrThrowError:function(r){if(r instanceof hn)this.onparsingerror&&this.onparsingerror(r);else throw r},parse:function(r){var e=this;r&&(e.buffer+=e.decoder.decode(r,{stream:!0}));function t(){for(var c=e.buffer,h=0;h<c.length&&c[h]!=="\r"&&c[h]!==`
|
||
`;)++h;var d=c.substr(0,h);return c[h]==="\r"&&++h,c[h]===`
|
||
`&&++h,e.buffer=c.substr(h),d}function i(c){var h=new Dp;if(np(c,function(f,p){switch(f){case"id":h.set(f,p);break;case"width":h.percent(f,p);break;case"lines":h.integer(f,p);break;case"regionanchor":case"viewportanchor":var v=p.split(",");if(v.length!==2)break;var g=new Dp;if(g.percent("x",v[0]),g.percent("y",v[1]),!g.has("x")||!g.has("y"))break;h.set(f+"X",g.get("x")),h.set(f+"Y",g.get("y"));break;case"scroll":h.alt(f,p,["up"]);break}},/=/,/\s/),h.has("id")){var d=new(e.vttjs.VTTRegion||e.window.VTTRegion);d.width=h.get("width",100),d.lines=h.get("lines",3),d.regionAnchorX=h.get("regionanchorX",0),d.regionAnchorY=h.get("regionanchorY",100),d.viewportAnchorX=h.get("viewportanchorX",0),d.viewportAnchorY=h.get("viewportanchorY",100),d.scroll=h.get("scroll",""),e.onregion&&e.onregion(d),e.regionList.push({id:h.get("id"),region:d})}}function n(c){var h=new Dp;np(c,function(d,f){switch(d){case"MPEGT":h.integer(d+"S",f);break;case"LOCA":h.set(d+"L",VC(f));break}},/[^\d]:/,/,/),e.ontimestampmap&&e.ontimestampmap({MPEGTS:h.get("MPEGTS"),LOCAL:h.get("LOCAL")})}function a(c){c.match(/X-TIMESTAMP-MAP/)?np(c,function(h,d){switch(h){case"X-TIMESTAMP-MAP":n(d);break}},/=/):np(c,function(h,d){switch(h){case"Region":i(d);break}},/:/)}try{var s;if(e.state==="INITIAL"){if(!/\r\n|\n/.test(e.buffer))return this;s=t();var o=s.match(/^WEBVTT([ \t].*)?$/);if(!o||!o[0])throw new hn(hn.Errors.BadSignature);e.state="HEADER"}for(var l=!1;e.buffer;){if(!/\r\n|\n/.test(e.buffer))return this;switch(l?l=!1:s=t(),e.state){case"HEADER":/:/.test(s)?a(s):s||(e.state="ID");continue;case"NOTE":s||(e.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(s)){e.state="NOTE";break}if(!s)continue;e.cue=new(e.vttjs.VTTCue||e.window.VTTCue)(0,0,"");try{e.cue.align="center"}catch{e.cue.align="middle"}if(e.state="CUE",s.indexOf("-->")===-1){e.cue.id=s;continue}case"CUE":try{GQ(s,e.cue,e.regionList)}catch(c){e.reportOrThrowError(c),e.cue=null,e.state="BADCUE";continue}e.state="CUETEXT";continue;case"CUETEXT":var u=s.indexOf("-->")!==-1;if(!s||u&&(l=!0)){e.oncue&&e.oncue(e.cue),e.cue=null,e.state="ID";continue}e.cue.text&&(e.cue.text+=`
|
||
`),e.cue.text+=s.replace(/\u2028/g,`
|
||
`).replace(/u2029/g,`
|
||
`);continue;case"BADCUE":s||(e.state="ID");continue}}}catch(c){e.reportOrThrowError(c),e.state==="CUETEXT"&&e.cue&&e.oncue&&e.oncue(e.cue),e.cue=null,e.state=e.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},flush:function(){var r=this;try{if(r.buffer+=r.decoder.decode(),(r.cue||r.state==="HEADER")&&(r.buffer+=`
|
||
|
||
`,r.parse()),r.state==="INITIAL")throw new hn(hn.Errors.BadSignature)}catch(e){r.reportOrThrowError(e)}return r.onflush&&r.onflush(),this}};var QQ=If,JQ="auto",eJ={"":1,lr:1,rl:1},tJ={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function rJ(r){if(typeof r!="string")return!1;var e=eJ[r.toLowerCase()];return e?r.toLowerCase():!1}function Pb(r){if(typeof r!="string")return!1;var e=tJ[r.toLowerCase()];return e?r.toLowerCase():!1}function x4(r,e,t){this.hasBeenReset=!1;var i="",n=!1,a=r,s=e,o=t,l=null,u="",c=!0,h="auto",d="start",f="auto",p="auto",v=100,g="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return i},set:function(m){i=""+m}},pauseOnExit:{enumerable:!0,get:function(){return n},set:function(m){n=!!m}},startTime:{enumerable:!0,get:function(){return a},set:function(m){if(typeof m!="number")throw new TypeError("Start time must be set to a number.");a=m,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return s},set:function(m){if(typeof m!="number")throw new TypeError("End time must be set to a number.");s=m,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return o},set:function(m){o=""+m,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return l},set:function(m){l=m,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return u},set:function(m){var y=rJ(m);if(y===!1)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");u=y,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return c},set:function(m){c=!!m,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return h},set:function(m){if(typeof m!="number"&&m!==JQ)throw new SyntaxError("Line: an invalid number or illegal string was specified.");h=m,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return d},set:function(m){var y=Pb(m);y?(d=y,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return f},set:function(m){if(m<0||m>100)throw new Error("Position must be between 0 and 100.");f=m,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return p},set:function(m){var y=Pb(m);y?(p=y,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return v},set:function(m){if(m<0||m>100)throw new Error("Size must be between 0 and 100.");v=m,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return g},set:function(m){var y=Pb(m);if(!y)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");g=y,this.hasBeenReset=!0}}}),this.displayState=void 0}x4.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var iJ=x4,nJ={"":!0,up:!0};function aJ(r){if(typeof r!="string")return!1;var e=nJ[r.toLowerCase()];return e?r.toLowerCase():!1}function yd(r){return typeof r=="number"&&r>=0&&r<=100}function sJ(){var r=100,e=3,t=0,i=100,n=0,a=100,s="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return r},set:function(o){if(!yd(o))throw new Error("Width must be between 0 and 100.");r=o}},lines:{enumerable:!0,get:function(){return e},set:function(o){if(typeof o!="number")throw new TypeError("Lines must be set to a number.");e=o}},regionAnchorY:{enumerable:!0,get:function(){return i},set:function(o){if(!yd(o))throw new Error("RegionAnchorX must be between 0 and 100.");i=o}},regionAnchorX:{enumerable:!0,get:function(){return t},set:function(o){if(!yd(o))throw new Error("RegionAnchorY must be between 0 and 100.");t=o}},viewportAnchorY:{enumerable:!0,get:function(){return a},set:function(o){if(!yd(o))throw new Error("ViewportAnchorY must be between 0 and 100.");a=o}},viewportAnchorX:{enumerable:!0,get:function(){return n},set:function(o){if(!yd(o))throw new Error("ViewportAnchorX must be between 0 and 100.");n=o}},scroll:{enumerable:!0,get:function(){return s},set:function(o){var l=aJ(o);l===!1?console.warn("Scroll: an invalid or illegal string was specified."):s=l}}})}var oJ=sJ,qs=V_,dc=S4.exports={WebVTT:QQ,VTTCue:iJ,VTTRegion:oJ};qs.vttjs=dc;qs.WebVTT=dc.WebVTT;var lJ=dc.VTTCue,uJ=dc.VTTRegion,cJ=qs.VTTCue,hJ=qs.VTTRegion;dc.shim=function(){qs.VTTCue=lJ,qs.VTTRegion=uJ};dc.restore=function(){qs.VTTCue=cJ,qs.VTTRegion=hJ};qs.VTTCue||dc.shim();var fJ=S4.exports;const FP=tg(fJ);var UP="https://example.com",G_=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=H.location&&H.location.href||"");var i=/^\/\//.test(e),n=!H.location&&!/\/\//i.test(e);e=new H.URL(e,H.location||UP);var a=new URL(t,e);return n?a.href.slice(UP.length):i?a.href.slice(a.protocol.length):a.href},zC=function(){function r(){this.listeners={}}var e=r.prototype;return e.on=function(i,n){this.listeners[i]||(this.listeners[i]=[]),this.listeners[i].push(n)},e.off=function(i,n){if(!this.listeners[i])return!1;var a=this.listeners[i].indexOf(n);return this.listeners[i]=this.listeners[i].slice(0),this.listeners[i].splice(a,1),a>-1},e.trigger=function(i){var n=this.listeners[i];if(n)if(arguments.length===2)for(var a=n.length,s=0;s<a;++s)n[s].call(this,arguments[1]);else for(var o=Array.prototype.slice.call(arguments,1),l=n.length,u=0;u<l;++u)n[u].apply(this,o)},e.dispose=function(){this.listeners={}},e.pipe=function(i){this.on("data",function(n){i.push(n)})},r}(),dJ=function(e){return H.atob?H.atob(e):Buffer.from(e,"base64").toString("binary")};function w4(r){for(var e=dJ(r),t=new Uint8Array(e.length),i=0;i<e.length;i++)t[i]=e.charCodeAt(i);return t}/*! @name m3u8-parser @version 7.2.0 @license Apache-2.0 */class pJ extends zC{constructor(){super(),this.buffer=""}push(e){let t;for(this.buffer+=e,t=this.buffer.indexOf(`
|
||
`);t>-1;t=this.buffer.indexOf(`
|
||
`))this.trigger("data",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)}}const vJ=" ",Mb=function(r){const e=/([0-9.]*)?@?([0-9.]*)?/.exec(r||""),t={};return e[1]&&(t.length=parseInt(e[1],10)),e[2]&&(t.offset=parseInt(e[2],10)),t},gJ=function(){const t="(?:"+"[^=]*"+")=(?:"+'"[^"]*"|[^,]*'+")";return new RegExp("(?:^|,)("+t+")")},_i=function(r){const e={};if(!r)return e;const t=r.split(gJ());let i=t.length,n;for(;i--;)t[i]!==""&&(n=/([^=]*)=(.*)/.exec(t[i]).slice(1),n[0]=n[0].replace(/^\s+|\s+$/g,""),n[1]=n[1].replace(/^\s+|\s+$/g,""),n[1]=n[1].replace(/^['"](.*)['"]$/g,"$1"),e[n[0]]=n[1]);return e},VP=r=>{const e=r.split("x"),t={};return e[0]&&(t.width=parseInt(e[0],10)),e[1]&&(t.height=parseInt(e[1],10)),t};class mJ extends zC{constructor(){super(),this.customParsers=[],this.tagMappers=[]}push(e){let t,i;if(e=e.trim(),e.length===0)return;if(e[0]!=="#"){this.trigger("data",{type:"uri",uri:e});return}this.tagMappers.reduce((a,s)=>{const o=s(e);return o===e?a:a.concat([o])},[e]).forEach(a=>{for(let s=0;s<this.customParsers.length;s++)if(this.customParsers[s].call(this,a))return;if(a.indexOf("#EXT")!==0){this.trigger("data",{type:"comment",text:a.slice(1)});return}if(a=a.replace("\r",""),t=/^#EXTM3U/.exec(a),t){this.trigger("data",{type:"tag",tagType:"m3u"});return}if(t=/^#EXTINF:([0-9\.]*)?,?(.*)?$/.exec(a),t){i={type:"tag",tagType:"inf"},t[1]&&(i.duration=parseFloat(t[1])),t[2]&&(i.title=t[2]),this.trigger("data",i);return}if(t=/^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(a),t){i={type:"tag",tagType:"targetduration"},t[1]&&(i.duration=parseInt(t[1],10)),this.trigger("data",i);return}if(t=/^#EXT-X-VERSION:([0-9.]*)?/.exec(a),t){i={type:"tag",tagType:"version"},t[1]&&(i.version=parseInt(t[1],10)),this.trigger("data",i);return}if(t=/^#EXT-X-MEDIA-SEQUENCE:(\-?[0-9.]*)?/.exec(a),t){i={type:"tag",tagType:"media-sequence"},t[1]&&(i.number=parseInt(t[1],10)),this.trigger("data",i);return}if(t=/^#EXT-X-DISCONTINUITY-SEQUENCE:(\-?[0-9.]*)?/.exec(a),t){i={type:"tag",tagType:"discontinuity-sequence"},t[1]&&(i.number=parseInt(t[1],10)),this.trigger("data",i);return}if(t=/^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(a),t){i={type:"tag",tagType:"playlist-type"},t[1]&&(i.playlistType=t[1]),this.trigger("data",i);return}if(t=/^#EXT-X-BYTERANGE:(.*)?$/.exec(a),t){i=or(Mb(t[1]),{type:"tag",tagType:"byterange"}),this.trigger("data",i);return}if(t=/^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(a),t){i={type:"tag",tagType:"allow-cache"},t[1]&&(i.allowed=!/NO/.test(t[1])),this.trigger("data",i);return}if(t=/^#EXT-X-MAP:(.*)$/.exec(a),t){if(i={type:"tag",tagType:"map"},t[1]){const s=_i(t[1]);s.URI&&(i.uri=s.URI),s.BYTERANGE&&(i.byterange=Mb(s.BYTERANGE))}this.trigger("data",i);return}if(t=/^#EXT-X-STREAM-INF:(.*)$/.exec(a),t){i={type:"tag",tagType:"stream-inf"},t[1]&&(i.attributes=_i(t[1]),i.attributes.RESOLUTION&&(i.attributes.RESOLUTION=VP(i.attributes.RESOLUTION)),i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes["FRAME-RATE"]&&(i.attributes["FRAME-RATE"]=parseFloat(i.attributes["FRAME-RATE"])),i.attributes["PROGRAM-ID"]&&(i.attributes["PROGRAM-ID"]=parseInt(i.attributes["PROGRAM-ID"],10))),this.trigger("data",i);return}if(t=/^#EXT-X-MEDIA:(.*)$/.exec(a),t){i={type:"tag",tagType:"media"},t[1]&&(i.attributes=_i(t[1])),this.trigger("data",i);return}if(t=/^#EXT-X-ENDLIST/.exec(a),t){this.trigger("data",{type:"tag",tagType:"endlist"});return}if(t=/^#EXT-X-DISCONTINUITY/.exec(a),t){this.trigger("data",{type:"tag",tagType:"discontinuity"});return}if(t=/^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(a),t){i={type:"tag",tagType:"program-date-time"},t[1]&&(i.dateTimeString=t[1],i.dateTimeObject=new Date(t[1])),this.trigger("data",i);return}if(t=/^#EXT-X-KEY:(.*)$/.exec(a),t){i={type:"tag",tagType:"key"},t[1]&&(i.attributes=_i(t[1]),i.attributes.IV&&(i.attributes.IV.substring(0,2).toLowerCase()==="0x"&&(i.attributes.IV=i.attributes.IV.substring(2)),i.attributes.IV=i.attributes.IV.match(/.{8}/g),i.attributes.IV[0]=parseInt(i.attributes.IV[0],16),i.attributes.IV[1]=parseInt(i.attributes.IV[1],16),i.attributes.IV[2]=parseInt(i.attributes.IV[2],16),i.attributes.IV[3]=parseInt(i.attributes.IV[3],16),i.attributes.IV=new Uint32Array(i.attributes.IV))),this.trigger("data",i);return}if(t=/^#EXT-X-START:(.*)$/.exec(a),t){i={type:"tag",tagType:"start"},t[1]&&(i.attributes=_i(t[1]),i.attributes["TIME-OFFSET"]=parseFloat(i.attributes["TIME-OFFSET"]),i.attributes.PRECISE=/YES/.test(i.attributes.PRECISE)),this.trigger("data",i);return}if(t=/^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(a),t){i={type:"tag",tagType:"cue-out-cont"},t[1]?i.data=t[1]:i.data="",this.trigger("data",i);return}if(t=/^#EXT-X-CUE-OUT:(.*)?$/.exec(a),t){i={type:"tag",tagType:"cue-out"},t[1]?i.data=t[1]:i.data="",this.trigger("data",i);return}if(t=/^#EXT-X-CUE-IN:?(.*)?$/.exec(a),t){i={type:"tag",tagType:"cue-in"},t[1]?i.data=t[1]:i.data="",this.trigger("data",i);return}if(t=/^#EXT-X-SKIP:(.*)$/.exec(a),t&&t[1]){i={type:"tag",tagType:"skip"},i.attributes=_i(t[1]),i.attributes.hasOwnProperty("SKIPPED-SEGMENTS")&&(i.attributes["SKIPPED-SEGMENTS"]=parseInt(i.attributes["SKIPPED-SEGMENTS"],10)),i.attributes.hasOwnProperty("RECENTLY-REMOVED-DATERANGES")&&(i.attributes["RECENTLY-REMOVED-DATERANGES"]=i.attributes["RECENTLY-REMOVED-DATERANGES"].split(vJ)),this.trigger("data",i);return}if(t=/^#EXT-X-PART:(.*)$/.exec(a),t&&t[1]){i={type:"tag",tagType:"part"},i.attributes=_i(t[1]),["DURATION"].forEach(function(s){i.attributes.hasOwnProperty(s)&&(i.attributes[s]=parseFloat(i.attributes[s]))}),["INDEPENDENT","GAP"].forEach(function(s){i.attributes.hasOwnProperty(s)&&(i.attributes[s]=/YES/.test(i.attributes[s]))}),i.attributes.hasOwnProperty("BYTERANGE")&&(i.attributes.byterange=Mb(i.attributes.BYTERANGE)),this.trigger("data",i);return}if(t=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(a),t&&t[1]){i={type:"tag",tagType:"server-control"},i.attributes=_i(t[1]),["CAN-SKIP-UNTIL","PART-HOLD-BACK","HOLD-BACK"].forEach(function(s){i.attributes.hasOwnProperty(s)&&(i.attributes[s]=parseFloat(i.attributes[s]))}),["CAN-SKIP-DATERANGES","CAN-BLOCK-RELOAD"].forEach(function(s){i.attributes.hasOwnProperty(s)&&(i.attributes[s]=/YES/.test(i.attributes[s]))}),this.trigger("data",i);return}if(t=/^#EXT-X-PART-INF:(.*)$/.exec(a),t&&t[1]){i={type:"tag",tagType:"part-inf"},i.attributes=_i(t[1]),["PART-TARGET"].forEach(function(s){i.attributes.hasOwnProperty(s)&&(i.attributes[s]=parseFloat(i.attributes[s]))}),this.trigger("data",i);return}if(t=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(a),t&&t[1]){i={type:"tag",tagType:"preload-hint"},i.attributes=_i(t[1]),["BYTERANGE-START","BYTERANGE-LENGTH"].forEach(function(s){if(i.attributes.hasOwnProperty(s)){i.attributes[s]=parseInt(i.attributes[s],10);const o=s==="BYTERANGE-LENGTH"?"length":"offset";i.attributes.byterange=i.attributes.byterange||{},i.attributes.byterange[o]=i.attributes[s],delete i.attributes[s]}}),this.trigger("data",i);return}if(t=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(a),t&&t[1]){i={type:"tag",tagType:"rendition-report"},i.attributes=_i(t[1]),["LAST-MSN","LAST-PART"].forEach(function(s){i.attributes.hasOwnProperty(s)&&(i.attributes[s]=parseInt(i.attributes[s],10))}),this.trigger("data",i);return}if(t=/^#EXT-X-DATERANGE:(.*)$/.exec(a),t&&t[1]){i={type:"tag",tagType:"daterange"},i.attributes=_i(t[1]),["ID","CLASS"].forEach(function(o){i.attributes.hasOwnProperty(o)&&(i.attributes[o]=String(i.attributes[o]))}),["START-DATE","END-DATE"].forEach(function(o){i.attributes.hasOwnProperty(o)&&(i.attributes[o]=new Date(i.attributes[o]))}),["DURATION","PLANNED-DURATION"].forEach(function(o){i.attributes.hasOwnProperty(o)&&(i.attributes[o]=parseFloat(i.attributes[o]))}),["END-ON-NEXT"].forEach(function(o){i.attributes.hasOwnProperty(o)&&(i.attributes[o]=/YES/i.test(i.attributes[o]))}),["SCTE35-CMD"," SCTE35-OUT","SCTE35-IN"].forEach(function(o){i.attributes.hasOwnProperty(o)&&(i.attributes[o]=i.attributes[o].toString(16))});const s=/^X-([A-Z]+-)+[A-Z]+$/;for(const o in i.attributes){if(!s.test(o))continue;const l=/[0-9A-Fa-f]{6}/g.test(i.attributes[o]),u=/^\d+(\.\d+)?$/.test(i.attributes[o]);i.attributes[o]=l?i.attributes[o].toString(16):u?parseFloat(i.attributes[o]):String(i.attributes[o])}this.trigger("data",i);return}if(t=/^#EXT-X-INDEPENDENT-SEGMENTS/.exec(a),t){this.trigger("data",{type:"tag",tagType:"independent-segments"});return}if(t=/^#EXT-X-I-FRAMES-ONLY/.exec(a),t){this.trigger("data",{type:"tag",tagType:"i-frames-only"});return}if(t=/^#EXT-X-CONTENT-STEERING:(.*)$/.exec(a),t){i={type:"tag",tagType:"content-steering"},i.attributes=_i(t[1]),this.trigger("data",i);return}if(t=/^#EXT-X-I-FRAME-STREAM-INF:(.*)$/.exec(a),t){i={type:"tag",tagType:"i-frame-playlist"},i.attributes=_i(t[1]),i.attributes.URI&&(i.uri=i.attributes.URI),i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes.RESOLUTION&&(i.attributes.RESOLUTION=VP(i.attributes.RESOLUTION)),i.attributes["AVERAGE-BANDWIDTH"]&&(i.attributes["AVERAGE-BANDWIDTH"]=parseInt(i.attributes["AVERAGE-BANDWIDTH"],10)),i.attributes["FRAME-RATE"]&&(i.attributes["FRAME-RATE"]=parseFloat(i.attributes["FRAME-RATE"])),this.trigger("data",i);return}if(t=/^#EXT-X-DEFINE:(.*)$/.exec(a),t){i={type:"tag",tagType:"define"},i.attributes=_i(t[1]),this.trigger("data",i);return}this.trigger("data",{type:"tag",data:a.slice(4)})})}addParser({expression:e,customType:t,dataParser:i,segment:n}){typeof i!="function"&&(i=a=>a),this.customParsers.push(a=>{if(e.exec(a))return this.trigger("data",{type:"custom",data:i(a),customType:t,segment:n}),!0})}addTagMapper({expression:e,map:t}){const i=n=>e.test(n)?t(n):n;this.tagMappers.push(i)}}const yJ=r=>r.toLowerCase().replace(/-(\w)/g,e=>e[1].toUpperCase()),po=function(r){const e={};return Object.keys(r).forEach(function(t){e[yJ(t)]=r[t]}),e},Lb=function(r){const{serverControl:e,targetDuration:t,partTargetDuration:i}=r;if(!e)return;const n="#EXT-X-SERVER-CONTROL",a="holdBack",s="partHoldBack",o=t&&t*3,l=i&&i*2;t&&!e.hasOwnProperty(a)&&(e[a]=o,this.trigger("info",{message:`${n} defaulting HOLD-BACK to targetDuration * 3 (${o}).`})),o&&e[a]<o&&(this.trigger("warn",{message:`${n} clamping HOLD-BACK (${e[a]}) to targetDuration * 3 (${o})`}),e[a]=o),i&&!e.hasOwnProperty(s)&&(e[s]=i*3,this.trigger("info",{message:`${n} defaulting PART-HOLD-BACK to partTargetDuration * 3 (${e[s]}).`})),i&&e[s]<l&&(this.trigger("warn",{message:`${n} clamping PART-HOLD-BACK (${e[s]}) to partTargetDuration * 2 (${l}).`}),e[s]=l)};class _J extends zC{constructor(e={}){super(),this.lineStream=new pJ,this.parseStream=new mJ,this.lineStream.pipe(this.parseStream),this.mainDefinitions=e.mainDefinitions||{},this.params=new URL(e.uri,"https://a.com").searchParams,this.lastProgramDateTime=null;const t=this,i=[];let n={},a,s,o=!1;const l=function(){},u={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},c="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed";let h=0;this.manifest={allowCache:!0,discontinuityStarts:[],dateRanges:[],iFramePlaylists:[],segments:[]};let d=0,f=0;const p={};this.on("end",()=>{n.uri||!n.parts&&!n.preloadHints||(!n.map&&a&&(n.map=a),!n.key&&s&&(n.key=s),!n.timeline&&typeof h=="number"&&(n.timeline=h),this.manifest.preloadSegment=n)}),this.parseStream.on("data",function(v){let g,m;if(t.manifest.definitions){for(const y in t.manifest.definitions)if(v.uri&&(v.uri=v.uri.replace(`{$${y}}`,t.manifest.definitions[y])),v.attributes)for(const _ in v.attributes)typeof v.attributes[_]=="string"&&(v.attributes[_]=v.attributes[_].replace(`{$${y}}`,t.manifest.definitions[y]))}({tag(){({version(){v.version&&(this.manifest.version=v.version)},"allow-cache"(){this.manifest.allowCache=v.allowed,"allowed"in v||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange(){const y={};"length"in v&&(n.byterange=y,y.length=v.length,"offset"in v||(v.offset=d)),"offset"in v&&(n.byterange=y,y.offset=v.offset),d=y.offset+y.length},endlist(){this.manifest.endList=!0},inf(){"mediaSequence"in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"})),"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"})),v.title&&(n.title=v.title),v.duration>0&&(n.duration=v.duration),v.duration===0&&(n.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=i},key(){if(!v.attributes){this.trigger("warn",{message:"ignoring key declaration without attribute list"});return}if(v.attributes.METHOD==="NONE"){s=null;return}if(!v.attributes.URI){this.trigger("warn",{message:"ignoring key declaration without URI"});return}if(v.attributes.KEYFORMAT==="com.apple.streamingkeydelivery"){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:v.attributes};return}if(v.attributes.KEYFORMAT==="com.microsoft.playready"){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.microsoft.playready"]={uri:v.attributes.URI};return}if(v.attributes.KEYFORMAT===c){if(["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(v.attributes.METHOD)===-1){this.trigger("warn",{message:"invalid key method provided for Widevine"});return}if(v.attributes.METHOD==="SAMPLE-AES-CENC"&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),v.attributes.URI.substring(0,23)!=="data:text/plain;base64,"){this.trigger("warn",{message:"invalid key URI provided for Widevine"});return}if(!(v.attributes.KEYID&&v.attributes.KEYID.substring(0,2)==="0x")){this.trigger("warn",{message:"invalid key ID provided for Widevine"});return}this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.widevine.alpha"]={attributes:{schemeIdUri:v.attributes.KEYFORMAT,keyId:v.attributes.KEYID.substring(2)},pssh:w4(v.attributes.URI.split(",")[1])};return}v.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),s={method:v.attributes.METHOD||"AES-128",uri:v.attributes.URI},typeof v.attributes.IV<"u"&&(s.iv=v.attributes.IV)},"media-sequence"(){if(!isFinite(v.number)){this.trigger("warn",{message:"ignoring invalid media sequence: "+v.number});return}this.manifest.mediaSequence=v.number},"discontinuity-sequence"(){if(!isFinite(v.number)){this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+v.number});return}this.manifest.discontinuitySequence=v.number,h=v.number},"playlist-type"(){if(!/VOD|EVENT/.test(v.playlistType)){this.trigger("warn",{message:"ignoring unknown playlist type: "+v.playlist});return}this.manifest.playlistType=v.playlistType},map(){a={},v.uri&&(a.uri=v.uri),v.byterange&&(a.byterange=v.byterange),s&&(a.key=s)},"stream-inf"(){if(this.manifest.playlists=i,this.manifest.mediaGroups=this.manifest.mediaGroups||u,!v.attributes){this.trigger("warn",{message:"ignoring empty stream-inf attributes"});return}n.attributes||(n.attributes={}),or(n.attributes,v.attributes)},media(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||u,!(v.attributes&&v.attributes.TYPE&&v.attributes["GROUP-ID"]&&v.attributes.NAME)){this.trigger("warn",{message:"ignoring incomplete or missing media group"});return}const y=this.manifest.mediaGroups[v.attributes.TYPE];y[v.attributes["GROUP-ID"]]=y[v.attributes["GROUP-ID"]]||{},g=y[v.attributes["GROUP-ID"]],m={default:/yes/i.test(v.attributes.DEFAULT)},m.default?m.autoselect=!0:m.autoselect=/yes/i.test(v.attributes.AUTOSELECT),v.attributes.LANGUAGE&&(m.language=v.attributes.LANGUAGE),v.attributes.URI&&(m.uri=v.attributes.URI),v.attributes["INSTREAM-ID"]&&(m.instreamId=v.attributes["INSTREAM-ID"]),v.attributes.CHARACTERISTICS&&(m.characteristics=v.attributes.CHARACTERISTICS),v.attributes.FORCED&&(m.forced=/yes/i.test(v.attributes.FORCED)),g[v.attributes.NAME]=m},discontinuity(){h+=1,n.discontinuity=!0,this.manifest.discontinuityStarts.push(i.length)},"program-date-time"(){typeof this.manifest.dateTimeString>"u"&&(this.manifest.dateTimeString=v.dateTimeString,this.manifest.dateTimeObject=v.dateTimeObject),n.dateTimeString=v.dateTimeString,n.dateTimeObject=v.dateTimeObject;const{lastProgramDateTime:y}=this;this.lastProgramDateTime=new Date(v.dateTimeString).getTime(),y===null&&this.manifest.segments.reduceRight((_,b)=>(b.programDateTime=_-b.duration*1e3,b.programDateTime),this.lastProgramDateTime)},targetduration(){if(!isFinite(v.duration)||v.duration<0){this.trigger("warn",{message:"ignoring invalid target duration: "+v.duration});return}this.manifest.targetDuration=v.duration,Lb.call(this,this.manifest)},start(){if(!v.attributes||isNaN(v.attributes["TIME-OFFSET"])){this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"});return}this.manifest.start={timeOffset:v.attributes["TIME-OFFSET"],precise:v.attributes.PRECISE}},"cue-out"(){n.cueOut=v.data},"cue-out-cont"(){n.cueOutCont=v.data},"cue-in"(){n.cueIn=v.data},skip(){this.manifest.skip=po(v.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",v.attributes,["SKIPPED-SEGMENTS"])},part(){o=!0;const y=this.manifest.segments.length,_=po(v.attributes);n.parts=n.parts||[],n.parts.push(_),_.byterange&&(_.byterange.hasOwnProperty("offset")||(_.byterange.offset=f),f=_.byterange.offset+_.byterange.length);const b=n.parts.length-1;this.warnOnMissingAttributes_(`#EXT-X-PART #${b} for segment #${y}`,v.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach((T,x)=>{T.hasOwnProperty("lastPart")||this.trigger("warn",{message:`#EXT-X-RENDITION-REPORT #${x} lacks required attribute(s): LAST-PART`})})},"server-control"(){const y=this.manifest.serverControl=po(v.attributes);y.hasOwnProperty("canBlockReload")||(y.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),Lb.call(this,this.manifest),y.canSkipDateranges&&!y.hasOwnProperty("canSkipUntil")&&this.trigger("warn",{message:"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set"})},"preload-hint"(){const y=this.manifest.segments.length,_=po(v.attributes),b=_.type&&_.type==="PART";n.preloadHints=n.preloadHints||[],n.preloadHints.push(_),_.byterange&&(_.byterange.hasOwnProperty("offset")||(_.byterange.offset=b?f:0,b&&(f=_.byterange.offset+_.byterange.length)));const T=n.preloadHints.length-1;if(this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${T} for segment #${y}`,v.attributes,["TYPE","URI"]),!!_.type)for(let x=0;x<n.preloadHints.length-1;x++){const C=n.preloadHints[x];C.type&&C.type===_.type&&this.trigger("warn",{message:`#EXT-X-PRELOAD-HINT #${T} for segment #${y} has the same TYPE ${_.type} as preload hint #${x}`})}},"rendition-report"(){const y=po(v.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(y);const _=this.manifest.renditionReports.length-1,b=["LAST-MSN","URI"];o&&b.push("LAST-PART"),this.warnOnMissingAttributes_(`#EXT-X-RENDITION-REPORT #${_}`,v.attributes,b)},"part-inf"(){this.manifest.partInf=po(v.attributes),this.warnOnMissingAttributes_("#EXT-X-PART-INF",v.attributes,["PART-TARGET"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),Lb.call(this,this.manifest)},daterange(){this.manifest.dateRanges.push(po(v.attributes));const y=this.manifest.dateRanges.length-1;this.warnOnMissingAttributes_(`#EXT-X-DATERANGE #${y}`,v.attributes,["ID","START-DATE"]);const _=this.manifest.dateRanges[y];_.endDate&&_.startDate&&new Date(_.endDate)<new Date(_.startDate)&&this.trigger("warn",{message:"EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE"}),_.duration&&_.duration<0&&this.trigger("warn",{message:"EXT-X-DATERANGE DURATION must not be negative"}),_.plannedDuration&&_.plannedDuration<0&&this.trigger("warn",{message:"EXT-X-DATERANGE PLANNED-DURATION must not be negative"});const b=!!_.endOnNext;if(b&&!_.class&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must have a CLASS attribute"}),b&&(_.duration||_.endDate)&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes"}),_.duration&&_.endDate){const x=_.startDate.getTime()+_.duration*1e3;this.manifest.dateRanges[y].endDate=new Date(x)}if(!p[_.id])p[_.id]=_;else{for(const x in p[_.id])if(_[x]&&JSON.stringify(p[_.id][x])!==JSON.stringify(_[x])){this.trigger("warn",{message:"EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes values"});break}const T=this.manifest.dateRanges.findIndex(x=>x.id===_.id);this.manifest.dateRanges[T]=or(this.manifest.dateRanges[T],_),p[_.id]=or(p[_.id],_),this.manifest.dateRanges.pop()}},"independent-segments"(){this.manifest.independentSegments=!0},"i-frames-only"(){this.manifest.iFramesOnly=!0,this.requiredCompatibilityversion(this.manifest.version,4)},"content-steering"(){this.manifest.contentSteering=po(v.attributes),this.warnOnMissingAttributes_("#EXT-X-CONTENT-STEERING",v.attributes,["SERVER-URI"])},define(){this.manifest.definitions=this.manifest.definitions||{};const y=(_,b)=>{if(_ in this.manifest.definitions){this.trigger("error",{message:`EXT-X-DEFINE: Duplicate name ${_}`});return}this.manifest.definitions[_]=b};if("QUERYPARAM"in v.attributes){if("NAME"in v.attributes||"IMPORT"in v.attributes){this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"});return}const _=this.params.get(v.attributes.QUERYPARAM);if(!_){this.trigger("error",{message:`EXT-X-DEFINE: No query param ${v.attributes.QUERYPARAM}`});return}y(v.attributes.QUERYPARAM,decodeURIComponent(_));return}if("NAME"in v.attributes){if("IMPORT"in v.attributes){this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"});return}if(!("VALUE"in v.attributes)||typeof v.attributes.VALUE!="string"){this.trigger("error",{message:`EXT-X-DEFINE: No value for ${v.attributes.NAME}`});return}y(v.attributes.NAME,v.attributes.VALUE);return}if("IMPORT"in v.attributes){if(!this.mainDefinitions[v.attributes.IMPORT]){this.trigger("error",{message:`EXT-X-DEFINE: No value ${v.attributes.IMPORT} to import, or IMPORT used on main playlist`});return}y(v.attributes.IMPORT,this.mainDefinitions[v.attributes.IMPORT]);return}this.trigger("error",{message:"EXT-X-DEFINE: No attribute"})},"i-frame-playlist"(){this.manifest.iFramePlaylists.push({attributes:v.attributes,uri:v.uri,timeline:h}),this.warnOnMissingAttributes_("#EXT-X-I-FRAME-STREAM-INF",v.attributes,["BANDWIDTH","URI"])}}[v.tagType]||l).call(t)},uri(){n.uri=v.uri,i.push(n),this.manifest.targetDuration&&!("duration"in n)&&(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),n.duration=this.manifest.targetDuration),s&&(n.key=s),n.timeline=h,a&&(n.map=a),f=0,this.lastProgramDateTime!==null&&(n.programDateTime=this.lastProgramDateTime,this.lastProgramDateTime+=n.duration*1e3),n={}},comment(){},custom(){v.segment?(n.custom=n.custom||{},n.custom[v.customType]=v.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[v.customType]=v.data)}})[v.type].call(t)})}requiredCompatibilityversion(e,t){(e<t||!e)&&this.trigger("warn",{message:`manifest must be at least version ${t}`})}warnOnMissingAttributes_(e,t,i){const n=[];i.forEach(function(a){t.hasOwnProperty(a)||n.push(a)}),n.length&&this.trigger("warn",{message:`${e} lacks required attribute(s): ${n.join(", ")}`})}push(e){this.lineStream.push(e)}end(){this.lineStream.push(`
|
||
`),this.manifest.dateRanges.length&&this.lastProgramDateTime===null&&this.trigger("warn",{message:"A playlist with EXT-X-DATERANGE tag must contain atleast one EXT-X-PROGRAM-DATE-TIME tag"}),this.lastProgramDateTime=null,this.trigger("end")}addParser(e){this.parseStream.addParser(e)}addTagMapper(e){this.parseStream.addTagMapper(e)}}var Lu={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},bJ=["video","audio","text"],zP=["Video","Audio","Text"],C4=function(e){return e&&e.replace(/avc1\.(\d+)\.(\d+)/i,function(t,i,n){var a=("00"+Number(i).toString(16)).slice(-2),s=("00"+Number(n).toString(16)).slice(-2);return"avc1."+a+"00"+s})},Ga=function(e){e===void 0&&(e="");var t=e.split(","),i=[];return t.forEach(function(n){n=n.trim();var a;bJ.forEach(function(s){var o=Lu[s].exec(n.toLowerCase());if(!(!o||o.length<=1)){a=s;var l=n.substring(0,o[1].length),u=n.replace(l,"");i.push({type:l,details:u,mediaType:s})}}),a||i.push({type:n,details:"",mediaType:"unknown"})}),i},SJ=function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var i=e.mediaGroups.AUDIO[t];if(!i)return null;for(var n in i){var a=i[n];if(a.default&&a.playlists)return Ga(a.playlists[0].attributes.CODECS)}return null},A4=function(e){return e===void 0&&(e=""),Lu.audio.test(e.trim().toLowerCase())},TJ=function(e){return e===void 0&&(e=""),Lu.text.test(e.trim().toLowerCase())},Yh=function(e){if(!(!e||typeof e!="string")){var t=e.toLowerCase().split(",").map(function(a){return C4(a.trim())}),i="video";t.length===1&&A4(t[0])?i="audio":t.length===1&&TJ(t[0])&&(i="application");var n="mp4";return t.every(function(a){return Lu.mp4.test(a)})?n="mp4":t.every(function(a){return Lu.webm.test(a)})?n="webm":t.every(function(a){return Lu.ogg.test(a)})&&(n="ogg"),i+"/"+n+';codecs="'+e+'"'}},Ep=function(e,t){return e===void 0&&(e=""),t===void 0&&(t=!1),H.MediaSource&&H.MediaSource.isTypeSupported&&H.MediaSource.isTypeSupported(Yh(e))||t&&H.ManagedMediaSource&&H.ManagedMediaSource.isTypeSupported&&H.ManagedMediaSource.isTypeSupported(Yh(e))||!1},kb=function(e){return e===void 0&&(e=""),e.toLowerCase().split(",").every(function(t){t=t.trim();for(var i=0;i<zP.length;i++){var n=zP[i];if(Lu["muxer"+n].test(t))return!0}return!1})},GP="mp4a.40.2",xJ="avc1.4d400d",wJ=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,CJ=/^application\/dash\+xml/i,D4=function(e){return wJ.test(e)?"hls":CJ.test(e)?"dash":e==="application/vnd.videojs.vhs+json"?"vhs-json":null},AJ=function(e){return e.toString(2).length},DJ=function(e){return Math.ceil(AJ(e)/8)},E4=function(e){return ArrayBuffer.isView==="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},EJ=function(e){return E4(e)},qe=function(e){return e instanceof Uint8Array?e:(!Array.isArray(e)&&!EJ(e)&&!(e instanceof ArrayBuffer)&&(typeof e!="number"||typeof e=="number"&&e!==e?e=0:e=[e]),new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0))},Yr=H.BigInt||Number,qx=[Yr("0x1"),Yr("0x100"),Yr("0x10000"),Yr("0x1000000"),Yr("0x100000000"),Yr("0x10000000000"),Yr("0x1000000000000"),Yr("0x100000000000000"),Yr("0x10000000000000000")];(function(){var r=new Uint16Array([65484]),e=new Uint8Array(r.buffer,r.byteOffset,r.byteLength);return e[0]===255?"big":e[0]===204?"little":"unknown"})();var IJ=function(e,t){var i=t===void 0?{}:t,n=i.signed,a=n===void 0?!1:n,s=i.le,o=s===void 0?!1:s;e=qe(e);var l=o?"reduce":"reduceRight",u=e[l]?e[l]:Array.prototype[l],c=u.call(e,function(d,f,p){var v=o?p:Math.abs(p+1-e.length);return d+Yr(f)*qx[v]},Yr(0));if(a){var h=qx[e.length]/Yr(2)-Yr(1);c=Yr(c),c>h&&(c-=h,c-=h,c-=Yr(2))}return Number(c)},PJ=function(e,t){var i={},n=i.le,a=n===void 0?!1:n;(typeof e!="bigint"&&typeof e!="number"||typeof e=="number"&&e!==e)&&(e=0),e=Yr(e);for(var s=DJ(e),o=new Uint8Array(new ArrayBuffer(s)),l=0;l<s;l++){var u=a?l:Math.abs(l+1-o.length);o[u]=Number(e/qx[l]&Yr(255)),e<0&&(o[u]=Math.abs(~o[u]),o[u]-=l===0?1:2)}return o},I4=function(e,t){if(typeof e!="string"&&e&&typeof e.toString=="function"&&(e=e.toString()),typeof e!="string")return new Uint8Array;t||(e=unescape(encodeURIComponent(e)));for(var i=new Uint8Array(e.length),n=0;n<e.length;n++)i[n]=e.charCodeAt(n);return i},MJ=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];if(t=t.filter(function(o){return o&&(o.byteLength||o.length)&&typeof o!="string"}),t.length<=1)return qe(t[0]);var n=t.reduce(function(o,l,u){return o+(l.byteLength||l.length)},0),a=new Uint8Array(n),s=0;return t.forEach(function(o){o=qe(o),a.set(o,s),s+=o.byteLength}),a},qt=function(e,t,i){var n=i===void 0?{}:i,a=n.offset,s=a===void 0?0:a,o=n.mask,l=o===void 0?[]:o;e=qe(e),t=qe(t);var u=t.every?t.every:Array.prototype.every;return t.length&&e.length-s>=t.length&&u.call(t,function(c,h){var d=l[h]?l[h]&e[s+h]:e[s+h];return c===d})},LJ=function(e,t,i){t.forEach(function(n){for(var a in e.mediaGroups[n])for(var s in e.mediaGroups[n][a]){var o=e.mediaGroups[n][a][s];i(o,n,a,s)}})},hl={},so={};function kJ(r,e,t){if(t===void 0&&(t=Array.prototype),r&&typeof t.find=="function")return t.find.call(r,e);for(var i=0;i<r.length;i++)if(Object.prototype.hasOwnProperty.call(r,i)){var n=r[i];if(e.call(void 0,n,i,r))return n}}function GC(r,e){return e===void 0&&(e=Object),e&&typeof e.freeze=="function"?e.freeze(r):r}function RJ(r,e){if(r===null||typeof r!="object")throw new TypeError("target is not an object");for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t]);return r}var P4=GC({HTML:"text/html",isHTML:function(r){return r===P4.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),M4=GC({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(r){return r===M4.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});so.assign=RJ;so.find=kJ;so.freeze=GC;so.MIME_TYPE=P4;so.NAMESPACE=M4;var L4=so,is=L4.find,av=L4.NAMESPACE;function OJ(r){return r!==""}function NJ(r){return r?r.split(/[\t\n\f\r ]+/).filter(OJ):[]}function BJ(r,e){return r.hasOwnProperty(e)||(r[e]=!0),r}function HP(r){if(!r)return[];var e=NJ(r);return Object.keys(e.reduce(BJ,{}))}function FJ(r){return function(e){return r&&r.indexOf(e)!==-1}}function rg(r,e){for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}function tn(r,e){var t=r.prototype;if(!(t instanceof e)){let n=function(){};var i=n;n.prototype=e.prototype,n=new n,rg(t,n),r.prototype=t=n}t.constructor!=r&&(typeof r!="function"&&console.error("unknown Class:"+r),t.constructor=r)}var rn={},_a=rn.ELEMENT_NODE=1,Kh=rn.ATTRIBUTE_NODE=2,t0=rn.TEXT_NODE=3,k4=rn.CDATA_SECTION_NODE=4,R4=rn.ENTITY_REFERENCE_NODE=5,UJ=rn.ENTITY_NODE=6,O4=rn.PROCESSING_INSTRUCTION_NODE=7,N4=rn.COMMENT_NODE=8,B4=rn.DOCUMENT_NODE=9,F4=rn.DOCUMENT_TYPE_NODE=10,js=rn.DOCUMENT_FRAGMENT_NODE=11,VJ=rn.NOTATION_NODE=12,gi={},Wr={};gi.INDEX_SIZE_ERR=(Wr[1]="Index size error",1);gi.DOMSTRING_SIZE_ERR=(Wr[2]="DOMString size error",2);var Vi=gi.HIERARCHY_REQUEST_ERR=(Wr[3]="Hierarchy request error",3);gi.WRONG_DOCUMENT_ERR=(Wr[4]="Wrong document",4);gi.INVALID_CHARACTER_ERR=(Wr[5]="Invalid character",5);gi.NO_DATA_ALLOWED_ERR=(Wr[6]="No data allowed",6);gi.NO_MODIFICATION_ALLOWED_ERR=(Wr[7]="No modification allowed",7);var U4=gi.NOT_FOUND_ERR=(Wr[8]="Not found",8);gi.NOT_SUPPORTED_ERR=(Wr[9]="Not supported",9);var $P=gi.INUSE_ATTRIBUTE_ERR=(Wr[10]="Attribute in use",10);gi.INVALID_STATE_ERR=(Wr[11]="Invalid state",11);gi.SYNTAX_ERR=(Wr[12]="Syntax error",12);gi.INVALID_MODIFICATION_ERR=(Wr[13]="Invalid modification",13);gi.NAMESPACE_ERR=(Wr[14]="Invalid namespace",14);gi.INVALID_ACCESS_ERR=(Wr[15]="Invalid access",15);function yr(r,e){if(e instanceof Error)var t=e;else t=this,Error.call(this,Wr[r]),this.message=Wr[r],Error.captureStackTrace&&Error.captureStackTrace(this,yr);return t.code=r,e&&(this.message=this.message+": "+e),t}yr.prototype=Error.prototype;rg(gi,yr);function Gs(){}Gs.prototype={length:0,item:function(r){return r>=0&&r<this.length?this[r]:null},toString:function(r,e){for(var t=[],i=0;i<this.length;i++)mh(this[i],t,r,e);return t.join("")},filter:function(r){return Array.prototype.filter.call(this,r)},indexOf:function(r){return Array.prototype.indexOf.call(this,r)}};function Zh(r,e){this._node=r,this._refresh=e,HC(this)}function HC(r){var e=r._node._inc||r._node.ownerDocument._inc;if(r._inc!==e){var t=r._refresh(r._node);if(Z4(r,"length",t.length),!r.$$length||t.length<r.$$length)for(var i=t.length;i in r;i++)Object.prototype.hasOwnProperty.call(r,i)&&delete r[i];rg(t,r),r._inc=e}}Zh.prototype.item=function(r){return HC(this),this[r]||null};tn(Zh,Gs);function r0(){}function V4(r,e){for(var t=r.length;t--;)if(r[t]===e)return t}function WP(r,e,t,i){if(i?e[V4(e,i)]=t:e[e.length++]=t,r){t.ownerElement=r;var n=r.ownerDocument;n&&(i&&H4(n,r,i),zJ(n,r,t))}}function qP(r,e,t){var i=V4(e,t);if(i>=0){for(var n=e.length-1;i<n;)e[i]=e[++i];if(e.length=n,r){var a=r.ownerDocument;a&&(H4(a,r,t),t.ownerElement=null)}}else throw new yr(U4,new Error(r.tagName+"@"+t))}r0.prototype={length:0,item:Gs.prototype.item,getNamedItem:function(r){for(var e=this.length;e--;){var t=this[e];if(t.nodeName==r)return t}},setNamedItem:function(r){var e=r.ownerElement;if(e&&e!=this._ownerElement)throw new yr($P);var t=this.getNamedItem(r.nodeName);return WP(this._ownerElement,this,r,t),t},setNamedItemNS:function(r){var e=r.ownerElement,t;if(e&&e!=this._ownerElement)throw new yr($P);return t=this.getNamedItemNS(r.namespaceURI,r.localName),WP(this._ownerElement,this,r,t),t},removeNamedItem:function(r){var e=this.getNamedItem(r);return qP(this._ownerElement,this,e),e},removeNamedItemNS:function(r,e){var t=this.getNamedItemNS(r,e);return qP(this._ownerElement,this,t),t},getNamedItemNS:function(r,e){for(var t=this.length;t--;){var i=this[t];if(i.localName==e&&i.namespaceURI==r)return i}return null}};function z4(){}z4.prototype={hasFeature:function(r,e){return!0},createDocument:function(r,e,t){var i=new ig;if(i.implementation=this,i.childNodes=new Gs,i.doctype=t||null,t&&i.appendChild(t),e){var n=i.createElementNS(r,e);i.appendChild(n)}return i},createDocumentType:function(r,e,t){var i=new H_;return i.name=r,i.nodeName=r,i.publicId=e||"",i.systemId=t||"",i}};function Ot(){}Ot.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(r,e){return i0(this,r,e)},replaceChild:function(r,e){i0(this,r,e,W4),e&&this.removeChild(e)},removeChild:function(r){return $4(this,r)},appendChild:function(r){return this.insertBefore(r,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(r){return jx(this.ownerDocument||this,this,r)},normalize:function(){for(var r=this.firstChild;r;){var e=r.nextSibling;e&&e.nodeType==t0&&r.nodeType==t0?(this.removeChild(e),r.appendData(e.data)):(r.normalize(),r=e)}},isSupported:function(r,e){return this.ownerDocument.implementation.hasFeature(r,e)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(r){for(var e=this;e;){var t=e._nsMap;if(t){for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&t[i]===r)return i}e=e.nodeType==Kh?e.ownerDocument:e.parentNode}return null},lookupNamespaceURI:function(r){for(var e=this;e;){var t=e._nsMap;if(t&&Object.prototype.hasOwnProperty.call(t,r))return t[r];e=e.nodeType==Kh?e.ownerDocument:e.parentNode}return null},isDefaultNamespace:function(r){var e=this.lookupPrefix(r);return e==null}};function G4(r){return r=="<"&&"<"||r==">"&&">"||r=="&"&&"&"||r=='"'&&"""||"&#"+r.charCodeAt()+";"}rg(rn,Ot);rg(rn,Ot.prototype);function sv(r,e){if(e(r))return!0;if(r=r.firstChild)do if(sv(r,e))return!0;while(r=r.nextSibling)}function ig(){this.ownerDocument=this}function zJ(r,e,t){r&&r._inc++;var i=t.namespaceURI;i===av.XMLNS&&(e._nsMap[t.prefix?t.localName:""]=t.value)}function H4(r,e,t,i){r&&r._inc++;var n=t.namespaceURI;n===av.XMLNS&&delete e._nsMap[t.prefix?t.localName:""]}function $C(r,e,t){if(r&&r._inc){r._inc++;var i=e.childNodes;if(t)i[i.length++]=t;else{for(var n=e.firstChild,a=0;n;)i[a++]=n,n=n.nextSibling;i.length=a,delete i[i.length]}}}function $4(r,e){var t=e.previousSibling,i=e.nextSibling;return t?t.nextSibling=i:r.firstChild=i,i?i.previousSibling=t:r.lastChild=t,e.parentNode=null,e.previousSibling=null,e.nextSibling=null,$C(r.ownerDocument,r),e}function GJ(r){return r&&(r.nodeType===Ot.DOCUMENT_NODE||r.nodeType===Ot.DOCUMENT_FRAGMENT_NODE||r.nodeType===Ot.ELEMENT_NODE)}function HJ(r){return r&&(ns(r)||WC(r)||Xs(r)||r.nodeType===Ot.DOCUMENT_FRAGMENT_NODE||r.nodeType===Ot.COMMENT_NODE||r.nodeType===Ot.PROCESSING_INSTRUCTION_NODE)}function Xs(r){return r&&r.nodeType===Ot.DOCUMENT_TYPE_NODE}function ns(r){return r&&r.nodeType===Ot.ELEMENT_NODE}function WC(r){return r&&r.nodeType===Ot.TEXT_NODE}function jP(r,e){var t=r.childNodes||[];if(is(t,ns)||Xs(e))return!1;var i=is(t,Xs);return!(e&&i&&t.indexOf(i)>t.indexOf(e))}function XP(r,e){var t=r.childNodes||[];function i(a){return ns(a)&&a!==e}if(is(t,i))return!1;var n=is(t,Xs);return!(e&&n&&t.indexOf(n)>t.indexOf(e))}function $J(r,e,t){if(!GJ(r))throw new yr(Vi,"Unexpected parent node type "+r.nodeType);if(t&&t.parentNode!==r)throw new yr(U4,"child not in parent");if(!HJ(e)||Xs(e)&&r.nodeType!==Ot.DOCUMENT_NODE)throw new yr(Vi,"Unexpected node type "+e.nodeType+" for parent node type "+r.nodeType)}function WJ(r,e,t){var i=r.childNodes||[],n=e.childNodes||[];if(e.nodeType===Ot.DOCUMENT_FRAGMENT_NODE){var a=n.filter(ns);if(a.length>1||is(n,WC))throw new yr(Vi,"More than one element or text in fragment");if(a.length===1&&!jP(r,t))throw new yr(Vi,"Element in fragment can not be inserted before doctype")}if(ns(e)&&!jP(r,t))throw new yr(Vi,"Only one element can be added and only after doctype");if(Xs(e)){if(is(i,Xs))throw new yr(Vi,"Only one doctype is allowed");var s=is(i,ns);if(t&&i.indexOf(s)<i.indexOf(t))throw new yr(Vi,"Doctype can only be inserted before an element");if(!t&&s)throw new yr(Vi,"Doctype can not be appended since element is present")}}function W4(r,e,t){var i=r.childNodes||[],n=e.childNodes||[];if(e.nodeType===Ot.DOCUMENT_FRAGMENT_NODE){var a=n.filter(ns);if(a.length>1||is(n,WC))throw new yr(Vi,"More than one element or text in fragment");if(a.length===1&&!XP(r,t))throw new yr(Vi,"Element in fragment can not be inserted before doctype")}if(ns(e)&&!XP(r,t))throw new yr(Vi,"Only one element can be added and only after doctype");if(Xs(e)){let l=function(u){return Xs(u)&&u!==t};var o=l;if(is(i,l))throw new yr(Vi,"Only one doctype is allowed");var s=is(i,ns);if(t&&i.indexOf(s)<i.indexOf(t))throw new yr(Vi,"Doctype can only be inserted before an element")}}function i0(r,e,t,i){$J(r,e,t),r.nodeType===Ot.DOCUMENT_NODE&&(i||WJ)(r,e,t);var n=e.parentNode;if(n&&n.removeChild(e),e.nodeType===js){var a=e.firstChild;if(a==null)return e;var s=e.lastChild}else a=s=e;var o=t?t.previousSibling:r.lastChild;a.previousSibling=o,s.nextSibling=t,o?o.nextSibling=a:r.firstChild=a,t==null?r.lastChild=s:t.previousSibling=s;do a.parentNode=r;while(a!==s&&(a=a.nextSibling));return $C(r.ownerDocument||r,r),e.nodeType==js&&(e.firstChild=e.lastChild=null),e}function qJ(r,e){return e.parentNode&&e.parentNode.removeChild(e),e.parentNode=r,e.previousSibling=r.lastChild,e.nextSibling=null,e.previousSibling?e.previousSibling.nextSibling=e:r.firstChild=e,r.lastChild=e,$C(r.ownerDocument,r,e),e}ig.prototype={nodeName:"#document",nodeType:B4,doctype:null,documentElement:null,_inc:1,insertBefore:function(r,e){if(r.nodeType==js){for(var t=r.firstChild;t;){var i=t.nextSibling;this.insertBefore(t,e),t=i}return r}return i0(this,r,e),r.ownerDocument=this,this.documentElement===null&&r.nodeType===_a&&(this.documentElement=r),r},removeChild:function(r){return this.documentElement==r&&(this.documentElement=null),$4(this,r)},replaceChild:function(r,e){i0(this,r,e,W4),r.ownerDocument=this,e&&this.removeChild(e),ns(r)&&(this.documentElement=r)},importNode:function(r,e){return K4(this,r,e)},getElementById:function(r){var e=null;return sv(this.documentElement,function(t){if(t.nodeType==_a&&t.getAttribute("id")==r)return e=t,!0}),e},getElementsByClassName:function(r){var e=HP(r);return new Zh(this,function(t){var i=[];return e.length>0&&sv(t.documentElement,function(n){if(n!==t&&n.nodeType===_a){var a=n.getAttribute("class");if(a){var s=r===a;if(!s){var o=HP(a);s=e.every(FJ(o))}s&&i.push(n)}}}),i})},createElement:function(r){var e=new Qu;e.ownerDocument=this,e.nodeName=r,e.tagName=r,e.localName=r,e.childNodes=new Gs;var t=e.attributes=new r0;return t._ownerElement=e,e},createDocumentFragment:function(){var r=new $_;return r.ownerDocument=this,r.childNodes=new Gs,r},createTextNode:function(r){var e=new qC;return e.ownerDocument=this,e.appendData(r),e},createComment:function(r){var e=new jC;return e.ownerDocument=this,e.appendData(r),e},createCDATASection:function(r){var e=new XC;return e.ownerDocument=this,e.appendData(r),e},createProcessingInstruction:function(r,e){var t=new KC;return t.ownerDocument=this,t.tagName=t.nodeName=t.target=r,t.nodeValue=t.data=e,t},createAttribute:function(r){var e=new n0;return e.ownerDocument=this,e.name=r,e.nodeName=r,e.localName=r,e.specified=!0,e},createEntityReference:function(r){var e=new YC;return e.ownerDocument=this,e.nodeName=r,e},createElementNS:function(r,e){var t=new Qu,i=e.split(":"),n=t.attributes=new r0;return t.childNodes=new Gs,t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.namespaceURI=r,i.length==2?(t.prefix=i[0],t.localName=i[1]):t.localName=e,n._ownerElement=t,t},createAttributeNS:function(r,e){var t=new n0,i=e.split(":");return t.ownerDocument=this,t.nodeName=e,t.name=e,t.namespaceURI=r,t.specified=!0,i.length==2?(t.prefix=i[0],t.localName=i[1]):t.localName=e,t}};tn(ig,Ot);function Qu(){this._nsMap={}}Qu.prototype={nodeType:_a,hasAttribute:function(r){return this.getAttributeNode(r)!=null},getAttribute:function(r){var e=this.getAttributeNode(r);return e&&e.value||""},getAttributeNode:function(r){return this.attributes.getNamedItem(r)},setAttribute:function(r,e){var t=this.ownerDocument.createAttribute(r);t.value=t.nodeValue=""+e,this.setAttributeNode(t)},removeAttribute:function(r){var e=this.getAttributeNode(r);e&&this.removeAttributeNode(e)},appendChild:function(r){return r.nodeType===js?this.insertBefore(r,null):qJ(this,r)},setAttributeNode:function(r){return this.attributes.setNamedItem(r)},setAttributeNodeNS:function(r){return this.attributes.setNamedItemNS(r)},removeAttributeNode:function(r){return this.attributes.removeNamedItem(r.nodeName)},removeAttributeNS:function(r,e){var t=this.getAttributeNodeNS(r,e);t&&this.removeAttributeNode(t)},hasAttributeNS:function(r,e){return this.getAttributeNodeNS(r,e)!=null},getAttributeNS:function(r,e){var t=this.getAttributeNodeNS(r,e);return t&&t.value||""},setAttributeNS:function(r,e,t){var i=this.ownerDocument.createAttributeNS(r,e);i.value=i.nodeValue=""+t,this.setAttributeNode(i)},getAttributeNodeNS:function(r,e){return this.attributes.getNamedItemNS(r,e)},getElementsByTagName:function(r){return new Zh(this,function(e){var t=[];return sv(e,function(i){i!==e&&i.nodeType==_a&&(r==="*"||i.tagName==r)&&t.push(i)}),t})},getElementsByTagNameNS:function(r,e){return new Zh(this,function(t){var i=[];return sv(t,function(n){n!==t&&n.nodeType===_a&&(r==="*"||n.namespaceURI===r)&&(e==="*"||n.localName==e)&&i.push(n)}),i})}};ig.prototype.getElementsByTagName=Qu.prototype.getElementsByTagName;ig.prototype.getElementsByTagNameNS=Qu.prototype.getElementsByTagNameNS;tn(Qu,Ot);function n0(){}n0.prototype.nodeType=Kh;tn(n0,Ot);function ng(){}ng.prototype={data:"",substringData:function(r,e){return this.data.substring(r,r+e)},appendData:function(r){r=this.data+r,this.nodeValue=this.data=r,this.length=r.length},insertData:function(r,e){this.replaceData(r,0,e)},appendChild:function(r){throw new Error(Wr[Vi])},deleteData:function(r,e){this.replaceData(r,e,"")},replaceData:function(r,e,t){var i=this.data.substring(0,r),n=this.data.substring(r+e);t=i+t+n,this.nodeValue=this.data=t,this.length=t.length}};tn(ng,Ot);function qC(){}qC.prototype={nodeName:"#text",nodeType:t0,splitText:function(r){var e=this.data,t=e.substring(r);e=e.substring(0,r),this.data=this.nodeValue=e,this.length=e.length;var i=this.ownerDocument.createTextNode(t);return this.parentNode&&this.parentNode.insertBefore(i,this.nextSibling),i}};tn(qC,ng);function jC(){}jC.prototype={nodeName:"#comment",nodeType:N4};tn(jC,ng);function XC(){}XC.prototype={nodeName:"#cdata-section",nodeType:k4};tn(XC,ng);function H_(){}H_.prototype.nodeType=F4;tn(H_,Ot);function q4(){}q4.prototype.nodeType=VJ;tn(q4,Ot);function j4(){}j4.prototype.nodeType=UJ;tn(j4,Ot);function YC(){}YC.prototype.nodeType=R4;tn(YC,Ot);function $_(){}$_.prototype.nodeName="#document-fragment";$_.prototype.nodeType=js;tn($_,Ot);function KC(){}KC.prototype.nodeType=O4;tn(KC,Ot);function X4(){}X4.prototype.serializeToString=function(r,e,t){return Y4.call(r,e,t)};Ot.prototype.toString=Y4;function Y4(r,e){var t=[],i=this.nodeType==9&&this.documentElement||this,n=i.prefix,a=i.namespaceURI;if(a&&n==null){var n=i.lookupPrefix(a);if(n==null)var s=[{namespace:a,prefix:null}]}return mh(this,t,r,e,s),t.join("")}function YP(r,e,t){var i=r.prefix||"",n=r.namespaceURI;if(!n||i==="xml"&&n===av.XML||n===av.XMLNS)return!1;for(var a=t.length;a--;){var s=t[a];if(s.prefix===i)return s.namespace!==n}return!0}function Rb(r,e,t){r.push(" ",e,'="',t.replace(/[<>&"\t\n\r]/g,G4),'"')}function mh(r,e,t,i,n){if(n||(n=[]),i)if(r=i(r),r){if(typeof r=="string"){e.push(r);return}}else return;switch(r.nodeType){case _a:var a=r.attributes,s=a.length,m=r.firstChild,o=r.tagName;t=av.isHTML(r.namespaceURI)||t;var l=o;if(!t&&!r.prefix&&r.namespaceURI){for(var u,c=0;c<a.length;c++)if(a.item(c).name==="xmlns"){u=a.item(c).value;break}if(!u)for(var h=n.length-1;h>=0;h--){var d=n[h];if(d.prefix===""&&d.namespace===r.namespaceURI){u=d.namespace;break}}if(u!==r.namespaceURI)for(var h=n.length-1;h>=0;h--){var d=n[h];if(d.namespace===r.namespaceURI){d.prefix&&(l=d.prefix+":"+o);break}}}e.push("<",l);for(var f=0;f<s;f++){var p=a.item(f);p.prefix=="xmlns"?n.push({prefix:p.localName,namespace:p.value}):p.nodeName=="xmlns"&&n.push({prefix:"",namespace:p.value})}for(var f=0;f<s;f++){var p=a.item(f);if(YP(p,t,n)){var v=p.prefix||"",g=p.namespaceURI;Rb(e,v?"xmlns:"+v:"xmlns",g),n.push({prefix:v,namespace:g})}mh(p,e,t,i,n)}if(o===l&&YP(r,t,n)){var v=r.prefix||"",g=r.namespaceURI;Rb(e,v?"xmlns:"+v:"xmlns",g),n.push({prefix:v,namespace:g})}if(m||t&&!/^(?:meta|link|img|br|hr|input)$/i.test(o)){if(e.push(">"),t&&/^script$/i.test(o))for(;m;)m.data?e.push(m.data):mh(m,e,t,i,n.slice()),m=m.nextSibling;else for(;m;)mh(m,e,t,i,n.slice()),m=m.nextSibling;e.push("</",l,">")}else e.push("/>");return;case B4:case js:for(var m=r.firstChild;m;)mh(m,e,t,i,n.slice()),m=m.nextSibling;return;case Kh:return Rb(e,r.name,r.value);case t0:return e.push(r.data.replace(/[<&>]/g,G4));case k4:return e.push("<![CDATA[",r.data,"]]>");case N4:return e.push("<!--",r.data,"-->");case F4:var y=r.publicId,_=r.systemId;if(e.push("<!DOCTYPE ",r.name),y)e.push(" PUBLIC ",y),_&&_!="."&&e.push(" ",_),e.push(">");else if(_&&_!=".")e.push(" SYSTEM ",_,">");else{var b=r.internalSubset;b&&e.push(" [",b,"]"),e.push(">")}return;case O4:return e.push("<?",r.target," ",r.data,"?>");case R4:return e.push("&",r.nodeName,";");default:e.push("??",r.nodeName)}}function K4(r,e,t){var i;switch(e.nodeType){case _a:i=e.cloneNode(!1),i.ownerDocument=r;case js:break;case Kh:t=!0;break}if(i||(i=e.cloneNode(!1)),i.ownerDocument=r,i.parentNode=null,t)for(var n=e.firstChild;n;)i.appendChild(K4(r,n,t)),n=n.nextSibling;return i}function jx(r,e,t){var i=new e.constructor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var a=e[n];typeof a!="object"&&a!=i[n]&&(i[n]=a)}switch(e.childNodes&&(i.childNodes=new Gs),i.ownerDocument=r,i.nodeType){case _a:var s=e.attributes,o=i.attributes=new r0,l=s.length;o._ownerElement=i;for(var u=0;u<l;u++)i.setAttributeNode(jx(r,s.item(u),!0));break;case Kh:t=!0}if(t)for(var c=e.firstChild;c;)i.appendChild(jx(r,c,t)),c=c.nextSibling;return i}function Z4(r,e,t){r[e]=t}try{if(Object.defineProperty){let r=function(e){switch(e.nodeType){case _a:case js:var t=[];for(e=e.firstChild;e;)e.nodeType!==7&&e.nodeType!==8&&t.push(r(e)),e=e.nextSibling;return t.join("");default:return e.nodeValue}};var ODe=r;Object.defineProperty(Zh.prototype,"length",{get:function(){return HC(this),this.$$length}}),Object.defineProperty(Ot.prototype,"textContent",{get:function(){return r(this)},set:function(e){switch(this.nodeType){case _a:case js:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),Z4=function(e,t,i){e["$$"+t]=i}}}catch{}hl.DocumentType=H_;hl.DOMException=yr;hl.DOMImplementation=z4;hl.Element=Qu;hl.Node=Ot;hl.NodeList=Gs;hl.XMLSerializer=X4;var W_={},Q4={};(function(r){var e=so.freeze;r.XML_ENTITIES=e({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),r.HTML_ENTITIES=e({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"",InvisibleTimes:"",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
|
||
`,nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:" ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"",zwnj:""}),r.entityMap=r.HTML_ENTITIES})(Q4);var ZC={},ov=so.NAMESPACE,Xx=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,KP=new RegExp("[\\-\\.0-9"+Xx.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),ZP=new RegExp("^"+Xx.source+KP.source+"*(?::"+Xx.source+KP.source+"*)?$"),_d=0,vo=1,Mc=2,bd=3,Lc=4,kc=5,Sd=6,nm=7;function Qh(r,e){this.message=r,this.locator=e,Error.captureStackTrace&&Error.captureStackTrace(this,Qh)}Qh.prototype=new Error;Qh.prototype.name=Qh.name;function J4(){}J4.prototype={parse:function(r,e,t){var i=this.domBuilder;i.startDocument(),eF(e,e={}),jJ(r,e,t,i,this.errorHandler),i.endDocument()}};function jJ(r,e,t,i,n){function a(U){if(U>65535){U-=65536;var $=55296+(U>>10),q=56320+(U&1023);return String.fromCharCode($,q)}else return String.fromCharCode(U)}function s(U){var $=U.slice(1,-1);return Object.hasOwnProperty.call(t,$)?t[$]:$.charAt(0)==="#"?a(parseInt($.substr(1).replace("x","0x"))):(n.error("entity not found:"+U),U)}function o(U){if(U>v){var $=r.substring(v,U).replace(/&#?\w+;/g,s);d&&l(v),i.characters($,0,U-v),v=U}}function l(U,$){for(;U>=c&&($=h.exec(r));)u=$.index,c=u+$[0].length,d.lineNumber++;d.columnNumber=U-u+1}for(var u=0,c=0,h=/.*(?:\r\n?|\n)|.*$/g,d=i.locator,f=[{currentNSMap:e}],p={},v=0;;){try{var g=r.indexOf("<",v);if(g<0){if(!r.substr(v).match(/^\s*$/)){var m=i.doc,y=m.createTextNode(r.substr(v));m.appendChild(y),i.currentElement=y}return}switch(g>v&&o(g),r.charAt(g+1)){case"/":var L=r.indexOf(">",g+3),_=r.substring(g+2,L).replace(/[ \t\n\r]+$/g,""),b=f.pop();L<0?(_=r.substring(g+2).replace(/[\s<].*/,""),n.error("end tag name: "+_+" is not complete:"+b.tagName),L=g+1+_.length):_.match(/\s</)&&(_=_.replace(/[\s<].*/,""),n.error("end tag name: "+_+" maybe not complete"),L=g+1+_.length);var T=b.localNSMap,x=b.tagName==_,C=x||b.tagName&&b.tagName.toLowerCase()==_.toLowerCase();if(C){if(i.endElement(b.uri,b.localName,_),T)for(var D in T)Object.prototype.hasOwnProperty.call(T,D)&&i.endPrefixMapping(D);x||n.fatalError("end tag name: "+_+" is not match the current start tagName:"+b.tagName)}else f.push(b);L++;break;case"?":d&&l(g),L=QJ(r,g,i);break;case"!":d&&l(g),L=ZJ(r,g,i,n);break;default:d&&l(g);var I=new tF,M=f[f.length-1].currentNSMap,L=XJ(r,g,I,M,s,n),N=I.length;if(!I.closed&&KJ(r,L,I.tagName,p)&&(I.closed=!0,t.nbsp||n.warning("unclosed xml attribute")),d&&N){for(var O=QP(d,{}),B=0;B<N;B++){var F=I[B];l(F.offset),F.locator=QP(d,{})}i.locator=O,JP(I,i,M)&&f.push(I),i.locator=d}else JP(I,i,M)&&f.push(I);ov.isHTML(I.uri)&&!I.closed?L=YJ(r,L,I.tagName,s,i):L++}}catch(U){if(U instanceof Qh)throw U;n.error("element parse error: "+U),L=-1}L>v?v=L:o(Math.max(g,v)+1)}}function QP(r,e){return e.lineNumber=r.lineNumber,e.columnNumber=r.columnNumber,e}function XJ(r,e,t,i,n,a){function s(d,f,p){t.attributeNames.hasOwnProperty(d)&&a.fatalError("Attribute "+d+" redefined"),t.addValue(d,f.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,n),p)}for(var o,l,u=++e,c=_d;;){var h=r.charAt(u);switch(h){case"=":if(c===vo)o=r.slice(e,u),c=bd;else if(c===Mc)c=bd;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(c===bd||c===vo)if(c===vo&&(a.warning('attribute value must after "="'),o=r.slice(e,u)),e=u+1,u=r.indexOf(h,e),u>0)l=r.slice(e,u),s(o,l,e-1),c=kc;else throw new Error("attribute value no end '"+h+"' match");else if(c==Lc)l=r.slice(e,u),s(o,l,e),a.warning('attribute "'+o+'" missed start quot('+h+")!!"),e=u+1,c=kc;else throw new Error('attribute value must after "="');break;case"/":switch(c){case _d:t.setTagName(r.slice(e,u));case kc:case Sd:case nm:c=nm,t.closed=!0;case Lc:case vo:break;case Mc:t.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return a.error("unexpected end of input"),c==_d&&t.setTagName(r.slice(e,u)),u;case">":switch(c){case _d:t.setTagName(r.slice(e,u));case kc:case Sd:case nm:break;case Lc:case vo:l=r.slice(e,u),l.slice(-1)==="/"&&(t.closed=!0,l=l.slice(0,-1));case Mc:c===Mc&&(l=o),c==Lc?(a.warning('attribute "'+l+'" missed quot(")!'),s(o,l,e)):((!ov.isHTML(i[""])||!l.match(/^(?:disabled|checked|selected)$/i))&&a.warning('attribute "'+l+'" missed value!! "'+l+'" instead!!'),s(l,l,e));break;case bd:throw new Error("attribute value missed!!")}return u;case"":h=" ";default:if(h<=" ")switch(c){case _d:t.setTagName(r.slice(e,u)),c=Sd;break;case vo:o=r.slice(e,u),c=Mc;break;case Lc:var l=r.slice(e,u);a.warning('attribute "'+l+'" missed quot(")!!'),s(o,l,e);case kc:c=Sd;break}else switch(c){case Mc:t.tagName,(!ov.isHTML(i[""])||!o.match(/^(?:disabled|checked|selected)$/i))&&a.warning('attribute "'+o+'" missed value!! "'+o+'" instead2!!'),s(o,o,e),e=u,c=vo;break;case kc:a.warning('attribute space is required"'+o+'"!!');case Sd:c=vo,e=u;break;case bd:c=Lc,e=u;break;case nm:throw new Error("elements closed character '/' and '>' must be connected to")}}u++}}function JP(r,e,t){for(var i=r.tagName,n=null,h=r.length;h--;){var a=r[h],s=a.qName,o=a.value,d=s.indexOf(":");if(d>0)var l=a.prefix=s.slice(0,d),u=s.slice(d+1),c=l==="xmlns"&&u;else u=s,l=null,c=s==="xmlns"&&"";a.localName=u,c!==!1&&(n==null&&(n={},eF(t,t={})),t[c]=n[c]=o,a.uri=ov.XMLNS,e.startPrefixMapping(c,o))}for(var h=r.length;h--;){a=r[h];var l=a.prefix;l&&(l==="xml"&&(a.uri=ov.XML),l!=="xmlns"&&(a.uri=t[l||""]))}var d=i.indexOf(":");d>0?(l=r.prefix=i.slice(0,d),u=r.localName=i.slice(d+1)):(l=null,u=r.localName=i);var f=r.uri=t[l||""];if(e.startElement(f,u,i,r),r.closed){if(e.endElement(f,u,i),n)for(l in n)Object.prototype.hasOwnProperty.call(n,l)&&e.endPrefixMapping(l)}else return r.currentNSMap=t,r.localNSMap=n,!0}function YJ(r,e,t,i,n){if(/^(?:script|textarea)$/i.test(t)){var a=r.indexOf("</"+t+">",e),s=r.substring(e+1,a);if(/[&<]/.test(s))return/^script$/i.test(t)?(n.characters(s,0,s.length),a):(s=s.replace(/&#?\w+;/g,i),n.characters(s,0,s.length),a)}return e+1}function KJ(r,e,t,i){var n=i[t];return n==null&&(n=r.lastIndexOf("</"+t+">"),n<e&&(n=r.lastIndexOf("</"+t)),i[t]=n),n<e}function eF(r,e){for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}function ZJ(r,e,t,i){var n=r.charAt(e+2);switch(n){case"-":if(r.charAt(e+3)==="-"){var a=r.indexOf("-->",e+4);return a>e?(t.comment(r,e+4,a-e-4),a+3):(i.error("Unclosed comment"),-1)}else return-1;default:if(r.substr(e+3,6)=="CDATA["){var a=r.indexOf("]]>",e+9);return t.startCDATA(),t.characters(r,e+9,a-e-9),t.endCDATA(),a+3}var s=JJ(r,e),o=s.length;if(o>1&&/!doctype/i.test(s[0][0])){var l=s[1][0],u=!1,c=!1;o>3&&(/^public$/i.test(s[2][0])?(u=s[3][0],c=o>4&&s[4][0]):/^system$/i.test(s[2][0])&&(c=s[3][0]));var h=s[o-1];return t.startDTD(l,u,c),t.endDTD(),h.index+h[0].length}}return-1}function QJ(r,e,t){var i=r.indexOf("?>",e);if(i){var n=r.substring(e,i).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return n?(n[0].length,t.processingInstruction(n[1],n[2]),i+2):-1}return-1}function tF(){this.attributeNames={}}tF.prototype={setTagName:function(r){if(!ZP.test(r))throw new Error("invalid tagName:"+r);this.tagName=r},addValue:function(r,e,t){if(!ZP.test(r))throw new Error("invalid attribute:"+r);this.attributeNames[r]=this.length,this[this.length++]={qName:r,value:e,offset:t}},length:0,getLocalName:function(r){return this[r].localName},getLocator:function(r){return this[r].locator},getQName:function(r){return this[r].qName},getURI:function(r){return this[r].uri},getValue:function(r){return this[r].value}};function JJ(r,e){var t,i=[],n=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(n.lastIndex=e,n.exec(r);t=n.exec(r);)if(i.push(t),t[1])return i}ZC.XMLReader=J4;ZC.ParseError=Qh;var eee=so,tee=hl,eM=Q4,rF=ZC,ree=tee.DOMImplementation,tM=eee.NAMESPACE,iee=rF.ParseError,nee=rF.XMLReader;function iF(r){return r.replace(/\r[\n\u0085]/g,`
|
||
`).replace(/[\r\u0085\u2028]/g,`
|
||
`)}function nF(r){this.options=r||{locator:{}}}nF.prototype.parseFromString=function(r,e){var t=this.options,i=new nee,n=t.domBuilder||new ag,a=t.errorHandler,s=t.locator,o=t.xmlns||{},l=/\/x?html?$/.test(e),u=l?eM.HTML_ENTITIES:eM.XML_ENTITIES;s&&n.setDocumentLocator(s),i.errorHandler=aee(a,n,s),i.domBuilder=t.domBuilder||n,l&&(o[""]=tM.HTML),o.xml=o.xml||tM.XML;var c=t.normalizeLineEndings||iF;return r&&typeof r=="string"?i.parse(c(r),o,u):i.errorHandler.error("invalid doc source"),n.doc};function aee(r,e,t){if(!r){if(e instanceof ag)return e;r=e}var i={},n=r instanceof Function;t=t||{};function a(s){var o=r[s];!o&&n&&(o=r.length==2?function(l){r(s,l)}:r),i[s]=o&&function(l){o("[xmldom "+s+"] "+l+Yx(t))}||function(){}}return a("warning"),a("error"),a("fatalError"),i}function ag(){this.cdata=!1}function Rc(r,e){e.lineNumber=r.lineNumber,e.columnNumber=r.columnNumber}ag.prototype={startDocument:function(){this.doc=new ree().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(r,e,t,i){var n=this.doc,a=n.createElementNS(r,t||e),s=i.length;am(this,a),this.currentElement=a,this.locator&&Rc(this.locator,a);for(var o=0;o<s;o++){var r=i.getURI(o),l=i.getValue(o),t=i.getQName(o),u=n.createAttributeNS(r,t);this.locator&&Rc(i.getLocator(o),u),u.value=u.nodeValue=l,a.setAttributeNode(u)}},endElement:function(r,e,t){var i=this.currentElement;i.tagName,this.currentElement=i.parentNode},startPrefixMapping:function(r,e){},endPrefixMapping:function(r){},processingInstruction:function(r,e){var t=this.doc.createProcessingInstruction(r,e);this.locator&&Rc(this.locator,t),am(this,t)},ignorableWhitespace:function(r,e,t){},characters:function(r,e,t){if(r=rM.apply(this,arguments),r){if(this.cdata)var i=this.doc.createCDATASection(r);else var i=this.doc.createTextNode(r);this.currentElement?this.currentElement.appendChild(i):/^\s*$/.test(r)&&this.doc.appendChild(i),this.locator&&Rc(this.locator,i)}},skippedEntity:function(r){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(r){(this.locator=r)&&(r.lineNumber=0)},comment:function(r,e,t){r=rM.apply(this,arguments);var i=this.doc.createComment(r);this.locator&&Rc(this.locator,i),am(this,i)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(r,e,t){var i=this.doc.implementation;if(i&&i.createDocumentType){var n=i.createDocumentType(r,e,t);this.locator&&Rc(this.locator,n),am(this,n),this.doc.doctype=n}},warning:function(r){console.warn("[xmldom warning] "+r,Yx(this.locator))},error:function(r){console.error("[xmldom error] "+r,Yx(this.locator))},fatalError:function(r){throw new iee(r,this.locator)}};function Yx(r){if(r)return`
|
||
@`+(r.systemId||"")+"#[line:"+r.lineNumber+",col:"+r.columnNumber+"]"}function rM(r,e,t){return typeof r=="string"?r.substr(e,t):r.length>=e+t||e?new java.lang.String(r,e,t)+"":r}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(r){ag.prototype[r]=function(){return null}});function am(r,e){r.currentElement?r.currentElement.appendChild(e):r.doc.appendChild(e)}W_.__DOMHandler=ag;W_.normalizeLineEndings=iF;W_.DOMParser=nF;var see=W_.DOMParser;/*! @name mpd-parser @version 1.3.1 @license Apache-2.0 */const iM=r=>!!r&&typeof r=="object",Hr=(...r)=>r.reduce((e,t)=>(typeof t!="object"||Object.keys(t).forEach(i=>{Array.isArray(e[i])&&Array.isArray(t[i])?e[i]=e[i].concat(t[i]):iM(e[i])&&iM(t[i])?e[i]=Hr(e[i],t[i]):e[i]=t[i]}),e),{}),aF=r=>Object.keys(r).map(e=>r[e]),oee=(r,e)=>{const t=[];for(let i=r;i<e;i++)t.push(i);return t},Jh=r=>r.reduce((e,t)=>e.concat(t),[]),sF=r=>{if(!r.length)return[];const e=[];for(let t=0;t<r.length;t++)e.push(r[t]);return e},lee=(r,e)=>r.reduce((t,i,n)=>(i[e]&&t.push(n),t),[]),uee=(r,e)=>aF(r.reduce((t,i)=>(i.forEach(n=>{t[e(n)]=n}),t),{}));var ef={INVALID_NUMBER_OF_PERIOD:"INVALID_NUMBER_OF_PERIOD",INVALID_NUMBER_OF_CONTENT_STEERING:"INVALID_NUMBER_OF_CONTENT_STEERING",DASH_EMPTY_MANIFEST:"DASH_EMPTY_MANIFEST",DASH_INVALID_XML:"DASH_INVALID_XML",NO_BASE_URL:"NO_BASE_URL",MISSING_SEGMENT_INFORMATION:"MISSING_SEGMENT_INFORMATION",SEGMENT_TIME_UNSPECIFIED:"SEGMENT_TIME_UNSPECIFIED",UNSUPPORTED_UTC_TIMING_SCHEME:"UNSUPPORTED_UTC_TIMING_SCHEME"};const lv=({baseUrl:r="",source:e="",range:t="",indexRange:i=""})=>{const n={uri:e,resolvedUri:G_(r||"",e)};if(t||i){const s=(t||i).split("-");let o=H.BigInt?H.BigInt(s[0]):parseInt(s[0],10),l=H.BigInt?H.BigInt(s[1]):parseInt(s[1],10);o<Number.MAX_SAFE_INTEGER&&typeof o=="bigint"&&(o=Number(o)),l<Number.MAX_SAFE_INTEGER&&typeof l=="bigint"&&(l=Number(l));let u;typeof l=="bigint"||typeof o=="bigint"?u=H.BigInt(l)-H.BigInt(o)+H.BigInt(1):u=l-o+1,typeof u=="bigint"&&u<Number.MAX_SAFE_INTEGER&&(u=Number(u)),n.byterange={length:u,offset:o}}return n},cee=r=>{let e;return typeof r.offset=="bigint"||typeof r.length=="bigint"?e=H.BigInt(r.offset)+H.BigInt(r.length)-H.BigInt(1):e=r.offset+r.length-1,`${r.offset}-${e}`},nM=r=>(r&&typeof r!="number"&&(r=parseInt(r,10)),isNaN(r)?null:r),hee={static(r){const{duration:e,timescale:t=1,sourceDuration:i,periodDuration:n}=r,a=nM(r.endNumber),s=e/t;return typeof a=="number"?{start:0,end:a}:typeof n=="number"?{start:0,end:n/s}:{start:0,end:i/s}},dynamic(r){const{NOW:e,clientOffset:t,availabilityStartTime:i,timescale:n=1,duration:a,periodStart:s=0,minimumUpdatePeriod:o=0,timeShiftBufferDepth:l=1/0}=r,u=nM(r.endNumber),c=(e+t)/1e3,h=i+s,f=c+o-h,p=Math.ceil(f*n/a),v=Math.floor((c-h-l)*n/a),g=Math.floor((c-h)*n/a);return{start:Math.max(0,v),end:typeof u=="number"?u:Math.min(p,g)}}},fee=r=>e=>{const{duration:t,timescale:i=1,periodStart:n,startNumber:a=1}=r;return{number:a+e,duration:t/i,timeline:n,time:e*t}},QC=r=>{const{type:e,duration:t,timescale:i=1,periodDuration:n,sourceDuration:a}=r,{start:s,end:o}=hee[e](r),l=oee(s,o).map(fee(r));if(e==="static"){const u=l.length-1,c=typeof n=="number"?n:a;l[u].duration=c-t/i*u}return l},oF=r=>{const{baseUrl:e,initialization:t={},sourceDuration:i,indexRange:n="",periodStart:a,presentationTime:s,number:o=0,duration:l}=r;if(!e)throw new Error(ef.NO_BASE_URL);const u=lv({baseUrl:e,source:t.sourceURL,range:t.range}),c=lv({baseUrl:e,source:e,indexRange:n});if(c.map=u,l){const h=QC(r);h.length&&(c.duration=h[0].duration,c.timeline=h[0].timeline)}else i&&(c.duration=i,c.timeline=a);return c.presentationTime=s||a,c.number=o,[c]},JC=(r,e,t)=>{const i=r.sidx.map?r.sidx.map:null,n=r.sidx.duration,a=r.timeline||0,s=r.sidx.byterange,o=s.offset+s.length,l=e.timescale,u=e.references.filter(g=>g.referenceType!==1),c=[],h=r.endList?"static":"dynamic",d=r.sidx.timeline;let f=d,p=r.mediaSequence||0,v;typeof e.firstOffset=="bigint"?v=H.BigInt(o)+e.firstOffset:v=o+e.firstOffset;for(let g=0;g<u.length;g++){const m=e.references[g],y=m.referencedSize,_=m.subsegmentDuration;let b;typeof v=="bigint"?b=v+H.BigInt(y)-H.BigInt(1):b=v+y-1;const T=`${v}-${b}`,C=oF({baseUrl:t,timescale:l,timeline:a,periodStart:d,presentationTime:f,number:p,duration:_,sourceDuration:n,indexRange:T,type:h})[0];i&&(C.map=i),c.push(C),typeof v=="bigint"?v+=H.BigInt(y):v+=y,f+=_/l,p++}return r.segments=c,r},dee=["AUDIO","SUBTITLES"],pee=1/60,lF=r=>uee(r,({timeline:e})=>e).sort((e,t)=>e.timeline>t.timeline?1:-1),vee=(r,e)=>{for(let t=0;t<r.length;t++)if(r[t].attributes.NAME===e)return r[t];return null},aM=r=>{let e=[];return LJ(r,dee,(t,i,n,a)=>{e=e.concat(t.playlists||[])}),e},sM=({playlist:r,mediaSequence:e})=>{r.mediaSequence=e,r.segments.forEach((t,i)=>{t.number=r.mediaSequence+i})},gee=({oldPlaylists:r,newPlaylists:e,timelineStarts:t})=>{e.forEach(i=>{i.discontinuitySequence=t.findIndex(function({timeline:l}){return l===i.timeline});const n=vee(r,i.attributes.NAME);if(!n||i.sidx)return;const a=i.segments[0],s=n.segments.findIndex(function(l){return Math.abs(l.presentationTime-a.presentationTime)<pee});if(s===-1){sM({playlist:i,mediaSequence:n.mediaSequence+n.segments.length}),i.segments[0].discontinuity=!0,i.discontinuityStarts.unshift(0),(!n.segments.length&&i.timeline>n.timeline||n.segments.length&&i.timeline>n.segments[n.segments.length-1].timeline)&&i.discontinuitySequence--;return}n.segments[s].discontinuity&&!a.discontinuity&&(a.discontinuity=!0,i.discontinuityStarts.unshift(0),i.discontinuitySequence--),sM({playlist:i,mediaSequence:n.segments[s].number})})},mee=({oldManifest:r,newManifest:e})=>{const t=r.playlists.concat(aM(r)),i=e.playlists.concat(aM(e));return e.timelineStarts=lF([r.timelineStarts,e.timelineStarts]),gee({oldPlaylists:t,newPlaylists:i,timelineStarts:e.timelineStarts}),e},q_=r=>r&&r.uri+"-"+cee(r.byterange),Ob=r=>{const e=r.reduce(function(i,n){return i[n.attributes.baseUrl]||(i[n.attributes.baseUrl]=[]),i[n.attributes.baseUrl].push(n),i},{});let t=[];return Object.values(e).forEach(i=>{const n=aF(i.reduce((a,s)=>{const o=s.attributes.id+(s.attributes.lang||"");return a[o]?(s.segments&&(s.segments[0]&&(s.segments[0].discontinuity=!0),a[o].segments.push(...s.segments)),s.attributes.contentProtection&&(a[o].attributes.contentProtection=s.attributes.contentProtection)):(a[o]=s,a[o].attributes.timelineStarts=[]),a[o].attributes.timelineStarts.push({start:s.attributes.periodStart,timeline:s.attributes.periodStart}),a},{}));t=t.concat(n)}),t.map(i=>(i.discontinuityStarts=lee(i.segments||[],"discontinuity"),i))},eA=(r,e)=>{const t=q_(r.sidx),i=t&&e[t]&&e[t].sidx;return i&&JC(r,i,r.sidx.resolvedUri),r},yee=(r,e={})=>{if(!Object.keys(e).length)return r;for(const t in r)r[t]=eA(r[t],e);return r},_ee=({attributes:r,segments:e,sidx:t,mediaSequence:i,discontinuitySequence:n,discontinuityStarts:a},s)=>{const o={attributes:{NAME:r.id,BANDWIDTH:r.bandwidth,CODECS:r.codecs,"PROGRAM-ID":1},uri:"",endList:r.type==="static",timeline:r.periodStart,resolvedUri:r.baseUrl||"",targetDuration:r.duration,discontinuitySequence:n,discontinuityStarts:a,timelineStarts:r.timelineStarts,mediaSequence:i,segments:e};return r.contentProtection&&(o.contentProtection=r.contentProtection),r.serviceLocation&&(o.attributes.serviceLocation=r.serviceLocation),t&&(o.sidx=t),s&&(o.attributes.AUDIO="audio",o.attributes.SUBTITLES="subs"),o},bee=({attributes:r,segments:e,mediaSequence:t,discontinuityStarts:i,discontinuitySequence:n})=>{typeof e>"u"&&(e=[{uri:r.baseUrl,timeline:r.periodStart,resolvedUri:r.baseUrl||"",duration:r.sourceDuration,number:0}],r.duration=r.sourceDuration);const a={NAME:r.id,BANDWIDTH:r.bandwidth,"PROGRAM-ID":1};r.codecs&&(a.CODECS=r.codecs);const s={attributes:a,uri:"",endList:r.type==="static",timeline:r.periodStart,resolvedUri:r.baseUrl||"",targetDuration:r.duration,timelineStarts:r.timelineStarts,discontinuityStarts:i,discontinuitySequence:n,mediaSequence:t,segments:e};return r.serviceLocation&&(s.attributes.serviceLocation=r.serviceLocation),s},See=(r,e={},t=!1)=>{let i;const n=r.reduce((a,s)=>{const o=s.attributes.role&&s.attributes.role.value||"",l=s.attributes.lang||"";let u=s.attributes.label||"main";if(l&&!s.attributes.label){const h=o?` (${o})`:"";u=`${s.attributes.lang}${h}`}a[u]||(a[u]={language:l,autoselect:!0,default:o==="main",playlists:[],uri:""});const c=eA(_ee(s,t),e);return a[u].playlists.push(c),typeof i>"u"&&o==="main"&&(i=s,i.default=!0),a},{});if(!i){const a=Object.keys(n)[0];n[a].default=!0}return n},Tee=(r,e={})=>r.reduce((t,i)=>{const n=i.attributes.label||i.attributes.lang||"text",a=i.attributes.lang||"und";return t[n]||(t[n]={language:a,default:!1,autoselect:!1,playlists:[],uri:""}),t[n].playlists.push(eA(bee(i),e)),t},{}),xee=r=>r.reduce((e,t)=>(t&&t.forEach(i=>{const{channel:n,language:a}=i;e[a]={autoselect:!1,default:!1,instreamId:n,language:a},i.hasOwnProperty("aspectRatio")&&(e[a].aspectRatio=i.aspectRatio),i.hasOwnProperty("easyReader")&&(e[a].easyReader=i.easyReader),i.hasOwnProperty("3D")&&(e[a]["3D"]=i["3D"])}),e),{}),wee=({attributes:r,segments:e,sidx:t,discontinuityStarts:i})=>{const n={attributes:{NAME:r.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:r.width,height:r.height},CODECS:r.codecs,BANDWIDTH:r.bandwidth,"PROGRAM-ID":1},uri:"",endList:r.type==="static",timeline:r.periodStart,resolvedUri:r.baseUrl||"",targetDuration:r.duration,discontinuityStarts:i,timelineStarts:r.timelineStarts,segments:e};return r.frameRate&&(n.attributes["FRAME-RATE"]=r.frameRate),r.contentProtection&&(n.contentProtection=r.contentProtection),r.serviceLocation&&(n.attributes.serviceLocation=r.serviceLocation),t&&(n.sidx=t),n},Cee=({attributes:r})=>r.mimeType==="video/mp4"||r.mimeType==="video/webm"||r.contentType==="video",Aee=({attributes:r})=>r.mimeType==="audio/mp4"||r.mimeType==="audio/webm"||r.contentType==="audio",Dee=({attributes:r})=>r.mimeType==="text/vtt"||r.contentType==="text",Eee=(r,e)=>{r.forEach(t=>{t.mediaSequence=0,t.discontinuitySequence=e.findIndex(function({timeline:i}){return i===t.timeline}),t.segments&&t.segments.forEach((i,n)=>{i.number=n})})},oM=r=>r?Object.keys(r).reduce((e,t)=>{const i=r[t];return e.concat(i.playlists)},[]):[],Iee=({dashPlaylists:r,locations:e,contentSteering:t,sidxMapping:i={},previousManifest:n,eventStream:a})=>{if(!r.length)return{};const{sourceDuration:s,type:o,suggestedPresentationDelay:l,minimumUpdatePeriod:u}=r[0].attributes,c=Ob(r.filter(Cee)).map(wee),h=Ob(r.filter(Aee)),d=Ob(r.filter(Dee)),f=r.map(b=>b.attributes.captionServices).filter(Boolean),p={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:"",duration:s,playlists:yee(c,i)};u>=0&&(p.minimumUpdatePeriod=u*1e3),e&&(p.locations=e),t&&(p.contentSteering=t),o==="dynamic"&&(p.suggestedPresentationDelay=l),a&&a.length>0&&(p.eventStream=a);const v=p.playlists.length===0,g=h.length?See(h,i,v):null,m=d.length?Tee(d,i):null,y=c.concat(oM(g),oM(m)),_=y.map(({timelineStarts:b})=>b);return p.timelineStarts=lF(_),Eee(y,p.timelineStarts),g&&(p.mediaGroups.AUDIO.audio=g),m&&(p.mediaGroups.SUBTITLES.subs=m),f.length&&(p.mediaGroups["CLOSED-CAPTIONS"].cc=xee(f)),n?mee({oldManifest:n,newManifest:p}):p},Pee=(r,e,t)=>{const{NOW:i,clientOffset:n,availabilityStartTime:a,timescale:s=1,periodStart:o=0,minimumUpdatePeriod:l=0}=r,u=(i+n)/1e3,c=a+o,d=u+l-c;return Math.ceil((d*s-e)/t)},uF=(r,e)=>{const{type:t,minimumUpdatePeriod:i=0,media:n="",sourceDuration:a,timescale:s=1,startNumber:o=1,periodStart:l}=r,u=[];let c=-1;for(let h=0;h<e.length;h++){const d=e[h],f=d.d,p=d.r||0,v=d.t||0;c<0&&(c=v),v&&v>c&&(c=v);let g;if(p<0){const _=h+1;_===e.length?t==="dynamic"&&i>0&&n.indexOf("$Number$")>0?g=Pee(r,c,f):g=(a*s-c)/f:g=(e[_].t-c)/f}else g=p+1;const m=o+u.length+g;let y=o+u.length;for(;y<m;)u.push({number:y,duration:f/s,time:c,timeline:l}),c+=f,y++}return u},Mee=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,Lee=r=>(e,t,i,n)=>{if(e==="$$")return"$";if(typeof r[t]>"u")return e;const a=""+r[t];return t==="RepresentationID"||(i?n=parseInt(n,10):n=1,a.length>=n)?a:`${new Array(n-a.length+1).join("0")}${a}`},lM=(r,e)=>r.replace(Mee,Lee(e)),kee=(r,e)=>!r.duration&&!e?[{number:r.startNumber||1,duration:r.sourceDuration,time:0,timeline:r.periodStart}]:r.duration?QC(r):uF(r,e),Ree=(r,e)=>{const t={RepresentationID:r.id,Bandwidth:r.bandwidth||0},{initialization:i={sourceURL:"",range:""}}=r,n=lv({baseUrl:r.baseUrl,source:lM(i.sourceURL,t),range:i.range});return kee(r,e).map(s=>{t.Number=s.number,t.Time=s.time;const o=lM(r.media||"",t),l=r.timescale||1,u=r.presentationTimeOffset||0,c=r.periodStart+(s.time-u)/l;return{uri:o,timeline:s.timeline,duration:s.duration,resolvedUri:G_(r.baseUrl||"",o),map:n,number:s.number,presentationTime:c}})},Oee=(r,e)=>{const{baseUrl:t,initialization:i={}}=r,n=lv({baseUrl:t,source:i.sourceURL,range:i.range}),a=lv({baseUrl:t,source:e.media,range:e.mediaRange});return a.map=n,a},Nee=(r,e)=>{const{duration:t,segmentUrls:i=[],periodStart:n}=r;if(!t&&!e||t&&e)throw new Error(ef.SEGMENT_TIME_UNSPECIFIED);const a=i.map(l=>Oee(r,l));let s;return t&&(s=QC(r)),e&&(s=uF(r,e)),s.map((l,u)=>{if(a[u]){const c=a[u],h=r.timescale||1,d=r.presentationTimeOffset||0;return c.timeline=l.timeline,c.duration=l.duration,c.number=l.number,c.presentationTime=n+(l.time-d)/h,c}}).filter(l=>l)},Bee=({attributes:r,segmentInfo:e})=>{let t,i;e.template?(i=Ree,t=Hr(r,e.template)):e.base?(i=oF,t=Hr(r,e.base)):e.list&&(i=Nee,t=Hr(r,e.list));const n={attributes:r};if(!i)return n;const a=i(t,e.segmentTimeline);if(t.duration){const{duration:s,timescale:o=1}=t;t.duration=s/o}else a.length?t.duration=a.reduce((s,o)=>Math.max(s,Math.ceil(o.duration)),0):t.duration=0;return n.attributes=t,n.segments=a,e.base&&t.indexRange&&(n.sidx=a[0],n.segments=[]),n},Fee=r=>r.map(Bee),jt=(r,e)=>sF(r.childNodes).filter(({tagName:t})=>t===e),sg=r=>r.textContent.trim(),Uee=r=>parseFloat(r.split("/").reduce((e,t)=>e/t)),Oc=r=>{const o=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(r);if(!o)return 0;const[l,u,c,h,d,f]=o.slice(1);return parseFloat(l||0)*31536e3+parseFloat(u||0)*2592e3+parseFloat(c||0)*86400+parseFloat(h||0)*3600+parseFloat(d||0)*60+parseFloat(f||0)},Vee=r=>(/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(r)&&(r+="Z"),Date.parse(r)),uM={mediaPresentationDuration(r){return Oc(r)},availabilityStartTime(r){return Vee(r)/1e3},minimumUpdatePeriod(r){return Oc(r)},suggestedPresentationDelay(r){return Oc(r)},type(r){return r},timeShiftBufferDepth(r){return Oc(r)},start(r){return Oc(r)},width(r){return parseInt(r,10)},height(r){return parseInt(r,10)},bandwidth(r){return parseInt(r,10)},frameRate(r){return Uee(r)},startNumber(r){return parseInt(r,10)},timescale(r){return parseInt(r,10)},presentationTimeOffset(r){return parseInt(r,10)},duration(r){const e=parseInt(r,10);return isNaN(e)?Oc(r):e},d(r){return parseInt(r,10)},t(r){return parseInt(r,10)},r(r){return parseInt(r,10)},presentationTime(r){return parseInt(r,10)},DEFAULT(r){return r}},xr=r=>r&&r.attributes?sF(r.attributes).reduce((e,t)=>{const i=uM[t.name]||uM.DEFAULT;return e[t.name]=i(t.value),e},{}):{},zee={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime","urn:mpeg:dash:mp4protection:2011":"mp4protection"},j_=(r,e)=>e.length?Jh(r.map(function(t){return e.map(function(i){const n=sg(i),a=G_(t.baseUrl,n),s=Hr(xr(i),{baseUrl:a});return a!==n&&!s.serviceLocation&&t.serviceLocation&&(s.serviceLocation=t.serviceLocation),s})})):r,tA=r=>{const e=jt(r,"SegmentTemplate")[0],t=jt(r,"SegmentList")[0],i=t&&jt(t,"SegmentURL").map(h=>Hr({tag:"SegmentURL"},xr(h))),n=jt(r,"SegmentBase")[0],a=t||e,s=a&&jt(a,"SegmentTimeline")[0],o=t||n||e,l=o&&jt(o,"Initialization")[0],u=e&&xr(e);u&&l?u.initialization=l&&xr(l):u&&u.initialization&&(u.initialization={sourceURL:u.initialization});const c={template:u,segmentTimeline:s&&jt(s,"S").map(h=>xr(h)),list:t&&Hr(xr(t),{segmentUrls:i,initialization:xr(l)}),base:n&&Hr(xr(n),{initialization:xr(l)})};return Object.keys(c).forEach(h=>{c[h]||delete c[h]}),c},Gee=(r,e,t)=>i=>{const n=jt(i,"BaseURL"),a=j_(e,n),s=Hr(r,xr(i)),o=tA(i);return a.map(l=>({segmentInfo:Hr(t,o),attributes:Hr(s,l)}))},Hee=r=>r.reduce((e,t)=>{const i=xr(t);i.schemeIdUri&&(i.schemeIdUri=i.schemeIdUri.toLowerCase());const n=zee[i.schemeIdUri];if(n){e[n]={attributes:i};const a=jt(t,"cenc:pssh")[0];if(a){const s=sg(a);e[n].pssh=s&&w4(s)}}return e},{}),$ee=r=>{if(r.schemeIdUri==="urn:scte:dash:cc:cea-608:2015")return(typeof r.value!="string"?[]:r.value.split(";")).map(t=>{let i,n;return n=t,/^CC\d=/.test(t)?[i,n]=t.split("="):/^CC\d$/.test(t)&&(i=t),{channel:i,language:n}});if(r.schemeIdUri==="urn:scte:dash:cc:cea-708:2015")return(typeof r.value!="string"?[]:r.value.split(";")).map(t=>{const i={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};if(/=/.test(t)){const[n,a=""]=t.split("=");i.channel=n,i.language=t,a.split(",").forEach(s=>{const[o,l]=s.split(":");o==="lang"?i.language=l:o==="er"?i.easyReader=Number(l):o==="war"?i.aspectRatio=Number(l):o==="3D"&&(i["3D"]=Number(l))})}else i.language=t;return i.channel&&(i.channel="SERVICE"+i.channel),i})},Wee=r=>Jh(jt(r.node,"EventStream").map(e=>{const t=xr(e),i=t.schemeIdUri;return jt(e,"Event").map(n=>{const a=xr(n),s=a.presentationTime||0,o=t.timescale||1,l=a.duration||0,u=s/o+r.attributes.start;return{schemeIdUri:i,value:t.value,id:a.id,start:u,end:u+l/o,messageData:sg(n)||a.messageData,contentEncoding:t.contentEncoding,presentationTimeOffset:t.presentationTimeOffset||0}})})),qee=(r,e,t)=>i=>{const n=xr(i),a=j_(e,jt(i,"BaseURL")),s=jt(i,"Role")[0],o={role:xr(s)};let l=Hr(r,n,o);const u=jt(i,"Accessibility")[0],c=$ee(xr(u));c&&(l=Hr(l,{captionServices:c}));const h=jt(i,"Label")[0];if(h&&h.childNodes.length){const g=h.childNodes[0].nodeValue.trim();l=Hr(l,{label:g})}const d=Hee(jt(i,"ContentProtection"));Object.keys(d).length&&(l=Hr(l,{contentProtection:d}));const f=tA(i),p=jt(i,"Representation"),v=Hr(t,f);return Jh(p.map(Gee(l,a,v)))},jee=(r,e)=>(t,i)=>{const n=j_(e,jt(t.node,"BaseURL")),a=Hr(r,{periodStart:t.attributes.start});typeof t.attributes.duration=="number"&&(a.periodDuration=t.attributes.duration);const s=jt(t.node,"AdaptationSet"),o=tA(t.node);return Jh(s.map(qee(a,n,o)))},Xee=(r,e)=>{if(r.length>1&&e({type:"warn",message:"The MPD manifest should contain no more than one ContentSteering tag"}),!r.length)return null;const t=Hr({serverURL:sg(r[0])},xr(r[0]));return t.queryBeforeStart=t.queryBeforeStart==="true",t},Yee=({attributes:r,priorPeriodAttributes:e,mpdType:t})=>typeof r.start=="number"?r.start:e&&typeof e.start=="number"&&typeof e.duration=="number"?e.start+e.duration:!e&&t==="static"?0:null,Kee=(r,e={})=>{const{manifestUri:t="",NOW:i=Date.now(),clientOffset:n=0,eventHandler:a=function(){}}=e,s=jt(r,"Period");if(!s.length)throw new Error(ef.INVALID_NUMBER_OF_PERIOD);const o=jt(r,"Location"),l=xr(r),u=j_([{baseUrl:t}],jt(r,"BaseURL")),c=jt(r,"ContentSteering");l.type=l.type||"static",l.sourceDuration=l.mediaPresentationDuration||0,l.NOW=i,l.clientOffset=n,o.length&&(l.locations=o.map(sg));const h=[];return s.forEach((d,f)=>{const p=xr(d),v=h[f-1];p.start=Yee({attributes:p,priorPeriodAttributes:v?v.attributes:null,mpdType:l.type}),h.push({node:d,attributes:p})}),{locations:l.locations,contentSteeringInfo:Xee(c,a),representationInfo:Jh(h.map(jee(l,u))),eventStream:Jh(h.map(Wee))}},cF=r=>{if(r==="")throw new Error(ef.DASH_EMPTY_MANIFEST);const e=new see;let t,i;try{t=e.parseFromString(r,"application/xml"),i=t&&t.documentElement.tagName==="MPD"?t.documentElement:null}catch{}if(!i||i&&i.getElementsByTagName("parsererror").length>0)throw new Error(ef.DASH_INVALID_XML);return i},Zee=r=>{const e=jt(r,"UTCTiming")[0];if(!e)return null;const t=xr(e);switch(t.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":t.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":t.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":t.method="DIRECT",t.value=Date.parse(t.value);break;case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":default:throw new Error(ef.UNSUPPORTED_UTC_TIMING_SCHEME)}return t},Qee=(r,e={})=>{const t=Kee(cF(r),e),i=Fee(t.representationInfo);return Iee({dashPlaylists:i,locations:t.locations,contentSteering:t.contentSteeringInfo,sidxMapping:e.sidxMapping,previousManifest:e.previousManifest,eventStream:t.eventStream})},Jee=r=>Zee(cF(r));var hF=Math.pow(2,32),ete=function(r){var e=new DataView(r.buffer,r.byteOffset,r.byteLength),t;return e.getBigUint64?(t=e.getBigUint64(0),t<Number.MAX_SAFE_INTEGER?Number(t):t):e.getUint32(0)*hF+e.getUint32(4)},tte={getUint64:ete,MAX_UINT32:hF},cM=tte.getUint64,rte=function(r){var e=new DataView(r.buffer,r.byteOffset,r.byteLength),t={version:r[0],flags:new Uint8Array(r.subarray(1,4)),references:[],referenceId:e.getUint32(4),timescale:e.getUint32(8)},i=12;t.version===0?(t.earliestPresentationTime=e.getUint32(i),t.firstOffset=e.getUint32(i+4),i+=8):(t.earliestPresentationTime=cM(r.subarray(i)),t.firstOffset=cM(r.subarray(i+8)),i+=16),i+=2;var n=e.getUint16(i);for(i+=2;n>0;i+=12,n--)t.references.push({referenceType:(r[i]&128)>>>7,referencedSize:e.getUint32(i)&2147483647,subsegmentDuration:e.getUint32(i+4),startsWithSap:!!(r[i+8]&128),sapType:(r[i+8]&112)>>>4,sapDeltaTime:e.getUint32(i+8)&268435455});return t},ite=rte;const nte=tg(ite);var ate=qe([73,68,51]),ste=function(e,t){t===void 0&&(t=0),e=qe(e);var i=e[t+5],n=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9],a=(i&16)>>4;return a?n+20:n+10},ap=function r(e,t){return t===void 0&&(t=0),e=qe(e),e.length-t<10||!qt(e,ate,{offset:t})?t:(t+=ste(e,t),r(e,t))},hM=function(e){return typeof e=="string"?I4(e):e},ote=function(e){return Array.isArray(e)?e.map(function(t){return hM(t)}):[hM(e)]},lte=function r(e,t,i){i===void 0&&(i=!1),t=ote(t),e=qe(e);var n=[];if(!t.length)return n;for(var a=0;a<e.length;){var s=(e[a]<<24|e[a+1]<<16|e[a+2]<<8|e[a+3])>>>0,o=e.subarray(a+4,a+8);if(s===0)break;var l=a+s;if(l>e.length){if(i)break;l=e.length}var u=e.subarray(a+8,l);qt(o,t[0])&&(t.length===1?n.push(u):n.push.apply(n,r(u,t.slice(1),i))),a=l}return n},sm={EBML:qe([26,69,223,163]),DocType:qe([66,130]),Segment:qe([24,83,128,103]),SegmentInfo:qe([21,73,169,102]),Tracks:qe([22,84,174,107]),Track:qe([174]),TrackNumber:qe([215]),DefaultDuration:qe([35,227,131]),TrackEntry:qe([174]),TrackType:qe([131]),FlagDefault:qe([136]),CodecID:qe([134]),CodecPrivate:qe([99,162]),VideoTrack:qe([224]),AudioTrack:qe([225]),Cluster:qe([31,67,182,117]),Timestamp:qe([231]),TimestampScale:qe([42,215,177]),BlockGroup:qe([160]),BlockDuration:qe([155]),Block:qe([161]),SimpleBlock:qe([163])},Kx=[128,64,32,16,8,4,2,1],ute=function(e){for(var t=1,i=0;i<Kx.length&&!(e&Kx[i]);i++)t++;return t},a0=function(e,t,i,n){i===void 0&&(i=!0),n===void 0&&(n=!1);var a=ute(e[t]),s=e.subarray(t,t+a);return i&&(s=Array.prototype.slice.call(e,t,t+a),s[0]^=Kx[a-1]),{length:a,value:IJ(s,{signed:n}),bytes:s}},fM=function r(e){return typeof e=="string"?e.match(/.{1,2}/g).map(function(t){return r(t)}):typeof e=="number"?PJ(e):e},cte=function(e){return Array.isArray(e)?e.map(function(t){return fM(t)}):[fM(e)]},hte=function r(e,t,i){if(i>=t.length)return t.length;var n=a0(t,i,!1);if(qt(e.bytes,n.bytes))return i;var a=a0(t,i+n.length);return r(e,t,i+a.length+a.value+n.length)},dM=function r(e,t){t=cte(t),e=qe(e);var i=[];if(!t.length)return i;for(var n=0;n<e.length;){var a=a0(e,n,!1),s=a0(e,n+a.length),o=n+a.length+s.length;s.value===127&&(s.value=hte(a,e,o),s.value!==e.length&&(s.value-=o));var l=o+s.value>e.length?e.length:o+s.value,u=e.subarray(o,l);qt(t[0],a.bytes)&&(t.length===1?i.push(u):i=i.concat(r(u,t.slice(1))));var c=a.length+s.length+u.length;n+=c}return i},fte=qe([0,0,0,1]),dte=qe([0,0,1]),pte=qe([0,0,3]),vte=function(e){for(var t=[],i=1;i<e.length-2;)qt(e.subarray(i,i+3),pte)&&(t.push(i+2),i++),i++;if(t.length===0)return e;var n=e.length-t.length,a=new Uint8Array(n),s=0;for(i=0;i<n;s++,i++)s===t[0]&&(s++,t.shift()),a[i]=e[s];return a},fF=function(e,t,i,n){e=qe(e),i=[].concat(i);for(var a=0,s,o=0;a<e.length&&(o<n||s);){var l=void 0;if(qt(e.subarray(a),fte)?l=4:qt(e.subarray(a),dte)&&(l=3),!l){a++;continue}if(o++,s)return vte(e.subarray(s,a));var u=void 0;t==="h264"?u=e[a+l]&31:t==="h265"&&(u=e[a+l]>>1&63),i.indexOf(u)!==-1&&(s=a+l),a+=l+(t==="h264"?1:2)}return e.subarray(0,0)},gte=function(e,t,i){return fF(e,"h264",t,i)},mte=function(e,t,i){return fF(e,"h265",t,i)},bi={webm:qe([119,101,98,109]),matroska:qe([109,97,116,114,111,115,107,97]),flac:qe([102,76,97,67]),ogg:qe([79,103,103,83]),ac3:qe([11,119]),riff:qe([82,73,70,70]),avi:qe([65,86,73]),wav:qe([87,65,86,69]),"3gp":qe([102,116,121,112,51,103]),mp4:qe([102,116,121,112]),fmp4:qe([115,116,121,112]),mov:qe([102,116,121,112,113,116]),moov:qe([109,111,111,118]),moof:qe([109,111,111,102])},tf={aac:function(e){var t=ap(e);return qt(e,[255,16],{offset:t,mask:[255,22]})},mp3:function(e){var t=ap(e);return qt(e,[255,2],{offset:t,mask:[255,6]})},webm:function(e){var t=dM(e,[sm.EBML,sm.DocType])[0];return qt(t,bi.webm)},mkv:function(e){var t=dM(e,[sm.EBML,sm.DocType])[0];return qt(t,bi.matroska)},mp4:function(e){if(tf["3gp"](e)||tf.mov(e))return!1;if(qt(e,bi.mp4,{offset:4})||qt(e,bi.fmp4,{offset:4})||qt(e,bi.moof,{offset:4})||qt(e,bi.moov,{offset:4}))return!0},mov:function(e){return qt(e,bi.mov,{offset:4})},"3gp":function(e){return qt(e,bi["3gp"],{offset:4})},ac3:function(e){var t=ap(e);return qt(e,bi.ac3,{offset:t})},ts:function(e){if(e.length<189&&e.length>=1)return e[0]===71;for(var t=0;t+188<e.length&&t<188;){if(e[t]===71&&e[t+188]===71)return!0;t+=1}return!1},flac:function(e){var t=ap(e);return qt(e,bi.flac,{offset:t})},ogg:function(e){return qt(e,bi.ogg)},avi:function(e){return qt(e,bi.riff)&&qt(e,bi.avi,{offset:8})},wav:function(e){return qt(e,bi.riff)&&qt(e,bi.wav,{offset:8})},h264:function(e){return gte(e,7,3).length},h265:function(e){return mte(e,[32,33],3).length}},Zx=Object.keys(tf).filter(function(r){return r!=="ts"&&r!=="h264"&&r!=="h265"}).concat(["ts","h264","h265"]);Zx.forEach(function(r){var e=tf[r];tf[r]=function(t){return e(qe(t))}});var yte=tf,rA=function(e){e=qe(e);for(var t=0;t<Zx.length;t++){var i=Zx[t];if(yte[i](e))return i}return""},_te=function(e){return lte(e,["moof"]).length>0},iA=9e4,nA,aA,X_,sA,dF,pF,vF;nA=function(r){return r*iA};aA=function(r,e){return r*e};X_=function(r){return r/iA};sA=function(r,e){return r/e};dF=function(r,e){return nA(sA(r,e))};pF=function(r,e){return aA(X_(r),e)};vF=function(r,e,t){return X_(t?r:r-e)};var bu={ONE_SECOND_IN_TS:iA,secondsToVideoTs:nA,secondsToAudioTs:aA,videoTsToSeconds:X_,audioTsToSeconds:sA,audioTsToVideoTs:dF,videoTsToAudioTs:pF,metadataTsToSeconds:vF};/**
|
||
* @license
|
||
* Video.js 8.18.1 <http://videojs.com/>
|
||
* Copyright Brightcove, Inc. <https://www.brightcove.com/>
|
||
* Available under Apache License Version 2.0
|
||
* <https://github.com/videojs/video.js/blob/main/LICENSE>
|
||
*
|
||
* Includes vtt.js <https://github.com/mozilla/vtt.js>
|
||
* Available under Apache License Version 2.0
|
||
* <https://github.com/mozilla/vtt.js/blob/main/LICENSE>
|
||
*/var Qx="8.18.1";const ks={},tl=function(r,e){return ks[r]=ks[r]||[],e&&(ks[r]=ks[r].concat(e)),ks[r]},bte=function(r,e){tl(r,e)},gF=function(r,e){const t=tl(r).indexOf(e);return t<=-1?!1:(ks[r]=ks[r].slice(),ks[r].splice(t,1),!0)},Ste=function(r,e){tl(r,[].concat(e).map(t=>{const i=(...n)=>(gF(r,i),t(...n));return i}))},s0={prefixed:!0},xy=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"]],pM=xy[0];let sp;for(let r=0;r<xy.length;r++)if(xy[r][1]in pe){sp=xy[r];break}if(sp){for(let r=0;r<sp.length;r++)s0[pM[r]]=sp[r];s0.prefixed=sp[0]!==pM[0]}let Ui=[];const Tte=(r,e,t)=>(i,n,a)=>{const s=e.levels[n],o=new RegExp(`^(${s})$`);let l=r;if(i!=="log"&&a.unshift(i.toUpperCase()+":"),t&&(l=`%c${r}`,a.unshift(t)),a.unshift(l+":"),Ui){Ui.push([].concat(a));const c=Ui.length-1e3;Ui.splice(0,c>0?c:0)}if(!H.console)return;let u=H.console[i];!u&&i==="debug"&&(u=H.console.info||H.console.log),!(!u||!s||!o.test(i))&&u[Array.isArray(a)?"apply":"call"](H.console,a)};function Jx(r,e=":",t=""){let i="info",n;function a(...s){n("log",i,s)}return n=Tte(r,a,t),a.createLogger=(s,o,l)=>{const u=o!==void 0?o:e,c=l!==void 0?l:t,h=`${r} ${u} ${s}`;return Jx(h,u,c)},a.createNewLogger=(s,o,l)=>Jx(s,o,l),a.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:i},a.level=s=>{if(typeof s=="string"){if(!a.levels.hasOwnProperty(s))throw new Error(`"${s}" in not a valid log level`);i=s}return i},a.history=()=>Ui?[].concat(Ui):[],a.history.filter=s=>(Ui||[]).filter(o=>new RegExp(`.*${s}.*`).test(o[0])),a.history.clear=()=>{Ui&&(Ui.length=0)},a.history.disable=()=>{Ui!==null&&(Ui.length=0,Ui=null)},a.history.enable=()=>{Ui===null&&(Ui=[])},a.error=(...s)=>n("error",i,s),a.warn=(...s)=>n("warn",i,s),a.debug=(...s)=>n("debug",i,s),a}const vt=Jx("VIDEOJS"),mF=vt.createLogger,xte=Object.prototype.toString,yF=function(r){return us(r)?Object.keys(r):[]};function Eh(r,e){yF(r).forEach(t=>e(r[t],t))}function _F(r,e,t=0){return yF(r).reduce((i,n)=>e(i,r[n],n),t)}function us(r){return!!r&&typeof r=="object"}function rf(r){return us(r)&&xte.call(r)==="[object Object]"&&r.constructor===Object}function zt(...r){const e={};return r.forEach(t=>{t&&Eh(t,(i,n)=>{if(!rf(i)){e[n]=i;return}rf(e[n])||(e[n]={}),e[n]=zt(e[n],i)})}),e}function bF(r={}){const e=[];for(const t in r)if(r.hasOwnProperty(t)){const i=r[t];e.push(i)}return e}function Y_(r,e,t,i=!0){const n=s=>Object.defineProperty(r,e,{value:s,enumerable:!0,writable:!0}),a={configurable:!0,enumerable:!0,get(){const s=t();return n(s),s}};return i&&(a.set=n),Object.defineProperty(r,e,a)}var wte=Object.freeze({__proto__:null,each:Eh,reduce:_F,isObject:us,isPlain:rf,merge:zt,values:bF,defineLazyProperty:Y_});let oA=!1,SF=null,cs=!1,TF,xF=!1,Ih=!1,Ph=!1,hs=!1,lA=null,K_=null;const Cte=!!(H.cast&&H.cast.framework&&H.cast.framework.CastReceiverContext);let wF=null,o0=!1,Z_=!1,l0=!1,Q_=!1,u0=!1,c0=!1,h0=!1;const uv=!!(Pf()&&("ontouchstart"in H||H.navigator.maxTouchPoints||H.DocumentTouch&&H.document instanceof H.DocumentTouch)),go=H.navigator&&H.navigator.userAgentData;go&&go.platform&&go.brands&&(cs=go.platform==="Android",Ih=!!go.brands.find(r=>r.brand==="Microsoft Edge"),Ph=!!go.brands.find(r=>r.brand==="Chromium"),hs=!Ih&&Ph,lA=K_=(go.brands.find(r=>r.brand==="Chromium")||{}).version||null,Z_=go.platform==="Windows");if(!Ph){const r=H.navigator&&H.navigator.userAgent||"";oA=/iPod/i.test(r),SF=function(){const e=r.match(/OS (\d+)_/i);return e&&e[1]?e[1]:null}(),cs=/Android/i.test(r),TF=function(){const e=r.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;const t=e[1]&&parseFloat(e[1]),i=e[2]&&parseFloat(e[2]);return t&&i?parseFloat(e[1]+"."+e[2]):t||null}(),xF=/Firefox/i.test(r),Ih=/Edg/i.test(r),Ph=/Chrome/i.test(r)||/CriOS/i.test(r),hs=!Ih&&Ph,lA=K_=function(){const e=r.match(/(Chrome|CriOS)\/(\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),wF=function(){const e=/MSIE\s(\d+)\.\d/.exec(r);let t=e&&parseFloat(e[1]);return!t&&/Trident\/7.0/i.test(r)&&/rv:11.0/.test(r)&&(t=11),t}(),u0=/Tizen/i.test(r),c0=/Web0S/i.test(r),h0=u0||c0,o0=/Safari/i.test(r)&&!hs&&!cs&&!Ih&&!h0,Z_=/Windows/i.test(r),l0=/iPad/i.test(r)||o0&&uv&&!/iPhone/i.test(r),Q_=/iPhone/i.test(r)&&!l0}const Mi=Q_||l0||oA,J_=(o0||Mi)&&!hs;var CF=Object.freeze({__proto__:null,get IS_IPOD(){return oA},get IOS_VERSION(){return SF},get IS_ANDROID(){return cs},get ANDROID_VERSION(){return TF},get IS_FIREFOX(){return xF},get IS_EDGE(){return Ih},get IS_CHROMIUM(){return Ph},get IS_CHROME(){return hs},get CHROMIUM_VERSION(){return lA},get CHROME_VERSION(){return K_},IS_CHROMECAST_RECEIVER:Cte,get IE_VERSION(){return wF},get IS_SAFARI(){return o0},get IS_WINDOWS(){return Z_},get IS_IPAD(){return l0},get IS_IPHONE(){return Q_},get IS_TIZEN(){return u0},get IS_WEBOS(){return c0},get IS_SMART_TV(){return h0},TOUCH_ENABLED:uv,IS_IOS:Mi,IS_ANY_SAFARI:J_});function vM(r){return typeof r=="string"&&!!r.trim()}function Ate(r){if(r.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}function Pf(){return pe===H.document}function Mf(r){return us(r)&&r.nodeType===1}function AF(){try{return H.parent!==H.self}catch{return!0}}function DF(r){return function(e,t){if(!vM(e))return pe[r](null);vM(t)&&(t=pe.querySelector(t));const i=Mf(t)?t:pe;return i[r]&&i[r](e)}}function Ze(r="div",e={},t={},i){const n=pe.createElement(r);return Object.getOwnPropertyNames(e).forEach(function(a){const s=e[a];a==="textContent"?fl(n,s):(n[a]!==s||a==="tabIndex")&&(n[a]=s)}),Object.getOwnPropertyNames(t).forEach(function(a){n.setAttribute(a,t[a])}),i&&uA(n,i),n}function fl(r,e){return typeof r.textContent>"u"?r.innerText=e:r.textContent=e,r}function ew(r,e){e.firstChild?e.insertBefore(r,e.firstChild):e.appendChild(r)}function Ip(r,e){return Ate(e),r.classList.contains(e)}function ku(r,...e){return r.classList.add(...e.reduce((t,i)=>t.concat(i.split(/\s+/)),[])),r}function e1(r,...e){return r?(r.classList.remove(...e.reduce((t,i)=>t.concat(i.split(/\s+/)),[])),r):(vt.warn("removeClass was called with an element that doesn't exist"),null)}function EF(r,e,t){return typeof t=="function"&&(t=t(r,e)),typeof t!="boolean"&&(t=void 0),e.split(/\s+/).forEach(i=>r.classList.toggle(i,t)),r}function IF(r,e){Object.getOwnPropertyNames(e).forEach(function(t){const i=e[t];i===null||typeof i>"u"||i===!1?r.removeAttribute(t):r.setAttribute(t,i===!0?"":i)})}function Po(r){const e={},t=["autoplay","controls","playsinline","loop","muted","default","defaultMuted"];if(r&&r.attributes&&r.attributes.length>0){const i=r.attributes;for(let n=i.length-1;n>=0;n--){const a=i[n].name;let s=i[n].value;t.includes(a)&&(s=s!==null),e[a]=s}}return e}function PF(r,e){return r.getAttribute(e)}function nf(r,e,t){r.setAttribute(e,t)}function t1(r,e){r.removeAttribute(e)}function MF(){pe.body.focus(),pe.onselectstart=function(){return!1}}function LF(){pe.onselectstart=function(){return!0}}function af(r){if(r&&r.getBoundingClientRect&&r.parentNode){const e=r.getBoundingClientRect(),t={};return["bottom","height","left","right","top","width"].forEach(i=>{e[i]!==void 0&&(t[i]=e[i])}),t.height||(t.height=parseFloat(sf(r,"height"))),t.width||(t.width=parseFloat(sf(r,"width"))),t}}function cv(r){if(!r||r&&!r.offsetParent)return{left:0,top:0,width:0,height:0};const e=r.offsetWidth,t=r.offsetHeight;let i=0,n=0;for(;r.offsetParent&&r!==pe[s0.fullscreenElement];)i+=r.offsetLeft,n+=r.offsetTop,r=r.offsetParent;return{left:i,top:n,width:e,height:t}}function r1(r,e){const t={x:0,y:0};if(Mi){let c=r;for(;c&&c.nodeName.toLowerCase()!=="html";){const h=sf(c,"transform");if(/^matrix/.test(h)){const d=h.slice(7,-1).split(/,\s/).map(Number);t.x+=d[4],t.y+=d[5]}else if(/^matrix3d/.test(h)){const d=h.slice(9,-1).split(/,\s/).map(Number);t.x+=d[12],t.y+=d[13]}if(c.assignedSlot&&c.assignedSlot.parentElement&&H.WebKitCSSMatrix){const d=H.getComputedStyle(c.assignedSlot.parentElement).transform,f=new H.WebKitCSSMatrix(d);t.x+=f.m41,t.y+=f.m42}c=c.parentNode||c.host}}const i={},n=cv(e.target),a=cv(r),s=a.width,o=a.height;let l=e.offsetY-(a.top-n.top),u=e.offsetX-(a.left-n.left);return e.changedTouches&&(u=e.changedTouches[0].pageX-a.left,l=e.changedTouches[0].pageY+a.top,Mi&&(u-=t.x,l-=t.y)),i.y=1-Math.max(0,Math.min(1,l/o)),i.x=Math.max(0,Math.min(1,u/s)),i}function kF(r){return us(r)&&r.nodeType===3}function i1(r){for(;r.firstChild;)r.removeChild(r.firstChild);return r}function RF(r){return typeof r=="function"&&(r=r()),(Array.isArray(r)?r:[r]).map(e=>{if(typeof e=="function"&&(e=e()),Mf(e)||kF(e))return e;if(typeof e=="string"&&/\S/.test(e))return pe.createTextNode(e)}).filter(e=>e)}function uA(r,e){return RF(e).forEach(t=>r.appendChild(t)),r}function OF(r,e){return uA(i1(r),e)}function hv(r){return r.button===void 0&&r.buttons===void 0||r.button===0&&r.buttons===void 0||r.type==="mouseup"&&r.button===0&&r.buttons===0||r.type==="mousedown"&&r.button===0&&r.buttons===0?!0:!(r.button!==0||r.buttons!==1)}const rl=DF("querySelector"),NF=DF("querySelectorAll");function sf(r,e){if(!r||!e)return"";if(typeof H.getComputedStyle=="function"){let t;try{t=H.getComputedStyle(r)}catch{return""}return t?t.getPropertyValue(e)||t[e]:""}return""}function BF(r){[...pe.styleSheets].forEach(e=>{try{const t=[...e.cssRules].map(n=>n.cssText).join(""),i=pe.createElement("style");i.textContent=t,r.document.head.appendChild(i)}catch{const i=pe.createElement("link");i.rel="stylesheet",i.type=e.type,i.media=e.media.mediaText,i.href=e.href,r.document.head.appendChild(i)}})}var FF=Object.freeze({__proto__:null,isReal:Pf,isEl:Mf,isInFrame:AF,createEl:Ze,textContent:fl,prependTo:ew,hasClass:Ip,addClass:ku,removeClass:e1,toggleClass:EF,setAttributes:IF,getAttributes:Po,getAttribute:PF,setAttribute:nf,removeAttribute:t1,blockTextSelection:MF,unblockTextSelection:LF,getBoundingClientRect:af,findPosition:cv,getPointerPosition:r1,isTextNode:kF,emptyEl:i1,normalizeContent:RF,appendContent:uA,insertContent:OF,isSingleLeftClick:hv,$:rl,$$:NF,computedStyle:sf,copyStyleSheetsToWindow:BF});let UF=!1,tw;const Dte=function(){if(tw.options.autoSetup===!1)return;const r=Array.prototype.slice.call(pe.getElementsByTagName("video")),e=Array.prototype.slice.call(pe.getElementsByTagName("audio")),t=Array.prototype.slice.call(pe.getElementsByTagName("video-js")),i=r.concat(e,t);if(i&&i.length>0)for(let n=0,a=i.length;n<a;n++){const s=i[n];if(s&&s.getAttribute)s.player===void 0&&s.getAttribute("data-setup")!==null&&tw(s);else{rw(1);break}}else UF||rw(1)};function rw(r,e){Pf()&&(e&&(tw=e),H.setTimeout(Dte,r))}function iw(){UF=!0,H.removeEventListener("load",iw)}Pf()&&(pe.readyState==="complete"?iw():H.addEventListener("load",iw));const VF=function(r){const e=pe.createElement("style");return e.className=r,e},zF=function(r,e){r.styleSheet?r.styleSheet.cssText=e:r.textContent=e};var Ii=new WeakMap;const Ete=3;let Ite=Ete;function Yn(){return Ite++}function gM(r,e){if(!Ii.has(r))return;const t=Ii.get(r);t.handlers[e].length===0&&(delete t.handlers[e],r.removeEventListener?r.removeEventListener(e,t.dispatcher,!1):r.detachEvent&&r.detachEvent("on"+e,t.dispatcher)),Object.getOwnPropertyNames(t.handlers).length<=0&&(delete t.handlers,delete t.dispatcher,delete t.disabled),Object.getOwnPropertyNames(t).length===0&&Ii.delete(r)}function cA(r,e,t,i){t.forEach(function(n){r(e,n,i)})}function n1(r){if(r.fixed_)return r;function e(){return!0}function t(){return!1}if(!r||!r.isPropagationStopped||!r.isImmediatePropagationStopped){const i=r||H.event;r={};const n=["layerX","layerY","keyLocation","path","webkitMovementX","webkitMovementY","mozPressure","mozInputSource"];for(const a in i)n.includes(a)||a==="returnValue"&&i.preventDefault||(r[a]=i[a]);if(r.target||(r.target=r.srcElement||pe),r.relatedTarget||(r.relatedTarget=r.fromElement===r.target?r.toElement:r.fromElement),r.preventDefault=function(){i.preventDefault&&i.preventDefault(),r.returnValue=!1,i.returnValue=!1,r.defaultPrevented=!0},r.defaultPrevented=!1,r.stopPropagation=function(){i.stopPropagation&&i.stopPropagation(),r.cancelBubble=!0,i.cancelBubble=!0,r.isPropagationStopped=e},r.isPropagationStopped=t,r.stopImmediatePropagation=function(){i.stopImmediatePropagation&&i.stopImmediatePropagation(),r.isImmediatePropagationStopped=e,r.stopPropagation()},r.isImmediatePropagationStopped=t,r.clientX!==null&&r.clientX!==void 0){const a=pe.documentElement,s=pe.body;r.pageX=r.clientX+(a&&a.scrollLeft||s&&s.scrollLeft||0)-(a&&a.clientLeft||s&&s.clientLeft||0),r.pageY=r.clientY+(a&&a.scrollTop||s&&s.scrollTop||0)-(a&&a.clientTop||s&&s.clientTop||0)}r.which=r.charCode||r.keyCode,r.button!==null&&r.button!==void 0&&(r.button=r.button&1?0:r.button&4?1:r.button&2?2:0)}return r.fixed_=!0,r}let om;const Pte=function(){if(typeof om!="boolean"){om=!1;try{const r=Object.defineProperty({},"passive",{get(){om=!0}});H.addEventListener("test",null,r),H.removeEventListener("test",null,r)}catch{}}return om},Mte=["touchstart","touchmove"];function Tn(r,e,t){if(Array.isArray(e))return cA(Tn,r,e,t);Ii.has(r)||Ii.set(r,{});const i=Ii.get(r);if(i.handlers||(i.handlers={}),i.handlers[e]||(i.handlers[e]=[]),t.guid||(t.guid=Yn()),i.handlers[e].push(t),i.dispatcher||(i.disabled=!1,i.dispatcher=function(n,a){if(i.disabled)return;n=n1(n);const s=i.handlers[n.type];if(s){const o=s.slice(0);for(let l=0,u=o.length;l<u&&!n.isImmediatePropagationStopped();l++)try{o[l].call(r,n,a)}catch(c){vt.error(c)}}}),i.handlers[e].length===1)if(r.addEventListener){let n=!1;Pte()&&Mte.indexOf(e)>-1&&(n={passive:!0}),r.addEventListener(e,i.dispatcher,n)}else r.attachEvent&&r.attachEvent("on"+e,i.dispatcher)}function oi(r,e,t){if(!Ii.has(r))return;const i=Ii.get(r);if(!i.handlers)return;if(Array.isArray(e))return cA(oi,r,e,t);const n=function(s,o){i.handlers[o]=[],gM(s,o)};if(e===void 0){for(const s in i.handlers)Object.prototype.hasOwnProperty.call(i.handlers||{},s)&&n(r,s);return}const a=i.handlers[e];if(a){if(!t){n(r,e);return}if(t.guid)for(let s=0;s<a.length;s++)a[s].guid===t.guid&&a.splice(s--,1);gM(r,e)}}function Lf(r,e,t){const i=Ii.has(r)?Ii.get(r):{},n=r.parentNode||r.ownerDocument;if(typeof e=="string"?e={type:e,target:r}:e.target||(e.target=r),e=n1(e),i.dispatcher&&i.dispatcher.call(r,e,t),n&&!e.isPropagationStopped()&&e.bubbles===!0)Lf.call(null,n,e,t);else if(!n&&!e.defaultPrevented&&e.target&&e.target[e.type]){Ii.has(e.target)||Ii.set(e.target,{});const a=Ii.get(e.target);e.target[e.type]&&(a.disabled=!0,typeof e.target[e.type]=="function"&&e.target[e.type](),a.disabled=!1)}return!e.defaultPrevented}function a1(r,e,t){if(Array.isArray(e))return cA(a1,r,e,t);const i=function(){oi(r,e,i),t.apply(this,arguments)};i.guid=t.guid=t.guid||Yn(),Tn(r,e,i)}function hA(r,e,t){const i=function(){oi(r,e,i),t.apply(this,arguments)};i.guid=t.guid=t.guid||Yn(),Tn(r,e,i)}var Lte=Object.freeze({__proto__:null,fixEvent:n1,on:Tn,off:oi,trigger:Lf,one:a1,any:hA});const Kn=30,$t=function(r,e,t){e.guid||(e.guid=Yn());const i=e.bind(r);return i.guid=t?t+"_"+e.guid:e.guid,i},fs=function(r,e){let t=H.performance.now();return function(...n){const a=H.performance.now();a-t>=e&&(r(...n),t=a)}},GF=function(r,e,t,i=H){let n;const a=()=>{i.clearTimeout(n),n=null},s=function(){const o=this,l=arguments;let u=function(){n=null,u=null,t||r.apply(o,l)};!n&&t&&r.apply(o,l),i.clearTimeout(n),n=i.setTimeout(u,e)};return s.cancel=a,s};var kte=Object.freeze({__proto__:null,UPDATE_REFRESH_INTERVAL:Kn,bind_:$t,throttle:fs,debounce:GF});let Td;class xn{on(e,t){const i=this.addEventListener;this.addEventListener=()=>{},Tn(this,e,t),this.addEventListener=i}off(e,t){oi(this,e,t)}one(e,t){const i=this.addEventListener;this.addEventListener=()=>{},a1(this,e,t),this.addEventListener=i}any(e,t){const i=this.addEventListener;this.addEventListener=()=>{},hA(this,e,t),this.addEventListener=i}trigger(e){const t=e.type||e;typeof e=="string"&&(e={type:t}),e=n1(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),Lf(this,e)}queueTrigger(e){Td||(Td=new Map);const t=e.type||e;let i=Td.get(this);i||(i=new Map,Td.set(this,i));const n=i.get(t);i.delete(t),H.clearTimeout(n);const a=H.setTimeout(()=>{i.delete(t),i.size===0&&(i=null,Td.delete(this)),this.trigger(e)},0);i.set(t,a)}}xn.prototype.allowedEvents_={};xn.prototype.addEventListener=xn.prototype.on;xn.prototype.removeEventListener=xn.prototype.off;xn.prototype.dispatchEvent=xn.prototype.trigger;const s1=r=>typeof r.name=="function"?r.name():typeof r.name=="string"?r.name:r.name_?r.name_:r.constructor&&r.constructor.name?r.constructor.name:typeof r,Hs=r=>r instanceof xn||!!r.eventBusEl_&&["on","one","off","trigger"].every(e=>typeof r[e]=="function"),Rte=(r,e)=>{Hs(r)?e():(r.eventedCallbacks||(r.eventedCallbacks=[]),r.eventedCallbacks.push(e))},nw=r=>typeof r=="string"&&/\S/.test(r)||Array.isArray(r)&&!!r.length,f0=(r,e,t)=>{if(!r||!r.nodeName&&!Hs(r))throw new Error(`Invalid target for ${s1(e)}#${t}; must be a DOM node or evented object.`)},HF=(r,e,t)=>{if(!nw(r))throw new Error(`Invalid event type for ${s1(e)}#${t}; must be a non-empty string or array.`)},$F=(r,e,t)=>{if(typeof r!="function")throw new Error(`Invalid listener for ${s1(e)}#${t}; must be a function.`)},Nb=(r,e,t)=>{const i=e.length<3||e[0]===r||e[0]===r.eventBusEl_;let n,a,s;return i?(n=r.eventBusEl_,e.length>=3&&e.shift(),[a,s]=e):(n=e[0],a=e[1],s=e[2]),f0(n,r,t),HF(a,r,t),$F(s,r,t),s=$t(r,s),{isTargetingSelf:i,target:n,type:a,listener:s}},Il=(r,e,t,i)=>{f0(r,r,e),r.nodeName?Lte[e](r,t,i):r[e](t,i)},Ote={on(...r){const{isTargetingSelf:e,target:t,type:i,listener:n}=Nb(this,r,"on");if(Il(t,"on",i,n),!e){const a=()=>this.off(t,i,n);a.guid=n.guid;const s=()=>this.off("dispose",a);s.guid=n.guid,Il(this,"on","dispose",a),Il(t,"on","dispose",s)}},one(...r){const{isTargetingSelf:e,target:t,type:i,listener:n}=Nb(this,r,"one");if(e)Il(t,"one",i,n);else{const a=(...s)=>{this.off(t,i,a),n.apply(null,s)};a.guid=n.guid,Il(t,"one",i,a)}},any(...r){const{isTargetingSelf:e,target:t,type:i,listener:n}=Nb(this,r,"any");if(e)Il(t,"any",i,n);else{const a=(...s)=>{this.off(t,i,a),n.apply(null,s)};a.guid=n.guid,Il(t,"any",i,a)}},off(r,e,t){if(!r||nw(r))oi(this.eventBusEl_,r,e);else{const i=r,n=e;f0(i,this,"off"),HF(n,this,"off"),$F(t,this,"off"),t=$t(this,t),this.off("dispose",t),i.nodeName?(oi(i,n,t),oi(i,"dispose",t)):Hs(i)&&(i.off(n,t),i.off("dispose",t))}},trigger(r,e){f0(this.eventBusEl_,this,"trigger");const t=r&&typeof r!="string"?r.type:r;if(!nw(t))throw new Error(`Invalid event type for ${s1(this)}#trigger; must be a non-empty string or object with a type key that has a non-empty value.`);return Lf(this.eventBusEl_,r,e)}};function fA(r,e={}){const{eventBusKey:t}=e;if(t){if(!r[t].nodeName)throw new Error(`The eventBusKey "${t}" does not refer to an element.`);r.eventBusEl_=r[t]}else r.eventBusEl_=Ze("span",{className:"vjs-event-bus"});return Object.assign(r,Ote),r.eventedCallbacks&&r.eventedCallbacks.forEach(i=>{i()}),r.on("dispose",()=>{r.off(),[r,r.el_,r.eventBusEl_].forEach(function(i){i&&Ii.has(i)&&Ii.delete(i)}),H.setTimeout(()=>{r.eventBusEl_=null},0)}),r}const Nte={state:{},setState(r){typeof r=="function"&&(r=r());let e;return Eh(r,(t,i)=>{this.state[i]!==t&&(e=e||{},e[i]={from:this.state[i],to:t}),this.state[i]=t}),e&&Hs(this)&&this.trigger({changes:e,type:"statechanged"}),e}};function WF(r,e){return Object.assign(r,Nte),r.state=Object.assign({},r.state,e),typeof r.handleStateChanged=="function"&&Hs(r)&&r.on("statechanged",r.handleStateChanged),r}const Pp=function(r){return typeof r!="string"?r:r.replace(/./,e=>e.toLowerCase())},sr=function(r){return typeof r!="string"?r:r.replace(/./,e=>e.toUpperCase())},qF=function(r,e){return sr(r)===sr(e)};var Bte=Object.freeze({__proto__:null,toLowerCase:Pp,toTitleCase:sr,titleCaseEquals:qF});class se{constructor(e,t,i){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=zt({},this.options_),t=this.options_=zt(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){const n=e&&e.id&&e.id()||"no_player";this.id_=`${n}_component_${Yn()}`}this.name_=t.name||null,t.el?this.el_=t.el:t.createEl!==!1&&(this.el_=this.createEl()),t.className&&this.el_&&t.className.split(" ").forEach(n=>this.addClass(n)),["on","off","one","any","trigger"].forEach(n=>{this[n]=void 0}),t.evented!==!1&&(fA(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),WF(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new Set,this.setIntervalIds_=new Set,this.rafIds_=new Set,this.namedRafs_=new Map,this.clearingTimersOnDispose_=!1,t.initChildren!==!1&&this.initChildren(),this.ready(i),t.reportTouchActivity!==!1&&this.enableTouchActivity()}dispose(e={}){if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:"dispose",bubbles:!1}),this.isDisposed_=!0,this.children_)for(let t=this.children_.length-1;t>=0;t--)this.children_[t].dispose&&this.children_[t].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&(e.restoreEl?this.el_.parentNode.replaceChild(e.restoreEl,this.el_):this.el_.parentNode.removeChild(this.el_)),this.el_=null),this.player_=null}}isDisposed(){return!!this.isDisposed_}player(){return this.player_}options(e){return e?(this.options_=zt(this.options_,e),this.options_):this.options_}el(){return this.el_}createEl(e,t,i){return Ze(e,t,i)}localize(e,t,i=e){const n=this.player_.language&&this.player_.language(),a=this.player_.languages&&this.player_.languages(),s=a&&a[n],o=n&&n.split("-")[0],l=a&&a[o];let u=i;return s&&s[e]?u=s[e]:l&&l[e]&&(u=l[e]),t&&(u=u.replace(/\{(\d+)\}/g,function(c,h){const d=t[h-1];let f=d;return typeof d>"u"&&(f=c),f})),u}handleLanguagechange(){}contentEl(){return this.contentEl_||this.el_}id(){return this.id_}name(){return this.name_}children(){return this.children_}getChildById(e){return this.childIndex_[e]}getChild(e){if(e)return this.childNameIndex_[e]}getDescendant(...e){e=e.reduce((i,n)=>i.concat(n),[]);let t=this;for(let i=0;i<e.length;i++)if(t=t.getChild(e[i]),!t||!t.getChild)return;return t}setIcon(e,t=this.el()){if(!this.player_.options_.experimentalSvgIcons)return;const i="http://www.w3.org/2000/svg",n=Ze("span",{className:"vjs-icon-placeholder vjs-svg-icon"},{"aria-hidden":"true"}),a=pe.createElementNS(i,"svg");a.setAttributeNS(null,"viewBox","0 0 512 512");const s=pe.createElementNS(i,"use");return a.appendChild(s),s.setAttributeNS(null,"href",`#vjs-icon-${e}`),n.appendChild(a),this.iconIsSet_?t.replaceChild(n,t.querySelector(".vjs-icon-placeholder")):t.appendChild(n),this.iconIsSet_=!0,n}addChild(e,t={},i=this.children_.length){let n,a;if(typeof e=="string"){a=sr(e);const s=t.componentClass||a;t.name=a;const o=se.getComponent(s);if(!o)throw new Error(`Component ${s} does not exist`);if(typeof o!="function")return null;n=new o(this.player_||this,t)}else n=e;if(n.parentComponent_&&n.parentComponent_.removeChild(n),this.children_.splice(i,0,n),n.parentComponent_=this,typeof n.id=="function"&&(this.childIndex_[n.id()]=n),a=a||n.name&&sr(n.name()),a&&(this.childNameIndex_[a]=n,this.childNameIndex_[Pp(a)]=n),typeof n.el=="function"&&n.el()){let s=null;this.children_[i+1]&&(this.children_[i+1].el_?s=this.children_[i+1].el_:Mf(this.children_[i+1])&&(s=this.children_[i+1])),this.contentEl().insertBefore(n.el(),s)}return n}removeChild(e){if(typeof e=="string"&&(e=this.getChild(e)),!e||!this.children_)return;let t=!1;for(let n=this.children_.length-1;n>=0;n--)if(this.children_[n]===e){t=!0,this.children_.splice(n,1);break}if(!t)return;e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[sr(e.name())]=null,this.childNameIndex_[Pp(e.name())]=null;const i=e.el();i&&i.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}initChildren(){const e=this.options_.children;if(e){const t=this.options_,i=s=>{const o=s.name;let l=s.opts;if(t[o]!==void 0&&(l=t[o]),l===!1)return;l===!0&&(l={}),l.playerOptions=this.options_.playerOptions;const u=this.addChild(o,l);u&&(this[o]=u)};let n;const a=se.getComponent("Tech");Array.isArray(e)?n=e:n=Object.keys(e),n.concat(Object.keys(this.options_).filter(function(s){return!n.some(function(o){return typeof o=="string"?s===o:s===o.name})})).map(s=>{let o,l;return typeof s=="string"?(o=s,l=e[o]||this.options_[o]||{}):(o=s.name,l=s),{name:o,opts:l}}).filter(s=>{const o=se.getComponent(s.opts.componentClass||sr(s.name));return o&&!a.isTech(o)}).forEach(i)}}buildCSSClass(){return""}ready(e,t=!1){if(e){if(!this.isReady_){this.readyQueue_=this.readyQueue_||[],this.readyQueue_.push(e);return}t?e.call(this):this.setTimeout(e,1)}}triggerReady(){this.isReady_=!0,this.setTimeout(function(){const e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach(function(t){t.call(this)},this),this.trigger("ready")},1)}$(e,t){return rl(e,t||this.contentEl())}$$(e,t){return NF(e,t||this.contentEl())}hasClass(e){return Ip(this.el_,e)}addClass(...e){ku(this.el_,...e)}removeClass(...e){e1(this.el_,...e)}toggleClass(e,t){EF(this.el_,e,t)}show(){this.removeClass("vjs-hidden")}hide(){this.addClass("vjs-hidden")}lockShowing(){this.addClass("vjs-lock-showing")}unlockShowing(){this.removeClass("vjs-lock-showing")}getAttribute(e){return PF(this.el_,e)}setAttribute(e,t){nf(this.el_,e,t)}removeAttribute(e){t1(this.el_,e)}width(e,t){return this.dimension("width",e,t)}height(e,t){return this.dimension("height",e,t)}dimensions(e,t){this.width(e,!0),this.height(t)}dimension(e,t,i){if(t!==void 0){(t===null||t!==t)&&(t=0),(""+t).indexOf("%")!==-1||(""+t).indexOf("px")!==-1?this.el_.style[e]=t:t==="auto"?this.el_.style[e]="":this.el_.style[e]=t+"px",i||this.trigger("componentresize");return}if(!this.el_)return 0;const n=this.el_.style[e],a=n.indexOf("px");return parseInt(a!==-1?n.slice(0,a):this.el_["offset"+sr(e)],10)}currentDimension(e){let t=0;if(e!=="width"&&e!=="height")throw new Error("currentDimension only accepts width or height value");if(t=sf(this.el_,e),t=parseFloat(t),t===0||isNaN(t)){const i=`offset${sr(e)}`;t=this.el_[i]}return t}currentDimensions(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}}currentWidth(){return this.currentDimension("width")}currentHeight(){return this.currentDimension("height")}getPositions(){const e=this.el_.getBoundingClientRect(),t={x:e.x,y:e.y,width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left},i={x:e.left+e.width/2,y:e.top+e.height/2,width:0,height:0,top:e.top+e.height/2,right:e.left+e.width/2,bottom:e.top+e.height/2,left:e.left+e.width/2};return{boundingClientRect:t,center:i}}focus(){this.el_.focus()}blur(){this.el_.blur()}handleKeyDown(e){this.player_&&(e.key!=="Tab"&&!(this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled)&&e.stopPropagation(),this.player_.handleKeyDown(e))}handleKeyPress(e){this.handleKeyDown(e)}emitTapEvents(){let e=0,t=null;const i=10,n=200;let a;this.on("touchstart",function(o){o.touches.length===1&&(t={pageX:o.touches[0].pageX,pageY:o.touches[0].pageY},e=H.performance.now(),a=!0)}),this.on("touchmove",function(o){if(o.touches.length>1)a=!1;else if(t){const l=o.touches[0].pageX-t.pageX,u=o.touches[0].pageY-t.pageY;Math.sqrt(l*l+u*u)>i&&(a=!1)}});const s=function(){a=!1};this.on("touchleave",s),this.on("touchcancel",s),this.on("touchend",function(o){t=null,a===!0&&H.performance.now()-e<n&&(o.preventDefault(),this.trigger("tap"))})}enableTouchActivity(){if(!this.player()||!this.player().reportUserActivity)return;const e=$t(this.player(),this.player().reportUserActivity);let t;this.on("touchstart",function(){e(),this.clearInterval(t),t=this.setInterval(e,250)});const i=function(n){e(),this.clearInterval(t)};this.on("touchmove",e),this.on("touchend",i),this.on("touchcancel",i)}setTimeout(e,t){var i;return e=$t(this,e),this.clearTimersOnDispose_(),i=H.setTimeout(()=>{this.setTimeoutIds_.has(i)&&this.setTimeoutIds_.delete(i),e()},t),this.setTimeoutIds_.add(i),i}clearTimeout(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),H.clearTimeout(e)),e}setInterval(e,t){e=$t(this,e),this.clearTimersOnDispose_();const i=H.setInterval(e,t);return this.setIntervalIds_.add(i),i}clearInterval(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),H.clearInterval(e)),e}requestAnimationFrame(e){this.clearTimersOnDispose_();var t;return e=$t(this,e),t=H.requestAnimationFrame(()=>{this.rafIds_.has(t)&&this.rafIds_.delete(t),e()}),this.rafIds_.add(t),t}requestNamedAnimationFrame(e,t){this.namedRafs_.has(e)&&this.cancelNamedAnimationFrame(e),this.clearTimersOnDispose_(),t=$t(this,t);const i=this.requestAnimationFrame(()=>{t(),this.namedRafs_.has(e)&&this.namedRafs_.delete(e)});return this.namedRafs_.set(e,i),e}cancelNamedAnimationFrame(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))}cancelAnimationFrame(e){return this.rafIds_.has(e)&&(this.rafIds_.delete(e),H.cancelAnimationFrame(e)),e}clearTimersOnDispose_(){this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",()=>{[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach(([e,t])=>{this[e].forEach((i,n)=>this[t](n))}),this.clearingTimersOnDispose_=!1}))}getIsDisabled(){return!!this.el_.disabled}getIsExpresslyInert(){return this.el_.inert&&!this.el_.ownerDocument.documentElement.inert}getIsFocusable(e){return(e||this.el_).tabIndex>=0&&!(this.getIsDisabled()||this.getIsExpresslyInert())}getIsAvailableToBeFocused(e){function t(a){const s=H.getComputedStyle(a,null),o=s.getPropertyValue("visibility");return s.getPropertyValue("display")!=="none"&&!["hidden","collapse"].includes(o)}function i(a){return!(!t(a.parentElement)||!t(a)||a.style.opacity==="0"||H.getComputedStyle(a).height==="0px"||H.getComputedStyle(a).width==="0px")}function n(a){if(a.offsetWidth+a.offsetHeight+a.getBoundingClientRect().height+a.getBoundingClientRect().width===0)return!1;const s={x:a.getBoundingClientRect().left+a.offsetWidth/2,y:a.getBoundingClientRect().top+a.offsetHeight/2};if(s.x<0||s.x>(pe.documentElement.clientWidth||H.innerWidth)||s.y<0||s.y>(pe.documentElement.clientHeight||H.innerHeight))return!1;let o=pe.elementFromPoint(s.x,s.y);for(;o;){if(o===a)return!0;if(o.parentNode)o=o.parentNode;else return!1}}return e||(e=this.el()),!!(n(e)&&i(e)&&(!e.parentElement||e.tabIndex>=0))}static registerComponent(e,t){if(typeof e!="string"||!e)throw new Error(`Illegal component name, "${e}"; must be a non-empty string.`);const i=se.getComponent("Tech"),n=i&&i.isTech(t),a=se===t||se.prototype.isPrototypeOf(t.prototype);if(n||!a){let o;throw n?o="techs must be registered using Tech.registerTech()":o="must be a Component subclass",new Error(`Illegal component, "${e}"; ${o}.`)}e=sr(e),se.components_||(se.components_={});const s=se.getComponent("Player");if(e==="Player"&&s&&s.players){const o=s.players,l=Object.keys(o);if(o&&l.length>0&&l.map(u=>o[u]).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return se.components_[e]=t,se.components_[Pp(e)]=t,t}static getComponent(e){if(!(!e||!se.components_))return se.components_[e]}}se.registerComponent("Component",se);function Fte(r,e,t){if(typeof e!="number"||e<0||e>t)throw new Error(`Failed to execute '${r}' on 'TimeRanges': The index provided (${e}) is non-numeric or out of bounds (0-${t}).`)}function mM(r,e,t,i){return Fte(r,i,t.length-1),t[i][e]}function Bb(r){let e;return r===void 0||r.length===0?e={length:0,start(){throw new Error("This TimeRanges object is empty")},end(){throw new Error("This TimeRanges object is empty")}}:e={length:r.length,start:mM.bind(null,"start",0,r),end:mM.bind(null,"end",1,r)},H.Symbol&&H.Symbol.iterator&&(e[H.Symbol.iterator]=()=>(r||[]).values()),e}function ba(r,e){return Array.isArray(r)?Bb(r):r===void 0||e===void 0?Bb():Bb([[r,e]])}const jF=function(r,e){r=r<0?0:r;let t=Math.floor(r%60),i=Math.floor(r/60%60),n=Math.floor(r/3600);const a=Math.floor(e/60%60),s=Math.floor(e/3600);return(isNaN(r)||r===1/0)&&(n=i=t="-"),n=n>0||s>0?n+":":"",i=((n||a>=10)&&i<10?"0"+i:i)+":",t=t<10?"0"+t:t,n+i+t};let dA=jF;function XF(r){dA=r}function YF(){dA=jF}function Ju(r,e=r){return dA(r,e)}var Ute=Object.freeze({__proto__:null,createTimeRanges:ba,createTimeRange:ba,setFormatTime:XF,resetFormatTime:YF,formatTime:Ju});function KF(r,e){let t=0,i,n;if(!e)return 0;(!r||!r.length)&&(r=ba(0,0));for(let a=0;a<r.length;a++)i=r.start(a),n=r.end(a),n>e&&(n=e),t+=n-i;return t/e}function rr(r){if(r instanceof rr)return r;typeof r=="number"?this.code=r:typeof r=="string"?this.message=r:us(r)&&(typeof r.code=="number"&&(this.code=r.code),Object.assign(this,r)),this.message||(this.message=rr.defaultMessages[this.code]||"")}rr.prototype.code=0;rr.prototype.message="";rr.prototype.status=null;rr.prototype.metadata=null;rr.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"];rr.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."};rr.MEDIA_ERR_CUSTOM=0;rr.prototype.MEDIA_ERR_CUSTOM=0;rr.MEDIA_ERR_ABORTED=1;rr.prototype.MEDIA_ERR_ABORTED=1;rr.MEDIA_ERR_NETWORK=2;rr.prototype.MEDIA_ERR_NETWORK=2;rr.MEDIA_ERR_DECODE=3;rr.prototype.MEDIA_ERR_DECODE=3;rr.MEDIA_ERR_SRC_NOT_SUPPORTED=4;rr.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED=4;rr.MEDIA_ERR_ENCRYPTED=5;rr.prototype.MEDIA_ERR_ENCRYPTED=5;function Mp(r){return r!=null&&typeof r.then=="function"}function Ya(r){Mp(r)&&r.then(null,e=>{})}const aw=function(r){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((t,i,n)=>(r[i]&&(t[i]=r[i]),t),{cues:r.cues&&Array.prototype.map.call(r.cues,function(t){return{startTime:t.startTime,endTime:t.endTime,text:t.text,id:t.id}})})},Vte=function(r){const e=r.$$("track"),t=Array.prototype.map.call(e,n=>n.track);return Array.prototype.map.call(e,function(n){const a=aw(n.track);return n.src&&(a.src=n.src),a}).concat(Array.prototype.filter.call(r.textTracks(),function(n){return t.indexOf(n)===-1}).map(aw))},zte=function(r,e){return r.forEach(function(t){const i=e.addRemoteTextTrack(t).track;!t.src&&t.cues&&t.cues.forEach(n=>i.addCue(n))}),e.textTracks()};var yM={textTracksToJson:Vte,jsonToTextTracks:zte,trackToJson_:aw};const Fb="vjs-modal-dialog";class kf extends se{constructor(e,t){super(e,t),this.handleKeyDown_=i=>this.handleKeyDown(i),this.close_=i=>this.close(i),this.opened_=this.hasBeenOpened_=this.hasBeenFilled_=!1,this.closeable(!this.options_.uncloseable),this.content(this.options_.content),this.contentEl_=Ze("div",{className:`${Fb}-content`},{role:"document"}),this.descEl_=Ze("p",{className:`${Fb}-description vjs-control-text`,id:this.el().getAttribute("aria-describedby")}),fl(this.descEl_,this.description()),this.el_.appendChild(this.descEl_),this.el_.appendChild(this.contentEl_)}createEl(){return super.createEl("div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":`${this.id()}_description`,"aria-hidden":"true","aria-label":this.label(),role:"dialog","aria-live":"polite"})}dispose(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,super.dispose()}buildCSSClass(){return`${Fb} vjs-hidden ${super.buildCSSClass()}`}label(){return this.localize(this.options_.label||"Modal Window")}description(){let e=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(e+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),e}open(){if(this.opened_){this.options_.fillAlways&&this.fill();return}const e=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on("keydown",this.handleKeyDown_),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}opened(e){return typeof e=="boolean"&&this[e?"open":"close"](),this.opened_}close(){if(!this.opened_)return;const e=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off("keydown",this.handleKeyDown_),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger({type:"modalclose",bubbles:!0}),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}closeable(e){if(typeof e=="boolean"){const t=this.closeable_=!!e;let i=this.getChild("closeButton");if(t&&!i){const n=this.contentEl_;this.contentEl_=this.el_,i=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=n,this.on(i,"close",this.close_)}!t&&i&&(this.off(i,"close",this.close_),this.removeChild(i),i.dispose())}return this.closeable_}fill(){this.fillWith(this.content())}fillWith(e){const t=this.contentEl(),i=t.parentNode,n=t.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,i.removeChild(t),this.empty(),OF(t,e),this.trigger("modalfill"),n?i.insertBefore(t,n):i.appendChild(t);const a=this.getChild("closeButton");a&&i.appendChild(a.el_),this.trigger("aftermodalfill")}empty(){this.trigger("beforemodalempty"),i1(this.contentEl()),this.trigger("modalempty")}content(e){return typeof e<"u"&&(this.content_=e),this.content_}conditionalFocus_(){const e=pe.activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===e)&&(this.previouslyActiveEl_=e,this.focus())}conditionalBlur_(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)}handleKeyDown(e){if(this.trigger({type:"modalKeydown",originalEvent:e,target:this,bubbles:!0}),e.stopPropagation(),e.key==="Escape"&&this.closeable()){e.preventDefault(),this.close();return}if(e.key!=="Tab")return;const t=this.focusableEls_(),i=this.el_.querySelector(":focus");let n;for(let a=0;a<t.length;a++)if(i===t[a]){n=a;break}pe.activeElement===this.el_&&(n=0),e.shiftKey&&n===0?(t[t.length-1].focus(),e.preventDefault()):!e.shiftKey&&n===t.length-1&&(t[0].focus(),e.preventDefault())}focusableEls_(){const e=this.el_.querySelectorAll("*");return Array.prototype.filter.call(e,t=>(t instanceof H.HTMLAnchorElement||t instanceof H.HTMLAreaElement)&&t.hasAttribute("href")||(t instanceof H.HTMLInputElement||t instanceof H.HTMLSelectElement||t instanceof H.HTMLTextAreaElement||t instanceof H.HTMLButtonElement)&&!t.hasAttribute("disabled")||t instanceof H.HTMLIFrameElement||t instanceof H.HTMLObjectElement||t instanceof H.HTMLEmbedElement||t.hasAttribute("tabindex")&&t.getAttribute("tabindex")!==-1||t.hasAttribute("contenteditable"))}}kf.prototype.options_={pauseOnOpen:!0,temporary:!0};se.registerComponent("ModalDialog",kf);class of extends xn{constructor(e=[]){super(),this.tracks_=[],Object.defineProperty(this,"length",{get(){return this.tracks_.length}});for(let t=0;t<e.length;t++)this.addTrack(e[t])}addTrack(e){const t=this.tracks_.length;""+t in this||Object.defineProperty(this,t,{get(){return this.tracks_[t]}}),this.tracks_.indexOf(e)===-1&&(this.tracks_.push(e),this.trigger({track:e,type:"addtrack",target:this})),e.labelchange_=()=>{this.trigger({track:e,type:"labelchange",target:this})},Hs(e)&&e.addEventListener("labelchange",e.labelchange_)}removeTrack(e){let t;for(let i=0,n=this.length;i<n;i++)if(this[i]===e){t=this[i],t.off&&t.off(),this.tracks_.splice(i,1);break}t&&this.trigger({track:t,type:"removetrack",target:this})}getTrackById(e){let t=null;for(let i=0,n=this.length;i<n;i++){const a=this[i];if(a.id===e){t=a;break}}return t}}of.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"};for(const r in of.prototype.allowedEvents_)of.prototype["on"+r]=null;const Ub=function(r,e){for(let t=0;t<r.length;t++)!Object.keys(r[t]).length||e.id===r[t].id||(r[t].enabled=!1)};class Gte extends of{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].enabled){Ub(e,e[t]);break}super(e),this.changing_=!1}addTrack(e){e.enabled&&Ub(this,e),super.addTrack(e),e.addEventListener&&(e.enabledChange_=()=>{this.changing_||(this.changing_=!0,Ub(this,e),this.changing_=!1,this.trigger("change"))},e.addEventListener("enabledchange",e.enabledChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener("enabledchange",e.enabledChange_),e.enabledChange_=null)}}const Vb=function(r,e){for(let t=0;t<r.length;t++)!Object.keys(r[t]).length||e.id===r[t].id||(r[t].selected=!1)};class Hte extends of{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].selected){Vb(e,e[t]);break}super(e),this.changing_=!1,Object.defineProperty(this,"selectedIndex",{get(){for(let t=0;t<this.length;t++)if(this[t].selected)return t;return-1},set(){}})}addTrack(e){e.selected&&Vb(this,e),super.addTrack(e),e.addEventListener&&(e.selectedChange_=()=>{this.changing_||(this.changing_=!0,Vb(this,e),this.changing_=!1,this.trigger("change"))},e.addEventListener("selectedchange",e.selectedChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.selectedChange_&&(e.removeEventListener("selectedchange",e.selectedChange_),e.selectedChange_=null)}}class ZF extends of{addTrack(e){super.addTrack(e),this.queueChange_||(this.queueChange_=()=>this.queueTrigger("change")),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=()=>this.trigger("selectedlanguagechange")),e.addEventListener("modechange",this.queueChange_),["metadata","chapters"].indexOf(e.kind)===-1&&e.addEventListener("modechange",this.triggerSelectedlanguagechange_)}removeTrack(e){super.removeTrack(e),e.removeEventListener&&(this.queueChange_&&e.removeEventListener("modechange",this.queueChange_),this.selectedlanguagechange_&&e.removeEventListener("modechange",this.triggerSelectedlanguagechange_))}}class $te{constructor(e=[]){this.trackElements_=[],Object.defineProperty(this,"length",{get(){return this.trackElements_.length}});for(let t=0,i=e.length;t<i;t++)this.addTrackElement_(e[t])}addTrackElement_(e){const t=this.trackElements_.length;""+t in this||Object.defineProperty(this,t,{get(){return this.trackElements_[t]}}),this.trackElements_.indexOf(e)===-1&&this.trackElements_.push(e)}getTrackElementByTrack_(e){let t;for(let i=0,n=this.trackElements_.length;i<n;i++)if(e===this.trackElements_[i].track){t=this.trackElements_[i];break}return t}removeTrackElement_(e){for(let t=0,i=this.trackElements_.length;t<i;t++)if(e===this.trackElements_[t]){this.trackElements_[t].track&&typeof this.trackElements_[t].track.off=="function"&&this.trackElements_[t].track.off(),typeof this.trackElements_[t].off=="function"&&this.trackElements_[t].off(),this.trackElements_.splice(t,1);break}}}class d0{constructor(e){d0.prototype.setCues_.call(this,e),Object.defineProperty(this,"length",{get(){return this.length_}})}setCues_(e){const t=this.length||0;let i=0;const n=e.length;this.cues_=e,this.length_=e.length;const a=function(s){""+s in this||Object.defineProperty(this,""+s,{get(){return this.cues_[s]}})};if(t<n)for(i=t;i<n;i++)a.call(this,i)}getCueById(e){let t=null;for(let i=0,n=this.length;i<n;i++){const a=this[i];if(a.id===e){t=a;break}}return t}}const Wte={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},qte={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},jte={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},_M={disabled:"disabled",hidden:"hidden",showing:"showing"};let pA=class extends xn{constructor(e={}){super();const t={id:e.id||"vjs_track_"+Yn(),kind:e.kind||"",language:e.language||""};let i=e.label||"";for(const n in t)Object.defineProperty(this,n,{get(){return t[n]},set(){}});Object.defineProperty(this,"label",{get(){return i},set(n){n!==i&&(i=n,this.trigger("labelchange"))}})}};const vA=function(r){return new URL(r,pe.baseURI)},QF=function(r){return new URL(r,pe.baseURI).href},gA=function(r){if(typeof r=="string"){const t=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/.exec(r);if(t)return t.pop().toLowerCase()}return""},o1=function(r,e=H.location){return vA(r).origin!==e.origin};var Xte=Object.freeze({__proto__:null,parseUrl:vA,getAbsoluteURL:QF,getFileExtension:gA,isCrossOrigin:o1});const bM=function(r,e){const t=new H.WebVTT.Parser(H,H.vttjs,H.WebVTT.StringDecoder()),i=[];t.oncue=function(n){e.addCue(n)},t.onparsingerror=function(n){i.push(n)},t.onflush=function(){e.trigger({type:"loadeddata",target:e})},t.parse(r),i.length>0&&(H.console&&H.console.groupCollapsed&&H.console.groupCollapsed(`Text Track parsing errors for ${e.src}`),i.forEach(n=>vt.error(n)),H.console&&H.console.groupEnd&&H.console.groupEnd()),t.flush()},SM=function(r,e){const t={uri:r},i=o1(r);i&&(t.cors=i);const n=e.tech_.crossOrigin()==="use-credentials";n&&(t.withCredentials=n),b4(t,$t(this,function(a,s,o){if(a)return vt.error(a,s);e.loaded_=!0,typeof H.WebVTT!="function"?e.tech_&&e.tech_.any(["vttjsloaded","vttjserror"],l=>{if(l.type==="vttjserror"){vt.error(`vttjs failed to load, stopping trying to process ${e.src}`);return}return bM(o,e)}):bM(o,e)}))};class og extends pA{constructor(e={}){if(!e.tech)throw new Error("A tech was not provided.");const t=zt(e,{kind:jte[e.kind]||"subtitles",language:e.language||e.srclang||""});let i=_M[t.mode]||"disabled";const n=t.default;(t.kind==="metadata"||t.kind==="chapters")&&(i="hidden"),super(t),this.tech_=t.tech,this.cues_=[],this.activeCues_=[],this.preload_=this.tech_.preloadTextTracks!==!1;const a=new d0(this.cues_),s=new d0(this.activeCues_);let o=!1;this.timeupdateHandler=$t(this,function(u={}){if(!this.tech_.isDisposed()){if(!this.tech_.isReady_){u.type!=="timeupdate"&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler));return}this.activeCues=this.activeCues,o&&(this.trigger("cuechange"),o=!1),u.type!=="timeupdate"&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))}});const l=()=>{this.stopTracking()};this.tech_.one("dispose",l),i!=="disabled"&&this.startTracking(),Object.defineProperties(this,{default:{get(){return n},set(){}},mode:{get(){return i},set(u){_M[u]&&i!==u&&(i=u,!this.preload_&&i!=="disabled"&&this.cues.length===0&&SM(this.src,this),this.stopTracking(),i!=="disabled"&&this.startTracking(),this.trigger("modechange"))}},cues:{get(){return this.loaded_?a:null},set(){}},activeCues:{get(){if(!this.loaded_)return null;if(this.cues.length===0)return s;const u=this.tech_.currentTime(),c=[];for(let h=0,d=this.cues.length;h<d;h++){const f=this.cues[h];f.startTime<=u&&f.endTime>=u&&c.push(f)}if(o=!1,c.length!==this.activeCues_.length)o=!0;else for(let h=0;h<c.length;h++)this.activeCues_.indexOf(c[h])===-1&&(o=!0);return this.activeCues_=c,s.setCues_(this.activeCues_),s},set(){}}}),t.src?(this.src=t.src,this.preload_||(this.loaded_=!0),(this.preload_||t.kind!=="subtitles"&&t.kind!=="captions")&&SM(this.src,this)):this.loaded_=!0}startTracking(){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler),this.tech_.on("timeupdate",this.timeupdateHandler)}stopTracking(){this.rvf_&&(this.tech_.cancelVideoFrameCallback(this.rvf_),this.rvf_=void 0),this.tech_.off("timeupdate",this.timeupdateHandler)}addCue(e){let t=e;if(!("getCueAsHTML"in t)){t=new H.vttjs.VTTCue(e.startTime,e.endTime,e.text);for(const n in e)n in t||(t[n]=e[n]);t.id=e.id,t.originalCue_=e}const i=this.tech_.textTracks();for(let n=0;n<i.length;n++)i[n]!==this&&i[n].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)}removeCue(e){let t=this.cues_.length;for(;t--;){const i=this.cues_[t];if(i===e||i.originalCue_&&i.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}}}og.prototype.allowedEvents_={cuechange:"cuechange"};class JF extends pA{constructor(e={}){const t=zt(e,{kind:qte[e.kind]||""});super(t);let i=!1;Object.defineProperty(this,"enabled",{get(){return i},set(n){typeof n!="boolean"||n===i||(i=n,this.trigger("enabledchange"))}}),t.enabled&&(this.enabled=t.enabled),this.loaded_=!0}}class e8 extends pA{constructor(e={}){const t=zt(e,{kind:Wte[e.kind]||""});super(t);let i=!1;Object.defineProperty(this,"selected",{get(){return i},set(n){typeof n!="boolean"||n===i||(i=n,this.trigger("selectedchange"))}}),t.selected&&(this.selected=t.selected)}}class Ys extends xn{constructor(e={}){super();let t;const i=new og(e);this.kind=i.kind,this.src=i.src,this.srclang=i.language,this.label=i.label,this.default=i.default,Object.defineProperties(this,{readyState:{get(){return t}},track:{get(){return i}}}),t=Ys.NONE,i.addEventListener("loadeddata",()=>{t=Ys.LOADED,this.trigger({type:"load",target:this})})}}Ys.prototype.allowedEvents_={load:"load"};Ys.NONE=0;Ys.LOADING=1;Ys.LOADED=2;Ys.ERROR=3;const jn={audio:{ListClass:Gte,TrackClass:JF,capitalName:"Audio"},video:{ListClass:Hte,TrackClass:e8,capitalName:"Video"},text:{ListClass:ZF,TrackClass:og,capitalName:"Text"}};Object.keys(jn).forEach(function(r){jn[r].getterName=`${r}Tracks`,jn[r].privateName=`${r}Tracks_`});const lf={remoteText:{ListClass:ZF,TrackClass:og,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:$te,TrackClass:Ys,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},Ai=Object.assign({},jn,lf);lf.names=Object.keys(lf);jn.names=Object.keys(jn);Ai.names=[].concat(lf.names).concat(jn.names);function Yte(r,e,t,i,n={}){const a=r.textTracks();n.kind=e,t&&(n.label=t),i&&(n.language=i),n.tech=r;const s=new Ai.text.TrackClass(n);return a.addTrack(s),s}class it extends se{constructor(e={},t=function(){}){e.reportTouchActivity=!1,super(null,e,t),this.onDurationChange_=i=>this.onDurationChange(i),this.trackProgress_=i=>this.trackProgress(i),this.trackCurrentTime_=i=>this.trackCurrentTime(i),this.stopTrackingCurrentTime_=i=>this.stopTrackingCurrentTime(i),this.disposeSourceHandler_=i=>this.disposeSourceHandler(i),this.queuedHanders_=new Set,this.hasStarted_=!1,this.on("playing",function(){this.hasStarted_=!0}),this.on("loadstart",function(){this.hasStarted_=!1}),Ai.names.forEach(i=>{const n=Ai[i];e&&e[n.getterName]&&(this[n.privateName]=e[n.getterName])}),this.featuresProgressEvents||this.manualProgressOn(),this.featuresTimeupdateEvents||this.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(i=>{e[`native${i}Tracks`]===!1&&(this[`featuresNative${i}Tracks`]=!1)}),e.nativeCaptions===!1||e.nativeTextTracks===!1?this.featuresNativeTextTracks=!1:(e.nativeCaptions===!0||e.nativeTextTracks===!0)&&(this.featuresNativeTextTracks=!0),this.featuresNativeTextTracks||this.emulateTextTracks(),this.preloadTextTracks=e.preloadTextTracks!==!1,this.autoRemoteTextTracks_=new Ai.text.ListClass,this.initTrackListeners(),e.nativeControlsForTouch||this.emitTapEvents(),this.constructor&&(this.name_=this.constructor.name||"Unknown Tech")}triggerSourceset(e){this.isReady_||this.one("ready",()=>this.setTimeout(()=>this.triggerSourceset(e),1)),this.trigger({src:e,type:"sourceset"})}manualProgressOn(){this.on("durationchange",this.onDurationChange_),this.manualProgress=!0,this.one("ready",this.trackProgress_)}manualProgressOff(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange_)}trackProgress(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval($t(this,function(){const t=this.bufferedPercent();this.bufferedPercent_!==t&&this.trigger("progress"),this.bufferedPercent_=t,t===1&&this.stopTrackingProgress()}),500)}onDurationChange(e){this.duration_=this.duration()}buffered(){return ba(0,0)}bufferedPercent(){return KF(this.buffered(),this.duration_)}stopTrackingProgress(){this.clearInterval(this.progressInterval)}manualTimeUpdatesOn(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime_),this.on("pause",this.stopTrackingCurrentTime_)}manualTimeUpdatesOff(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime_),this.off("pause",this.stopTrackingCurrentTime_)}trackCurrentTime(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)}stopTrackingCurrentTime(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}dispose(){this.clearTracks(jn.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),super.dispose()}clearTracks(e){e=[].concat(e),e.forEach(t=>{const i=this[`${t}Tracks`]()||[];let n=i.length;for(;n--;){const a=i[n];t==="text"&&this.removeRemoteTextTrack(a),i.removeTrack(a)}})}cleanupAutoTextTracks(){const e=this.autoRemoteTextTracks_||[];let t=e.length;for(;t--;){const i=e[t];this.removeRemoteTextTrack(i)}}reset(){}crossOrigin(){}setCrossOrigin(){}error(e){return e!==void 0&&(this.error_=new rr(e),this.trigger("error")),this.error_}played(){return this.hasStarted_?ba(0,0):ba()}play(){}setScrubbing(e){}scrubbing(){}setCurrentTime(e){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}initTrackListeners(){jn.names.forEach(e=>{const t=jn[e],i=()=>{this.trigger(`${e}trackchange`)},n=this[t.getterName]();n.addEventListener("removetrack",i),n.addEventListener("addtrack",i),this.on("dispose",()=>{n.removeEventListener("removetrack",i),n.removeEventListener("addtrack",i)})})}addWebVttScript_(){if(!H.WebVTT)if(pe.body.contains(this.el())){if(!this.options_["vtt.js"]&&rf(FP)&&Object.keys(FP).length>0){this.trigger("vttjsloaded");return}const e=pe.createElement("script");e.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",e.onload=()=>{this.trigger("vttjsloaded")},e.onerror=()=>{this.trigger("vttjserror")},this.on("dispose",()=>{e.onload=null,e.onerror=null}),H.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)}emulateTextTracks(){const e=this.textTracks(),t=this.remoteTextTracks(),i=o=>e.addTrack(o.track),n=o=>e.removeTrack(o.track);t.on("addtrack",i),t.on("removetrack",n),this.addWebVttScript_();const a=()=>this.trigger("texttrackchange"),s=()=>{a();for(let o=0;o<e.length;o++){const l=e[o];l.removeEventListener("cuechange",a),l.mode==="showing"&&l.addEventListener("cuechange",a)}};s(),e.addEventListener("change",s),e.addEventListener("addtrack",s),e.addEventListener("removetrack",s),this.on("dispose",function(){t.off("addtrack",i),t.off("removetrack",n),e.removeEventListener("change",s),e.removeEventListener("addtrack",s),e.removeEventListener("removetrack",s);for(let o=0;o<e.length;o++)e[o].removeEventListener("cuechange",a)})}addTextTrack(e,t,i){if(!e)throw new Error("TextTrack kind is required but was not provided");return Yte(this,e,t,i)}createRemoteTextTrack(e){const t=zt(e,{tech:this});return new lf.remoteTextEl.TrackClass(t)}addRemoteTextTrack(e={},t){const i=this.createRemoteTextTrack(e);return typeof t!="boolean"&&(t=!1),this.remoteTextTrackEls().addTrackElement_(i),this.remoteTextTracks().addTrack(i.track),t===!1&&this.ready(()=>this.autoRemoteTextTracks_.addTrack(i.track)),i}removeRemoteTextTrack(e){const t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)}getVideoPlaybackQuality(){return{}}requestPictureInPicture(){return Promise.reject()}disablePictureInPicture(){return!0}setDisablePictureInPicture(){}requestVideoFrameCallback(e){const t=Yn();return!this.isReady_||this.paused()?(this.queuedHanders_.add(t),this.one("playing",()=>{this.queuedHanders_.has(t)&&(this.queuedHanders_.delete(t),e())})):this.requestNamedAnimationFrame(t,e),t}cancelVideoFrameCallback(e){this.queuedHanders_.has(e)?this.queuedHanders_.delete(e):this.cancelNamedAnimationFrame(e)}setPoster(){}playsinline(){}setPlaysinline(){}overrideNativeAudioTracks(e){}overrideNativeVideoTracks(e){}canPlayType(e){return""}static canPlayType(e){return""}static canPlaySource(e,t){return it.canPlayType(e.type)}static isTech(e){return e.prototype instanceof it||e instanceof it||e===it}static registerTech(e,t){if(it.techs_||(it.techs_={}),!it.isTech(t))throw new Error(`Tech ${e} must be a Tech`);if(!it.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!it.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=sr(e),it.techs_[e]=t,it.techs_[Pp(e)]=t,e!=="Tech"&&it.defaultTechOrder_.push(e),t}static getTech(e){if(e){if(it.techs_&&it.techs_[e])return it.techs_[e];if(e=sr(e),H&&H.videojs&&H.videojs[e])return vt.warn(`The ${e} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`),H.videojs[e]}}}Ai.names.forEach(function(r){const e=Ai[r];it.prototype[e.getterName]=function(){return this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName]}});it.prototype.featuresVolumeControl=!0;it.prototype.featuresMuteControl=!0;it.prototype.featuresFullscreenResize=!1;it.prototype.featuresPlaybackRate=!1;it.prototype.featuresProgressEvents=!1;it.prototype.featuresSourceset=!1;it.prototype.featuresTimeupdateEvents=!1;it.prototype.featuresNativeTextTracks=!1;it.prototype.featuresVideoFrameCallback=!1;it.withSourceHandlers=function(r){r.registerSourceHandler=function(t,i){let n=r.sourceHandlers;n||(n=r.sourceHandlers=[]),i===void 0&&(i=n.length),n.splice(i,0,t)},r.canPlayType=function(t){const i=r.sourceHandlers||[];let n;for(let a=0;a<i.length;a++)if(n=i[a].canPlayType(t),n)return n;return""},r.selectSourceHandler=function(t,i){const n=r.sourceHandlers||[];let a;for(let s=0;s<n.length;s++)if(a=n[s].canHandleSource(t,i),a)return n[s];return null},r.canPlaySource=function(t,i){const n=r.selectSourceHandler(t,i);return n?n.canHandleSource(t,i):""},["seekable","seeking","duration"].forEach(function(t){const i=this[t];typeof i=="function"&&(this[t]=function(){return this.sourceHandler_&&this.sourceHandler_[t]?this.sourceHandler_[t].apply(this.sourceHandler_,arguments):i.apply(this,arguments)})},r.prototype),r.prototype.setSource=function(t){let i=r.selectSourceHandler(t,this.options_);i||(r.nativeSourceHandler?i=r.nativeSourceHandler:vt.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler_),i!==r.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=i.handleSource(t,this,this.options_),this.one("dispose",this.disposeSourceHandler_)},r.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}};se.registerComponent("Tech",it);it.registerTech("Tech",it);it.defaultTechOrder_=[];const Ru={},p0={},v0={};function Kte(r,e){Ru[r]=Ru[r]||[],Ru[r].push(e)}function Zte(r,e,t){r.setTimeout(()=>nu(e,Ru[e.type],t,r),1)}function Qte(r,e){r.forEach(t=>t.setTech&&t.setTech(e))}function Jte(r,e,t){return r.reduceRight(mA(t),e[t]())}function ere(r,e,t,i){return e[t](r.reduce(mA(t),i))}function TM(r,e,t,i=null){const n="call"+sr(t),a=r.reduce(mA(n),i),s=a===v0,o=s?null:e[t](a);return ire(r,t,o,s),o}const tre={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},rre={setCurrentTime:1,setMuted:1,setVolume:1},xM={play:1,pause:1};function mA(r){return(e,t)=>e===v0?v0:t[r]?t[r](e):e}function ire(r,e,t,i){for(let n=r.length-1;n>=0;n--){const a=r[n];a[e]&&a[e](i,t)}}function nre(r){p0.hasOwnProperty(r.id())&&delete p0[r.id()]}function are(r,e){const t=p0[r.id()];let i=null;if(t==null)return i=e(r),p0[r.id()]=[[e,i]],i;for(let n=0;n<t.length;n++){const[a,s]=t[n];a===e&&(i=s)}return i===null&&(i=e(r),t.push([e,i])),i}function nu(r={},e=[],t,i,n=[],a=!1){const[s,...o]=e;if(typeof s=="string")nu(r,Ru[s],t,i,n,a);else if(s){const l=are(i,s);if(!l.setSource)return n.push(l),nu(r,o,t,i,n,a);l.setSource(Object.assign({},r),function(u,c){if(u)return nu(r,o,t,i,n,a);n.push(l),nu(c,r.type===c.type?o:Ru[c.type],t,i,n,a)})}else o.length?nu(r,o,t,i,n,a):a?t(r,n):nu(r,Ru["*"],t,i,n,!0)}const sre={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",m4a:"audio/mp4",mp3:"audio/mpeg",aac:"audio/aac",caf:"audio/x-caf",flac:"audio/flac",oga:"audio/ogg",wav:"audio/wav",m3u8:"application/x-mpegURL",mpd:"application/dash+xml",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"},g0=function(r=""){const e=gA(r);return sre[e.toLowerCase()]||""},ore=(r,e)=>{if(!e)return"";if(r.cache_.source.src===e&&r.cache_.source.type)return r.cache_.source.type;const t=r.cache_.sources.filter(n=>n.src===e);if(t.length)return t[0].type;const i=r.$$("source");for(let n=0;n<i.length;n++){const a=i[n];if(a.type&&a.src&&a.src===e)return a.type}return g0(e)},t8=function(r){if(Array.isArray(r)){let e=[];r.forEach(function(t){t=t8(t),Array.isArray(t)?e=e.concat(t):us(t)&&e.push(t)}),r=e}else typeof r=="string"&&r.trim()?r=[wM({src:r})]:us(r)&&typeof r.src=="string"&&r.src&&r.src.trim()?r=[wM(r)]:r=[];return r};function wM(r){if(!r.type){const e=g0(r.src);e&&(r.type=e)}return r}var lre=`<svg xmlns="http://www.w3.org/2000/svg">
|
||
<defs>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-play">
|
||
<path d="M16 10v28l22-14z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-pause">
|
||
<path d="M12 38h8V10h-8v28zm16-28v28h8V10h-8z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-audio">
|
||
<path d="M24 2C14.06 2 6 10.06 6 20v14c0 3.31 2.69 6 6 6h6V24h-8v-4c0-7.73 6.27-14 14-14s14 6.27 14 14v4h-8v16h6c3.31 0 6-2.69 6-6V20c0-9.94-8.06-18-18-18z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-captions">
|
||
<path d="M38 8H10c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM22 22h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2zm14 0h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-subtitles">
|
||
<path d="M40 8H8c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h32c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM8 24h8v4H8v-4zm20 12H8v-4h20v4zm12 0h-8v-4h8v4zm0-8H20v-4h20v4z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-fullscreen-enter">
|
||
<path d="M14 28h-4v10h10v-4h-6v-6zm-4-8h4v-6h6v-4H10v10zm24 14h-6v4h10V28h-4v6zm-6-24v4h6v6h4V10H28z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-fullscreen-exit">
|
||
<path d="M10 32h6v6h4V28H10v4zm6-16h-6v4h10V10h-4v6zm12 22h4v-6h6v-4H28v10zm4-22v-6h-4v10h10v-4h-6z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-play-circle">
|
||
<path d="M20 33l12-9-12-9v18zm4-29C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-volume-mute">
|
||
<path d="M33 24c0-3.53-2.04-6.58-5-8.05v4.42l4.91 4.91c.06-.42.09-.85.09-1.28zm5 0c0 1.88-.41 3.65-1.08 5.28l3.03 3.03C41.25 29.82 42 27 42 24c0-8.56-5.99-15.72-14-17.54v4.13c5.78 1.72 10 7.07 10 13.41zM8.55 6L6 8.55 15.45 18H6v12h8l10 10V26.55l8.51 8.51c-1.34 1.03-2.85 1.86-4.51 2.36v4.13a17.94 17.94 0 0 0 7.37-3.62L39.45 42 42 39.45l-18-18L8.55 6zM24 8l-4.18 4.18L24 16.36V8z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-volume-low">
|
||
<path d="M14 18v12h8l10 10V8L22 18h-8z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-volume-medium">
|
||
<path d="M37 24c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zm-27-6v12h8l10 10V8L18 18h-8z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-volume-high">
|
||
<path d="M6 18v12h8l10 10V8L14 18H6zm27 6c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zM28 6.46v4.13c5.78 1.72 10 7.07 10 13.41s-4.22 11.69-10 13.41v4.13c8.01-1.82 14-8.97 14-17.54S36.01 8.28 28 6.46z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-spinner">
|
||
<path d="M18.8 21l9.53-16.51C26.94 4.18 25.49 4 24 4c-4.8 0-9.19 1.69-12.64 4.51l7.33 12.69.11-.2zm24.28-3c-1.84-5.85-6.3-10.52-11.99-12.68L23.77 18h19.31zm.52 2H28.62l.58 1 9.53 16.5C41.99 33.94 44 29.21 44 24c0-1.37-.14-2.71-.4-4zm-26.53 4l-7.8-13.5C6.01 14.06 4 18.79 4 24c0 1.37.14 2.71.4 4h14.98l-2.31-4zM4.92 30c1.84 5.85 6.3 10.52 11.99 12.68L24.23 30H4.92zm22.54 0l-7.8 13.51c1.4.31 2.85.49 4.34.49 4.8 0 9.19-1.69 12.64-4.51L29.31 26.8 27.46 30z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 24 24" id="vjs-icon-hd">
|
||
<path d="M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-8 12H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11v6zm2-6h4c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1h-4V9zm1.5 4.5h2v-3h-2v3z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-chapters">
|
||
<path d="M6 26h4v-4H6v4zm0 8h4v-4H6v4zm0-16h4v-4H6v4zm8 8h28v-4H14v4zm0 8h28v-4H14v4zm0-20v4h28v-4H14z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 40 40" id="vjs-icon-downloading">
|
||
<path d="M18.208 36.875q-3.208-.292-5.979-1.729-2.771-1.438-4.812-3.729-2.042-2.292-3.188-5.229-1.146-2.938-1.146-6.23 0-6.583 4.334-11.416 4.333-4.834 10.833-5.5v3.166q-5.167.75-8.583 4.646Q6.25 14.75 6.25 19.958q0 5.209 3.396 9.104 3.396 3.896 8.562 4.646zM20 28.417L11.542 20l2.083-2.083 4.917 4.916v-11.25h2.916v11.25l4.875-4.916L28.417 20zm1.792 8.458v-3.167q1.833-.25 3.541-.958 1.709-.708 3.167-1.875l2.333 2.292q-1.958 1.583-4.25 2.541-2.291.959-4.791 1.167zm6.791-27.792q-1.541-1.125-3.25-1.854-1.708-.729-3.541-1.021V3.042q2.5.25 4.77 1.208 2.271.958 4.271 2.5zm4.584 21.584l-2.25-2.25q1.166-1.5 1.854-3.209.687-1.708.937-3.541h3.209q-.292 2.5-1.229 4.791-.938 2.292-2.521 4.209zm.541-12.417q-.291-1.833-.958-3.562-.667-1.73-1.833-3.188l2.375-2.208q1.541 1.916 2.458 4.208.917 2.292 1.167 4.75z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-file-download">
|
||
<path d="M10.8 40.55q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h26.35v-7.7h3.4v7.7q0 1.4-1 2.4t-2.4 1zM24 32.1L13.9 22.05l2.45-2.45 5.95 5.95V7.15h3.4v18.4l5.95-5.95 2.45 2.45z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-file-download-done">
|
||
<path d="M9.8 40.5v-3.45h28.4v3.45zm9.2-9.05L7.4 19.85l2.45-2.35L19 26.65l19.2-19.2 2.4 2.4z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-file-download-off">
|
||
<path d="M4.9 4.75L43.25 43.1 41 45.3l-4.75-4.75q-.05.05-.075.025-.025-.025-.075-.025H10.8q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h22.05l-7-7-1.85 1.8L13.9 21.9l1.85-1.85L2.7 7zm26.75 14.7l2.45 2.45-3.75 3.8-2.45-2.5zM25.7 7.15V21.1l-3.4-3.45V7.15z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-share">
|
||
<path d="M36 32.17c-1.52 0-2.89.59-3.93 1.54L17.82 25.4c.11-.45.18-.92.18-1.4s-.07-.95-.18-1.4l14.1-8.23c1.07 1 2.5 1.62 4.08 1.62 3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6c0 .48.07.95.18 1.4l-14.1 8.23c-1.07-1-2.5-1.62-4.08-1.62-3.31 0-6 2.69-6 6s2.69 6 6 6c1.58 0 3.01-.62 4.08-1.62l14.25 8.31c-.1.42-.16.86-.16 1.31A5.83 5.83 0 1 0 36 32.17z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-cog">
|
||
<path d="M38.86 25.95c.08-.64.14-1.29.14-1.95s-.06-1.31-.14-1.95l4.23-3.31c.38-.3.49-.84.24-1.28l-4-6.93c-.25-.43-.77-.61-1.22-.43l-4.98 2.01c-1.03-.79-2.16-1.46-3.38-1.97L29 4.84c-.09-.47-.5-.84-1-.84h-8c-.5 0-.91.37-.99.84l-.75 5.3a14.8 14.8 0 0 0-3.38 1.97L9.9 10.1a1 1 0 0 0-1.22.43l-4 6.93c-.25.43-.14.97.24 1.28l4.22 3.31C9.06 22.69 9 23.34 9 24s.06 1.31.14 1.95l-4.22 3.31c-.38.3-.49.84-.24 1.28l4 6.93c.25.43.77.61 1.22.43l4.98-2.01c1.03.79 2.16 1.46 3.38 1.97l.75 5.3c.08.47.49.84.99.84h8c.5 0 .91-.37.99-.84l.75-5.3a14.8 14.8 0 0 0 3.38-1.97l4.98 2.01a1 1 0 0 0 1.22-.43l4-6.93c.25-.43.14-.97-.24-1.28l-4.22-3.31zM24 31c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-square">
|
||
<path d="M36 8H12c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h24c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zm0 28H12V12h24v24z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-circle">
|
||
<circle cx="24" cy="24" r="20"></circle>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-circle-outline">
|
||
<path d="M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-circle-inner-circle">
|
||
<path d="M24 4C12.97 4 4 12.97 4 24s8.97 20 20 20 20-8.97 20-20S35.03 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16zm6-16c0 3.31-2.69 6-6 6s-6-2.69-6-6 2.69-6 6-6 6 2.69 6 6z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-cancel">
|
||
<path d="M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm10 27.17L31.17 34 24 26.83 16.83 34 14 31.17 21.17 24 14 16.83 16.83 14 24 21.17 31.17 14 34 16.83 26.83 24 34 31.17z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-replay">
|
||
<path d="M24 10V2L14 12l10 10v-8c6.63 0 12 5.37 12 12s-5.37 12-12 12-12-5.37-12-12H8c0 8.84 7.16 16 16 16s16-7.16 16-16-7.16-16-16-16z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-repeat">
|
||
<path d="M14 14h20v6l8-8-8-8v6H10v12h4v-8zm20 20H14v-6l-8 8 8 8v-6h24V26h-4v8z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 96 48 48" id="vjs-icon-replay-5">
|
||
<path d="M17.689 98l-8.697 8.696 8.697 8.697 2.486-2.485-4.32-4.319h1.302c4.93 0 9.071 1.722 12.424 5.165 3.352 3.443 5.029 7.638 5.029 12.584h3.55c0-2.958-.553-5.73-1.658-8.313-1.104-2.583-2.622-4.841-4.555-6.774-1.932-1.932-4.19-3.45-6.773-4.555-2.584-1.104-5.355-1.657-8.313-1.657H15.5l4.615-4.615zm-8.08 21.659v13.861h11.357v5.008H9.609V143h12.7c.834 0 1.55-.298 2.146-.894.596-.597.895-1.31.895-2.145v-7.781c0-.835-.299-1.55-.895-2.147a2.929 2.929 0 0 0-2.147-.894h-8.227v-5.096H25.35v-4.384z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 96 48 48" id="vjs-icon-replay-10">
|
||
<path d="M42.315 125.63c0-4.997-1.694-9.235-5.08-12.713-3.388-3.479-7.571-5.218-12.552-5.218h-1.315l4.363 4.363-2.51 2.51-8.787-8.786L25.221 97l2.45 2.45-4.662 4.663h1.375c2.988 0 5.788.557 8.397 1.673 2.61 1.116 4.892 2.65 6.844 4.602 1.953 1.953 3.487 4.234 4.602 6.844 1.116 2.61 1.674 5.41 1.674 8.398zM8.183 142v-19.657H3.176V117.8h9.643V142zm13.63 0c-1.156 0-2.127-.393-2.912-1.178-.778-.778-1.168-1.746-1.168-2.902v-16.04c0-1.156.393-2.127 1.178-2.912.779-.779 1.746-1.168 2.902-1.168h7.696c1.156 0 2.126.392 2.911 1.177.779.78 1.168 1.747 1.168 2.903v16.04c0 1.156-.392 2.127-1.177 2.912-.779.779-1.746 1.168-2.902 1.168zm.556-4.636h6.583v-15.02H22.37z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 96 48 48" id="vjs-icon-replay-30">
|
||
<path d="M26.047 97l-8.733 8.732 8.733 8.733 2.496-2.494-4.336-4.338h1.307c4.95 0 9.108 1.73 12.474 5.187 3.367 3.458 5.051 7.668 5.051 12.635h3.565c0-2.97-.556-5.751-1.665-8.346-1.109-2.594-2.633-4.862-4.574-6.802-1.94-1.941-4.208-3.466-6.803-4.575-2.594-1.109-5.375-1.664-8.345-1.664H23.85l4.634-4.634zM2.555 117.531v4.688h10.297v5.25H5.873v4.687h6.979v5.156H2.555V142H13.36c1.061 0 1.95-.395 2.668-1.186.718-.79 1.076-1.772 1.076-2.94v-16.218c0-1.168-.358-2.149-1.076-2.94-.717-.79-1.607-1.185-2.668-1.185zm22.482.14c-1.149 0-2.11.39-2.885 1.165-.78.78-1.172 1.744-1.172 2.893v15.943c0 1.149.388 2.11 1.163 2.885.78.78 1.745 1.172 2.894 1.172h7.649c1.148 0 2.11-.388 2.884-1.163.78-.78 1.17-1.745 1.17-2.894v-15.943c0-1.15-.386-2.111-1.16-2.885-.78-.78-1.746-1.172-2.894-1.172zm.553 4.518h6.545v14.93H25.59z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 96 48 48" id="vjs-icon-forward-5">
|
||
<path d="M29.508 97l-2.431 2.43 4.625 4.625h-1.364c-2.965 0-5.742.554-8.332 1.66-2.589 1.107-4.851 2.629-6.788 4.566-1.937 1.937-3.458 4.2-4.565 6.788-1.107 2.59-1.66 5.367-1.66 8.331h3.557c0-4.957 1.68-9.16 5.04-12.611 3.36-3.45 7.51-5.177 12.451-5.177h1.304l-4.326 4.33 2.49 2.49 8.715-8.716zm-9.783 21.61v13.89h11.382v5.018H19.725V142h12.727a2.93 2.93 0 0 0 2.15-.896 2.93 2.93 0 0 0 .896-2.15v-7.798c0-.837-.299-1.554-.896-2.152a2.93 2.93 0 0 0-2.15-.896h-8.245V123h11.29v-4.392z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 96 48 48" id="vjs-icon-forward-10">
|
||
<path d="M23.119 97l-2.386 2.383 4.538 4.538h-1.339c-2.908 0-5.633.543-8.173 1.63-2.54 1.085-4.76 2.577-6.66 4.478-1.9 1.9-3.392 4.12-4.478 6.66-1.085 2.54-1.629 5.264-1.629 8.172h3.49c0-4.863 1.648-8.986 4.944-12.372 3.297-3.385 7.368-5.078 12.216-5.078h1.279l-4.245 4.247 2.443 2.442 8.55-8.55zm-9.52 21.45v4.42h4.871V142h4.513v-23.55zm18.136 0c-1.125 0-2.066.377-2.824 1.135-.764.764-1.148 1.709-1.148 2.834v15.612c0 1.124.38 2.066 1.139 2.824.764.764 1.708 1.145 2.833 1.145h7.489c1.125 0 2.066-.378 2.824-1.136.764-.764 1.145-1.709 1.145-2.833v-15.612c0-1.125-.378-2.067-1.136-2.825-.764-.764-1.708-1.145-2.833-1.145zm.54 4.42h6.408v14.617h-6.407z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 96 48 48" id="vjs-icon-forward-30">
|
||
<path d="M25.549 97l-2.437 2.434 4.634 4.635H26.38c-2.97 0-5.753.555-8.347 1.664-2.594 1.109-4.861 2.633-6.802 4.574-1.94 1.94-3.465 4.207-4.574 6.802-1.109 2.594-1.664 5.377-1.664 8.347h3.565c0-4.967 1.683-9.178 5.05-12.636 3.366-3.458 7.525-5.187 12.475-5.187h1.307l-4.335 4.338 2.495 2.494 8.732-8.732zm-11.553 20.53v4.689h10.297v5.249h-6.978v4.688h6.978v5.156H13.996V142h10.808c1.06 0 1.948-.395 2.666-1.186.718-.79 1.077-1.771 1.077-2.94v-16.217c0-1.169-.36-2.15-1.077-2.94-.718-.79-1.605-1.186-2.666-1.186zm21.174.168c-1.149 0-2.11.389-2.884 1.163-.78.78-1.172 1.745-1.172 2.894v15.942c0 1.15.388 2.11 1.162 2.885.78.78 1.745 1.17 2.894 1.17h7.649c1.149 0 2.11-.386 2.885-1.16.78-.78 1.17-1.746 1.17-2.895v-15.942c0-1.15-.387-2.11-1.161-2.885-.78-.78-1.745-1.172-2.894-1.172zm.552 4.516h6.542v14.931h-6.542z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 512 512" id="vjs-icon-audio-description">
|
||
<g fill-rule="evenodd"><path d="M227.29 381.351V162.993c50.38-1.017 89.108-3.028 117.631 17.126 27.374 19.342 48.734 56.965 44.89 105.325-4.067 51.155-41.335 94.139-89.776 98.475-24.085 2.155-71.972 0-71.972 0s-.84-1.352-.773-2.568m48.755-54.804c31.43 1.26 53.208-16.633 56.495-45.386 4.403-38.51-21.188-63.552-58.041-60.796v103.612c-.036 1.466.575 2.22 1.546 2.57"></path><path d="M383.78 381.328c13.336 3.71 17.387-11.06 23.215-21.408 12.722-22.571 22.294-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.226 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894"></path><path d="M425.154 381.328c13.336 3.71 17.384-11.061 23.215-21.408 12.721-22.571 22.291-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.511c-.586 3.874 2.226 7.315 3.866 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894"></path><path d="M466.26 381.328c13.337 3.71 17.385-11.061 23.216-21.408 12.722-22.571 22.292-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.225 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894M4.477 383.005H72.58l18.573-28.484 64.169-.135s.065 19.413.065 28.62h48.756V160.307h-58.816c-5.653 9.537-140.85 222.697-140.85 222.697zm152.667-145.282v71.158l-40.453-.27 40.453-70.888z"></path></g>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-next-item">
|
||
<path d="M12 36l17-12-17-12v24zm20-24v24h4V12h-4z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-previous-item">
|
||
<path d="M12 12h4v24h-4zm7 12l17 12V12z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-shuffle">
|
||
<path d="M21.17 18.34L10.83 8 8 10.83l10.34 10.34 2.83-2.83zM29 8l4.09 4.09L8 37.17 10.83 40l25.09-25.09L40 19V8H29zm.66 18.83l-2.83 2.83 6.26 6.26L29 40h11V29l-4.09 4.09-6.25-6.26z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-cast">
|
||
<path d="M42 6H6c-2.21 0-4 1.79-4 4v6h4v-6h36v28H28v4h14c2.21 0 4-1.79 4-4V10c0-2.21-1.79-4-4-4zM2 36v6h6c0-3.31-2.69-6-6-6zm0-8v4c5.52 0 10 4.48 10 10h4c0-7.73-6.27-14-14-14zm0-8v4c9.94 0 18 8.06 18 18h4c0-12.15-9.85-22-22-22z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-picture-in-picture-enter">
|
||
<path d="M38 22H22v11.99h16V22zm8 16V9.96C46 7.76 44.2 6 42 6H6C3.8 6 2 7.76 2 9.96V38c0 2.2 1.8 4 4 4h36c2.2 0 4-1.8 4-4zm-4 .04H6V9.94h36v28.1z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 22 18" id="vjs-icon-picture-in-picture-exit">
|
||
<path d="M18 4H4v10h14V4zm4 12V1.98C22 .88 21.1 0 20 0H2C.9 0 0 .88 0 1.98V16c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2zm-2 .02H2V1.97h18v14.05z"></path>
|
||
<path fill="none" d="M-1-3h24v24H-1z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 1792 1792" id="vjs-icon-facebook">
|
||
<path d="M1343 12v264h-157q-86 0-116 36t-30 108v189h293l-39 296h-254v759H734V905H479V609h255V391q0-186 104-288.5T1115 0q147 0 228 12z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 1792 1792" id="vjs-icon-linkedin">
|
||
<path d="M477 625v991H147V625h330zm21-306q1 73-50.5 122T312 490h-2q-82 0-132-49t-50-122q0-74 51.5-122.5T314 148t133 48.5T498 319zm1166 729v568h-329v-530q0-105-40.5-164.5T1168 862q-63 0-105.5 34.5T999 982q-11 30-11 81v553H659q2-399 2-647t-1-296l-1-48h329v144h-2q20-32 41-56t56.5-52 87-43.5T1285 602q171 0 275 113.5t104 332.5z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 1200 1227" id="vjs-icon-twitter">
|
||
<path d="M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z"/>
|
||
</symbol>
|
||
<symbol viewBox="0 0 1792 1792" id="vjs-icon-tumblr">
|
||
<path d="M1328 1329l80 237q-23 35-111 66t-177 32q-104 2-190.5-26T787 1564t-95-106-55.5-120-16.5-118V676H452V461q72-26 129-69.5t91-90 58-102 34-99T779 12q1-5 4.5-8.5T791 0h244v424h333v252h-334v518q0 30 6.5 56t22.5 52.5 49.5 41.5 81.5 14q78-2 134-29z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 1792 1792" id="vjs-icon-pinterest">
|
||
<path d="M1664 896q0 209-103 385.5T1281.5 1561 896 1664q-111 0-218-32 59-93 78-164 9-34 54-211 20 39 73 67.5t114 28.5q121 0 216-68.5t147-188.5 52-270q0-114-59.5-214T1180 449t-255-63q-105 0-196 29t-154.5 77-109 110.5-67 129.5T377 866q0 104 40 183t117 111q30 12 38-20 2-7 8-31t8-30q6-23-11-43-51-61-51-151 0-151 104.5-259.5T904 517q151 0 235.5 82t84.5 213q0 170-68.5 289T980 1220q-61 0-98-43.5T859 1072q8-35 26.5-93.5t30-103T927 800q0-50-27-83t-77-33q-62 0-105 57t-43 142q0 73 25 122l-99 418q-17 70-13 177-206-91-333-281T128 896q0-209 103-385.5T510.5 231 896 128t385.5 103T1561 510.5 1664 896z"></path>
|
||
</symbol>
|
||
</defs>
|
||
</svg>`;const CM=u0?10009:c0?461:8,Nc={codes:{play:415,pause:19,ff:417,rw:412,back:CM},names:{415:"play",19:"pause",417:"ff",412:"rw",[CM]:"back"},isEventKey(r,e){return e=e.toLowerCase(),!!(this.names[r.keyCode]&&this.names[r.keyCode]===e)},getEventName(r){if(this.names[r.keyCode])return this.names[r.keyCode];if(this.codes[r.code]){const e=this.codes[r.code];return this.names[e]}return null}},AM=5;class ure extends xn{constructor(e){super(),this.player_=e,this.focusableComponents=[],this.isListening_=!1,this.isPaused_=!1,this.onKeyDown_=this.onKeyDown_.bind(this),this.lastFocusedComponent_=null}start(){this.isListening_||(this.player_.on("keydown",this.onKeyDown_),this.player_.on("modalKeydown",this.onKeyDown_),this.player_.on("loadedmetadata",()=>{this.focus(this.updateFocusableComponents()[0])}),this.player_.on("modalclose",()=>{this.refocusComponent()}),this.player_.on("focusin",this.handlePlayerFocus_.bind(this)),this.player_.on("focusout",this.handlePlayerBlur_.bind(this)),this.isListening_=!0,this.player_.errorDisplay&&this.player_.errorDisplay.on("aftermodalfill",()=>{this.updateFocusableComponents(),this.focusableComponents.length&&(this.focusableComponents.length>1?this.focusableComponents[1].focus():this.focusableComponents[0].focus())}))}stop(){this.player_.off("keydown",this.onKeyDown_),this.isListening_=!1}onKeyDown_(e){const t=e.originalEvent?e.originalEvent:e;if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(t.key)){if(this.isPaused_)return;t.preventDefault();const i=t.key.substring(5).toLowerCase();this.move(i)}else if(Nc.isEventKey(t,"play")||Nc.isEventKey(t,"pause")||Nc.isEventKey(t,"ff")||Nc.isEventKey(t,"rw")){t.preventDefault();const i=Nc.getEventName(t);this.performMediaAction_(i)}else Nc.isEventKey(t,"Back")&&e.target&&typeof e.target.closeable=="function"&&e.target.closeable()&&(t.preventDefault(),e.target.close())}performMediaAction_(e){if(this.player_)switch(e){case"play":this.player_.paused()&&this.player_.play();break;case"pause":this.player_.paused()||this.player_.pause();break;case"ff":this.userSeek_(this.player_.currentTime()+AM);break;case"rw":this.userSeek_(this.player_.currentTime()-AM);break}}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}pause(){this.isPaused_=!0}resume(){this.isPaused_=!1}handlePlayerBlur_(e){const t=e.relatedTarget;let i=null;const n=this.getCurrentComponent(e.target);t&&(i=!!t.closest(".video-js"),t.classList.contains("vjs-text-track-settings")&&!this.isPaused_&&this.searchForTrackSelect_()),(!e.currentTarget.contains(e.relatedTarget)&&!i||!t)&&(n&&n.name()==="CloseButton"?this.refocusComponent():(this.pause(),n&&n.el()&&(this.lastFocusedComponent_=n)))}handlePlayerFocus_(){this.getCurrentComponent()&&this.getCurrentComponent().getIsFocusable()&&this.resume()}updateFocusableComponents(){const e=this.player_,t=[];function i(n){for(const a of n)a.hasOwnProperty("el_")&&a.getIsFocusable()&&a.getIsAvailableToBeFocused(a.el())&&t.push(a),a.hasOwnProperty("children_")&&a.children_.length>0&&i(a.children_)}return e.children_.forEach(n=>{if(n.hasOwnProperty("el_"))if(n.getIsFocusable&&n.getIsAvailableToBeFocused&&n.getIsFocusable()&&n.getIsAvailableToBeFocused(n.el())){t.push(n);return}else n.hasOwnProperty("children_")&&n.children_.length>0?i(n.children_):n.hasOwnProperty("items")&&n.items.length>0?i(n.items):this.findSuitableDOMChild(n)&&t.push(n);if(n.name_==="ErrorDisplay"&&n.opened_){const a=n.el_.querySelector(".vjs-errors-ok-button-container");a&&a.querySelectorAll("button").forEach((o,l)=>{t.push({name:()=>"ModalButton"+(l+1),el:()=>o,getPositions:()=>{const u=o.getBoundingClientRect(),c={x:u.x,y:u.y,width:u.width,height:u.height,top:u.top,right:u.right,bottom:u.bottom,left:u.left},h={x:u.left+u.width/2,y:u.top+u.height/2,width:0,height:0,top:u.top+u.height/2,right:u.left+u.width/2,bottom:u.top+u.height/2,left:u.left+u.width/2};return{boundingClientRect:c,center:h}},getIsAvailableToBeFocused:()=>!0,getIsFocusable:u=>!0,focus:()=>o.focus()})})}}),this.focusableComponents=t,this.focusableComponents}findSuitableDOMChild(e){function t(i){if(e.getIsFocusable(i)&&e.getIsAvailableToBeFocused(i))return i;for(let n=0;n<i.children.length;n++){const a=i.children[n],s=t(a);if(s)return s}return null}return e.el()?t(e.el()):null}getCurrentComponent(e){this.updateFocusableComponents();const t=e||document.activeElement;if(this.focusableComponents.length){for(const i of this.focusableComponents)if(i.el()===t)return i}}add(e){const t=[...this.focusableComponents];e.hasOwnProperty("el_")&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el())&&t.push(e),this.focusableComponents=t,this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents})}remove(e){for(let t=0;t<this.focusableComponents.length;t++)if(this.focusableComponents[t].name()===e.name()){this.focusableComponents.splice(t,1),this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents});return}}clear(){this.focusableComponents.length>0&&(this.focusableComponents=[],this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents}))}move(e){const t=this.getCurrentComponent();if(!t)return;const i=t.getPositions(),n=this.focusableComponents.filter(s=>s!==t&&this.isInDirection_(i.boundingClientRect,s.getPositions().boundingClientRect,e)),a=this.findBestCandidate_(i.center,n,e);a?this.focus(a):this.trigger({type:"endOfFocusableComponents",direction:e,focusedComponent:t})}findBestCandidate_(e,t,i){let n=1/0,a=null;for(const s of t){const o=s.getPositions().center,l=this.calculateDistance_(e,o,i);l<n&&(n=l,a=s)}return a}isInDirection_(e,t,i){switch(i){case"right":return t.left>=e.right;case"left":return t.right<=e.left;case"down":return t.top>=e.bottom;case"up":return t.bottom<=e.top;default:return!1}}refocusComponent(){if(this.lastFocusedComponent_){this.player_.userActive()||this.player_.userActive(!0),this.updateFocusableComponents();for(let e=0;e<this.focusableComponents.length;e++)if(this.focusableComponents[e].name()===this.lastFocusedComponent_.name()){this.focus(this.focusableComponents[e]);return}}else this.focus(this.updateFocusableComponents()[0])}focus(e){typeof e=="object"&&(e.getIsAvailableToBeFocused(e.el())?e.focus():this.findSuitableDOMChild(e)&&this.findSuitableDOMChild(e).focus())}calculateDistance_(e,t,i){const n=Math.abs(e.x-t.x),a=Math.abs(e.y-t.y);let s;switch(i){case"right":case"left":s=n+a*100;break;case"up":s=a*2+n*.5;break;case"down":s=a*5+n;break;default:s=n+a}return s}searchForTrackSelect_(){const e=this;for(const t of e.updateFocusableComponents())if(t.constructor.name==="TextTrackSelect"){e.focus(t);break}}}class cre extends se{constructor(e,t,i){const n=zt({createEl:!1},t);if(super(e,n,i),!t.playerOptions.sources||t.playerOptions.sources.length===0)for(let a=0,s=t.playerOptions.techOrder;a<s.length;a++){const o=sr(s[a]);let l=it.getTech(o);if(o||(l=se.getComponent(o)),l&&l.isSupported()){e.loadTech_(o);break}}else e.src(t.playerOptions.sources)}}se.registerComponent("MediaLoader",cre);class l1 extends se{constructor(e,t){super(e,t),this.options_.controlText&&this.controlText(this.options_.controlText),this.handleMouseOver_=i=>this.handleMouseOver(i),this.handleMouseOut_=i=>this.handleMouseOut(i),this.handleClick_=i=>this.handleClick(i),this.handleKeyDown_=i=>this.handleKeyDown(i),this.emitTapEvents(),this.enable()}createEl(e="div",t={},i={}){t=Object.assign({className:this.buildCSSClass(),tabIndex:0},t),e==="button"&&vt.error(`Creating a ClickableComponent with an HTML element of ${e} is not supported; use a Button instead.`),i=Object.assign({role:"button"},i),this.tabIndex_=t.tabIndex;const n=Ze(e,t,i);return this.player_.options_.experimentalSvgIcons||n.appendChild(Ze("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(n),n}dispose(){this.controlTextEl_=null,super.dispose()}createControlTextEl(e){return this.controlTextEl_=Ze("span",{className:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_}controlText(e,t=this.el()){if(e===void 0)return this.controlText_||"Need Text";const i=this.localize(e);this.controlText_=e,fl(this.controlTextEl_,i),!this.nonIconControl&&!this.player_.options_.noUITitleAttributes&&t.setAttribute("title",i)}buildCSSClass(){return`vjs-control vjs-button ${super.buildCSSClass()}`}enable(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),typeof this.tabIndex_<"u"&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick_),this.on("keydown",this.handleKeyDown_))}disable(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),typeof this.tabIndex_<"u"&&this.el_.removeAttribute("tabIndex"),this.off("mouseover",this.handleMouseOver_),this.off("mouseout",this.handleMouseOut_),this.off(["tap","click"],this.handleClick_),this.off("keydown",this.handleKeyDown_)}handleLanguagechange(){this.controlText(this.controlText_)}handleClick(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)}handleKeyDown(e){e.key===" "||e.key==="Enter"?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):super.handleKeyDown(e)}}se.registerComponent("ClickableComponent",l1);class sw extends l1{constructor(e,t){super(e,t),this.update(),this.update_=i=>this.update(i),e.on("posterchange",this.update_)}dispose(){this.player().off("posterchange",this.update_),super.dispose()}createEl(){return Ze("div",{className:"vjs-poster"})}crossOrigin(e){if(typeof e>"u")return this.$("img")?this.$("img").crossOrigin:this.player_.tech_&&this.player_.tech_.isReady_?this.player_.crossOrigin():this.player_.options_.crossOrigin||this.player_.options_.crossorigin||null;if(e!==null&&e!=="anonymous"&&e!=="use-credentials"){this.player_.log.warn(`crossOrigin must be null, "anonymous" or "use-credentials", given "${e}"`);return}this.$("img")&&(this.$("img").crossOrigin=e)}update(e){const t=this.player().poster();this.setSrc(t),t?this.show():this.hide()}setSrc(e){if(!e){this.el_.textContent="";return}this.$("img")||this.el_.appendChild(Ze("picture",{className:"vjs-poster",tabIndex:-1},{},Ze("img",{loading:"lazy",crossOrigin:this.crossOrigin()},{alt:""}))),this.$("img").src=e}handleClick(e){this.player_.controls()&&(this.player_.tech(!0)&&this.player_.tech(!0).focus(),this.player_.paused()?Ya(this.player_.play()):this.player_.pause())}}sw.prototype.crossorigin=sw.prototype.crossOrigin;se.registerComponent("PosterImage",sw);const En="#222",DM="#ccc",hre={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function zb(r,e){let t;if(r.length===4)t=r[1]+r[1]+r[2]+r[2]+r[3]+r[3];else if(r.length===7)t=r.slice(1);else throw new Error("Invalid color code provided, "+r+"; must be formatted as e.g. #f0e or #f604e2.");return"rgba("+parseInt(t.slice(0,2),16)+","+parseInt(t.slice(2,4),16)+","+parseInt(t.slice(4,6),16)+","+e+")"}function Ra(r,e,t){try{r.style[e]=t}catch{return}}function EM(r){return r?`${r}px`:""}class fre extends se{constructor(e,t,i){super(e,t,i);const n=s=>this.updateDisplay(s),a=s=>{this.updateDisplayOverlay(),this.updateDisplay(s)};e.on("loadstart",s=>this.toggleDisplay(s)),e.on("texttrackchange",n),e.on("loadedmetadata",s=>{this.updateDisplayOverlay(),this.preselectTrack(s)}),e.ready($t(this,function(){if(e.tech_&&e.tech_.featuresNativeTextTracks){this.hide();return}e.on("fullscreenchange",a),e.on("playerresize",a);const s=H.screen.orientation||H,o=H.screen.orientation?"change":"orientationchange";s.addEventListener(o,a),e.on("dispose",()=>s.removeEventListener(o,a));const l=this.options_.playerOptions.tracks||[];for(let u=0;u<l.length;u++)this.player_.addRemoteTextTrack(l[u],!0);this.preselectTrack()}))}preselectTrack(){const e={captions:1,subtitles:1},t=this.player_.textTracks(),i=this.player_.cache_.selectedLanguage;let n,a,s;for(let o=0;o<t.length;o++){const l=t[o];i&&i.enabled&&i.language&&i.language===l.language&&l.kind in e?l.kind===i.kind?s=l:s||(s=l):i&&!i.enabled?(s=null,n=null,a=null):l.default&&(l.kind==="descriptions"&&!n?n=l:l.kind in e&&!a&&(a=l))}s?s.mode="showing":a?a.mode="showing":n&&(n.mode="showing")}toggleDisplay(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()}createEl(){return super.createEl("div",{className:"vjs-text-track-display"},{translate:"yes","aria-live":"off","aria-atomic":"true"})}clearDisplay(){typeof H.WebVTT=="function"&&H.WebVTT.processCues(H,[],this.el_)}updateDisplay(){const e=this.player_.textTracks(),t=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),t){const s=[];for(let o=0;o<e.length;++o){const l=e[o];l.mode==="showing"&&s.push(l)}this.updateForTrack(s);return}let i=null,n=null,a=e.length;for(;a--;){const s=e[a];s.mode==="showing"&&(s.kind==="descriptions"?i=s:n=s)}if(n?(this.getAttribute("aria-live")!=="off"&&this.setAttribute("aria-live","off"),this.updateForTrack(n)):i&&(this.getAttribute("aria-live")!=="assertive"&&this.setAttribute("aria-live","assertive"),this.updateForTrack(i)),!H.CSS.supports("inset","10px")){const s=this.el_,o=s.querySelectorAll(".vjs-text-track-cue"),l=this.player_.controlBar.el_.getBoundingClientRect().height,u=this.player_.el_.getBoundingClientRect().height;s.style="",Ra(s,"position","relative"),Ra(s,"height",u-l+"px"),Ra(s,"top","unset"),h0?Ra(s,"bottom",u+"px"):Ra(s,"bottom","0px"),o.length>0&&o.forEach(c=>{if(c.style.inset){const h=c.style.inset.split(" ");h.length===3&&Object.assign(c.style,{top:h[0],right:h[1],bottom:h[2],left:"unset"})}})}}updateDisplayOverlay(){if(!this.player_.videoHeight()||!H.CSS.supports("inset-inline: 10px"))return;const e=this.player_.currentWidth(),t=this.player_.currentHeight(),i=e/t,n=this.player_.videoWidth()/this.player_.videoHeight();let a=0,s=0;Math.abs(i-n)>.1&&(i>n?a=Math.round((e-t*n)/2):s=Math.round((t-e/n)/2)),Ra(this.el_,"insetInline",EM(a)),Ra(this.el_,"insetBlock",EM(s))}updateDisplayState(e){const t=this.player_.textTrackSettings.getValues(),i=e.activeCues;let n=i.length;for(;n--;){const a=i[n];if(!a)continue;const s=a.displayState;if(t.color&&(s.firstChild.style.color=t.color),t.textOpacity&&Ra(s.firstChild,"color",zb(t.color||"#fff",t.textOpacity)),t.backgroundColor&&(s.firstChild.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&Ra(s.firstChild,"backgroundColor",zb(t.backgroundColor||"#000",t.backgroundOpacity)),t.windowColor&&(t.windowOpacity?Ra(s,"backgroundColor",zb(t.windowColor,t.windowOpacity)):s.style.backgroundColor=t.windowColor),t.edgeStyle&&(t.edgeStyle==="dropshadow"?s.firstChild.style.textShadow=`2px 2px 3px ${En}, 2px 2px 4px ${En}, 2px 2px 5px ${En}`:t.edgeStyle==="raised"?s.firstChild.style.textShadow=`1px 1px ${En}, 2px 2px ${En}, 3px 3px ${En}`:t.edgeStyle==="depressed"?s.firstChild.style.textShadow=`1px 1px ${DM}, 0 1px ${DM}, -1px -1px ${En}, 0 -1px ${En}`:t.edgeStyle==="uniform"&&(s.firstChild.style.textShadow=`0 0 4px ${En}, 0 0 4px ${En}, 0 0 4px ${En}, 0 0 4px ${En}`)),t.fontPercent&&t.fontPercent!==1){const o=H.parseFloat(s.style.fontSize);s.style.fontSize=o*t.fontPercent+"px",s.style.height="auto",s.style.top="auto"}t.fontFamily&&t.fontFamily!=="default"&&(t.fontFamily==="small-caps"?s.firstChild.style.fontVariant="small-caps":s.firstChild.style.fontFamily=hre[t.fontFamily])}}updateForTrack(e){if(Array.isArray(e)||(e=[e]),typeof H.WebVTT!="function"||e.every(i=>!i.activeCues))return;const t=[];for(let i=0;i<e.length;++i){const n=e[i];for(let a=0;a<n.activeCues.length;++a)t.push(n.activeCues[a])}H.WebVTT.processCues(H,t,this.el_);for(let i=0;i<e.length;++i){const n=e[i];for(let a=0;a<n.activeCues.length;++a){const s=n.activeCues[a].displayState;ku(s,"vjs-text-track-cue","vjs-text-track-cue-"+(n.language?n.language:i)),n.language&&nf(s,"lang",n.language)}this.player_.textTrackSettings&&this.updateDisplayState(n)}}}se.registerComponent("TextTrackDisplay",fre);class dre extends se{createEl(){const e=this.player_.isAudio(),t=this.localize(e?"Audio Player":"Video Player"),i=Ze("span",{className:"vjs-control-text",textContent:this.localize("{1} is loading.",[t])}),n=super.createEl("div",{className:"vjs-loading-spinner",dir:"ltr"});return n.appendChild(i),n}handleLanguagechange(){this.$(".vjs-control-text").textContent=this.localize("{1} is loading.",[this.player_.isAudio()?"Audio Player":"Video Player"])}}se.registerComponent("LoadingSpinner",dre);class li extends l1{createEl(e,t={},i={}){e="button",t=Object.assign({className:this.buildCSSClass()},t),i=Object.assign({type:"button"},i);const n=Ze(e,t,i);return this.player_.options_.experimentalSvgIcons||n.appendChild(Ze("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(n),n}addChild(e,t={}){const i=this.constructor.name;return vt.warn(`Adding an actionable (user controllable) child to a Button (${i}) is not supported; use a ClickableComponent instead.`),se.prototype.addChild.call(this,e,t)}enable(){super.enable(),this.el_.removeAttribute("disabled")}disable(){super.disable(),this.el_.setAttribute("disabled","disabled")}handleKeyDown(e){if(e.key===" "||e.key==="Enter"){e.stopPropagation();return}super.handleKeyDown(e)}}se.registerComponent("Button",li);class r8 extends li{constructor(e,t){super(e,t),this.mouseused_=!1,this.setIcon("play"),this.on("mousedown",i=>this.handleMouseDown(i))}buildCSSClass(){return"vjs-big-play-button"}handleClick(e){const t=this.player_.play();if(this.mouseused_&&"clientX"in e&&"clientY"in e){Ya(t),this.player_.tech(!0)&&this.player_.tech(!0).focus();return}const i=this.player_.getChild("controlBar"),n=i&&i.getChild("playToggle");if(!n){this.player_.tech(!0).focus();return}const a=()=>n.focus();Mp(t)?t.then(a,()=>{}):this.setTimeout(a,1)}handleKeyDown(e){this.mouseused_=!1,super.handleKeyDown(e)}handleMouseDown(e){this.mouseused_=!0}}r8.prototype.controlText_="Play Video";se.registerComponent("BigPlayButton",r8);class pre extends li{constructor(e,t){super(e,t),this.setIcon("cancel"),this.controlText(t&&t.controlText||this.localize("Close"))}buildCSSClass(){return`vjs-close-button ${super.buildCSSClass()}`}handleClick(e){this.trigger({type:"close",bubbles:!1})}handleKeyDown(e){e.key==="Escape"?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):super.handleKeyDown(e)}}se.registerComponent("CloseButton",pre);class i8 extends li{constructor(e,t={}){super(e,t),t.replay=t.replay===void 0||t.replay,this.setIcon("play"),this.on(e,"play",i=>this.handlePlay(i)),this.on(e,"pause",i=>this.handlePause(i)),t.replay&&this.on(e,"ended",i=>this.handleEnded(i))}buildCSSClass(){return`vjs-play-control ${super.buildCSSClass()}`}handleClick(e){this.player_.paused()?Ya(this.player_.play()):this.player_.pause()}handleSeeked(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)}handlePlay(e){this.removeClass("vjs-ended","vjs-paused"),this.addClass("vjs-playing"),this.setIcon("pause"),this.controlText("Pause")}handlePause(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.setIcon("play"),this.controlText("Play")}handleEnded(e){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.setIcon("replay"),this.controlText("Replay"),this.one(this.player_,"seeked",t=>this.handleSeeked(t))}}i8.prototype.controlText_="Play";se.registerComponent("PlayToggle",i8);class Rf extends se{constructor(e,t){super(e,t),this.on(e,["timeupdate","ended","seeking"],i=>this.update(i)),this.updateTextNode_()}createEl(){const e=this.buildCSSClass(),t=super.createEl("div",{className:`${e} vjs-time-control vjs-control`}),i=Ze("span",{className:"vjs-control-text",textContent:`${this.localize(this.labelText_)} `},{role:"presentation"});return t.appendChild(i),this.contentEl_=Ze("span",{className:`${e}-display`},{role:"presentation"}),t.appendChild(this.contentEl_),t}dispose(){this.contentEl_=null,this.textNode_=null,super.dispose()}update(e){!this.player_.options_.enableSmoothSeeking&&e.type==="seeking"||this.updateContent(e)}updateTextNode_(e=0){e=Ju(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",()=>{if(!this.contentEl_)return;let t=this.textNode_;t&&this.contentEl_.firstChild!==t&&(t=null,vt.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")),this.textNode_=pe.createTextNode(this.formattedTime_),this.textNode_&&(t?this.contentEl_.replaceChild(this.textNode_,t):this.contentEl_.appendChild(this.textNode_))}))}updateContent(e){}}Rf.prototype.labelText_="Time";Rf.prototype.controlText_="Time";se.registerComponent("TimeDisplay",Rf);class yA extends Rf{buildCSSClass(){return"vjs-current-time"}updateContent(e){let t;this.player_.ended()?t=this.player_.duration():t=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(t)}}yA.prototype.labelText_="Current Time";yA.prototype.controlText_="Current Time";se.registerComponent("CurrentTimeDisplay",yA);class _A extends Rf{constructor(e,t){super(e,t);const i=n=>this.updateContent(n);this.on(e,"durationchange",i),this.on(e,"loadstart",i),this.on(e,"loadedmetadata",i)}buildCSSClass(){return"vjs-duration"}updateContent(e){const t=this.player_.duration();this.updateTextNode_(t)}}_A.prototype.labelText_="Duration";_A.prototype.controlText_="Duration";se.registerComponent("DurationDisplay",_A);class vre extends se{createEl(){const e=super.createEl("div",{className:"vjs-time-control vjs-time-divider"},{"aria-hidden":!0}),t=super.createEl("div"),i=super.createEl("span",{textContent:"/"});return t.appendChild(i),e.appendChild(t),e}}se.registerComponent("TimeDivider",vre);class bA extends Rf{constructor(e,t){super(e,t),this.on(e,"durationchange",i=>this.updateContent(i))}buildCSSClass(){return"vjs-remaining-time"}createEl(){const e=super.createEl();return this.options_.displayNegative!==!1&&e.insertBefore(Ze("span",{},{"aria-hidden":!0},"-"),this.contentEl_),e}updateContent(e){if(typeof this.player_.duration()!="number")return;let t;this.player_.ended()?t=0:this.player_.remainingTimeDisplay?t=this.player_.remainingTimeDisplay():t=this.player_.remainingTime(),this.updateTextNode_(t)}}bA.prototype.labelText_="Remaining Time";bA.prototype.controlText_="Remaining Time";se.registerComponent("RemainingTimeDisplay",bA);class gre extends se{constructor(e,t){super(e,t),this.updateShowing(),this.on(this.player(),"durationchange",i=>this.updateShowing(i))}createEl(){const e=super.createEl("div",{className:"vjs-live-control vjs-control"});return this.contentEl_=Ze("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.contentEl_.appendChild(Ze("span",{className:"vjs-control-text",textContent:`${this.localize("Stream Type")} `})),this.contentEl_.appendChild(pe.createTextNode(this.localize("LIVE"))),e.appendChild(this.contentEl_),e}dispose(){this.contentEl_=null,super.dispose()}updateShowing(e){this.player().duration()===1/0?this.show():this.hide()}}se.registerComponent("LiveDisplay",gre);class n8 extends li{constructor(e,t){super(e,t),this.updateLiveEdgeStatus(),this.player_.liveTracker&&(this.updateLiveEdgeStatusHandler_=i=>this.updateLiveEdgeStatus(i),this.on(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_))}createEl(){const e=super.createEl("button",{className:"vjs-seek-to-live-control vjs-control"});return this.setIcon("circle",e),this.textEl_=Ze("span",{className:"vjs-seek-to-live-text",textContent:this.localize("LIVE")},{"aria-hidden":"true"}),e.appendChild(this.textEl_),e}updateLiveEdgeStatus(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute("aria-disabled",!0),this.addClass("vjs-at-live-edge"),this.controlText("Seek to live, currently playing live")):(this.setAttribute("aria-disabled",!1),this.removeClass("vjs-at-live-edge"),this.controlText("Seek to live, currently behind live"))}handleClick(){this.player_.liveTracker.seekToLiveEdge()}dispose(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_),this.textEl_=null,super.dispose()}}n8.prototype.controlText_="Seek to live, currently playing live";se.registerComponent("SeekToLive",n8);function lg(r,e,t){return r=Number(r),Math.min(t,Math.max(e,isNaN(r)?e:r))}var mre=Object.freeze({__proto__:null,clamp:lg});class SA extends se{constructor(e,t){super(e,t),this.handleMouseDown_=i=>this.handleMouseDown(i),this.handleMouseUp_=i=>this.handleMouseUp(i),this.handleKeyDown_=i=>this.handleKeyDown(i),this.handleClick_=i=>this.handleClick(i),this.handleMouseMove_=i=>this.handleMouseMove(i),this.update_=i=>this.update(i),this.bar=this.getChild(this.options_.barName),this.vertical(!!this.options_.vertical),this.enable()}enabled(){return this.enabled_}enable(){this.enabled()||(this.on("mousedown",this.handleMouseDown_),this.on("touchstart",this.handleMouseDown_),this.on("keydown",this.handleKeyDown_),this.on("click",this.handleClick_),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)}disable(){if(!this.enabled())return;const e=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown_),this.off("touchstart",this.handleMouseDown_),this.off("keydown",this.handleKeyDown_),this.off("click",this.handleClick_),this.off(this.player_,"controlsvisible",this.update_),this.off(e,"mousemove",this.handleMouseMove_),this.off(e,"mouseup",this.handleMouseUp_),this.off(e,"touchmove",this.handleMouseMove_),this.off(e,"touchend",this.handleMouseUp_),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}createEl(e,t={},i={}){return t.className=t.className+" vjs-slider",t=Object.assign({tabIndex:0},t),i=Object.assign({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100},i),super.createEl(e,t,i)}handleMouseDown(e){const t=this.bar.el_.ownerDocument;e.type==="mousedown"&&e.preventDefault(),e.type==="touchstart"&&!hs&&e.preventDefault(),MF(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(t,"mousemove",this.handleMouseMove_),this.on(t,"mouseup",this.handleMouseUp_),this.on(t,"touchmove",this.handleMouseMove_),this.on(t,"touchend",this.handleMouseUp_),this.handleMouseMove(e,!0)}handleMouseMove(e){}handleMouseUp(e){const t=this.bar.el_.ownerDocument;LF(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(t,"mousemove",this.handleMouseMove_),this.off(t,"mouseup",this.handleMouseUp_),this.off(t,"touchmove",this.handleMouseMove_),this.off(t,"touchend",this.handleMouseUp_),this.update()}update(){if(!this.el_||!this.bar)return;const e=this.getProgress();return e===this.progress_||(this.progress_=e,this.requestNamedAnimationFrame("Slider#update",()=>{const t=this.vertical()?"height":"width";this.bar.el().style[t]=(e*100).toFixed(2)+"%"})),e}getProgress(){return Number(lg(this.getPercent(),0,1).toFixed(4))}calculateDistance(e){const t=r1(this.el_,e);return this.vertical()?t.y:t.x}handleKeyDown(e){const t=this.options_.playerOptions.spatialNavigation,i=t&&t.enabled,n=t&&t.horizontalSeek;i?n&&e.key==="ArrowLeft"||!n&&e.key==="ArrowDown"?(e.preventDefault(),e.stopPropagation(),this.stepBack()):n&&e.key==="ArrowRight"||!n&&e.key==="ArrowUp"?(e.preventDefault(),e.stopPropagation(),this.stepForward()):super.handleKeyDown(e):e.key==="ArrowLeft"||e.key==="ArrowDown"?(e.preventDefault(),e.stopPropagation(),this.stepBack()):e.key==="ArrowUp"||e.key==="ArrowRight"?(e.preventDefault(),e.stopPropagation(),this.stepForward()):super.handleKeyDown(e)}handleClick(e){e.stopPropagation(),e.preventDefault()}vertical(e){if(e===void 0)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")}}se.registerComponent("Slider",SA);const Gb=(r,e)=>lg(r/e*100,0,100).toFixed(2)+"%";class yre extends se{constructor(e,t){super(e,t),this.partEls_=[],this.on(e,"progress",i=>this.update(i))}createEl(){const e=super.createEl("div",{className:"vjs-load-progress"}),t=Ze("span",{className:"vjs-control-text"}),i=Ze("span",{textContent:this.localize("Loaded")}),n=pe.createTextNode(": ");return this.percentageEl_=Ze("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),e.appendChild(t),t.appendChild(i),t.appendChild(n),t.appendChild(this.percentageEl_),e}dispose(){this.partEls_=null,this.percentageEl_=null,super.dispose()}update(e){this.requestNamedAnimationFrame("LoadProgressBar#update",()=>{const t=this.player_.liveTracker,i=this.player_.buffered(),n=t&&t.isLive()?t.seekableEnd():this.player_.duration(),a=this.player_.bufferedEnd(),s=this.partEls_,o=Gb(a,n);this.percent_!==o&&(this.el_.style.width=o,fl(this.percentageEl_,o),this.percent_=o);for(let l=0;l<i.length;l++){const u=i.start(l),c=i.end(l);let h=s[l];h||(h=this.el_.appendChild(Ze()),s[l]=h),!(h.dataset.start===u&&h.dataset.end===c)&&(h.dataset.start=u,h.dataset.end=c,h.style.left=Gb(u,a),h.style.width=Gb(c-u,a))}for(let l=s.length;l>i.length;l--)this.el_.removeChild(s[l-1]);s.length=i.length})}}se.registerComponent("LoadProgressBar",yre);class _re extends se{constructor(e,t){super(e,t),this.update=fs($t(this,this.update),Kn)}createEl(){return super.createEl("div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})}update(e,t,i){const n=cv(this.el_),a=af(this.player_.el()),s=e.width*t;if(!a||!n)return;let o=e.left-a.left+s,l=e.width-s+(a.right-e.right);l||(l=e.width-s,o=s);let u=n.width/2;o<u?u+=u-o:l<u&&(u=l),u<0?u=0:u>n.width&&(u=n.width),u=Math.round(u),this.el_.style.right=`-${u}px`,this.write(i)}write(e){fl(this.el_,e)}updateTime(e,t,i,n){this.requestNamedAnimationFrame("TimeTooltip#updateTime",()=>{let a;const s=this.player_.duration();if(this.player_.liveTracker&&this.player_.liveTracker.isLive()){const o=this.player_.liveTracker.liveWindow(),l=o-t*o;a=(l<1?"":"-")+Ju(l,o)}else a=Ju(i,s);this.update(e,t,a),n&&n()})}}se.registerComponent("TimeTooltip",_re);class TA extends se{constructor(e,t){super(e,t),this.setIcon("circle"),this.update=fs($t(this,this.update),Kn)}createEl(){return super.createEl("div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})}update(e,t){const i=this.getChild("timeTooltip");if(!i)return;const n=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();i.updateTime(e,t,n)}}TA.prototype.options_={children:[]};!Mi&&!cs&&TA.prototype.options_.children.push("timeTooltip");se.registerComponent("PlayProgressBar",TA);class a8 extends se{constructor(e,t){super(e,t),this.update=fs($t(this,this.update),Kn)}createEl(){return super.createEl("div",{className:"vjs-mouse-display"})}update(e,t){const i=t*this.player_.duration();this.getChild("timeTooltip").updateTime(e,t,i,()=>{this.el_.style.left=`${e.width*t}px`})}}a8.prototype.options_={children:["timeTooltip"]};se.registerComponent("MouseTimeDisplay",a8);const lm=5,IM=12;class xA extends SA{constructor(e,t){super(e,t),this.setEventHandlers_()}setEventHandlers_(){this.update_=$t(this,this.update),this.update=fs(this.update_,Kn),this.on(this.player_,["durationchange","timeupdate"],this.update),this.on(this.player_,["ended"],this.update_),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.enableIntervalHandler_=e=>this.enableInterval_(e),this.disableIntervalHandler_=e=>this.disableInterval_(e),this.on(this.player_,["playing"],this.enableIntervalHandler_),this.on(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in pe&&"visibilityState"in pe&&this.on(pe,"visibilitychange",this.toggleVisibility_)}toggleVisibility_(e){pe.visibilityState==="hidden"?(this.cancelNamedAnimationFrame("SeekBar#update"),this.cancelNamedAnimationFrame("Slider#update"),this.disableInterval_(e)):(!this.player_.ended()&&!this.player_.paused()&&this.enableInterval_(),this.update())}enableInterval_(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,Kn))}disableInterval_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&e.type!=="ended"||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)}createEl(){return super.createEl("div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})}update(e){if(pe.visibilityState==="hidden")return;const t=super.update();return this.requestNamedAnimationFrame("SeekBar#update",()=>{const i=this.player_.ended()?this.player_.duration():this.getCurrentTime_(),n=this.player_.liveTracker;let a=this.player_.duration();n&&n.isLive()&&(a=this.player_.liveTracker.liveCurrentTime()),this.percent_!==t&&(this.el_.setAttribute("aria-valuenow",(t*100).toFixed(2)),this.percent_=t),(this.currentTime_!==i||this.duration_!==a)&&(this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[Ju(i,a),Ju(a,a)],"{1} of {2}")),this.currentTime_=i,this.duration_=a),this.bar&&this.bar.update(af(this.el()),this.getProgress())}),t}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}getCurrentTime_(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}getPercent(){const e=this.getCurrentTime_();let t;const i=this.player_.liveTracker;return i&&i.isLive()?(t=(e-i.seekableStart())/i.liveWindow(),i.atLiveEdge()&&(t=1)):t=e/this.player_.duration(),t}handleMouseDown(e){hv(e)&&(e.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),super.handleMouseDown(e))}handleMouseMove(e,t=!1){if(!hv(e)||isNaN(this.player_.duration()))return;!t&&!this.player_.scrubbing()&&this.player_.scrubbing(!0);let i;const n=this.calculateDistance(e),a=this.player_.liveTracker;if(!a||!a.isLive())i=n*this.player_.duration(),i===this.player_.duration()&&(i=i-.1);else{if(n>=.99){a.seekToLiveEdge();return}const s=a.seekableStart(),o=a.liveCurrentTime();if(i=s+n*a.liveWindow(),i>=o&&(i=o),i<=s&&(i=s+.1),i===1/0)return}this.userSeek_(i),this.player_.options_.enableSmoothSeeking&&this.update()}enable(){super.enable();const e=this.getChild("mouseTimeDisplay");e&&e.show()}disable(){super.disable();const e=this.getChild("mouseTimeDisplay");e&&e.hide()}handleMouseUp(e){super.handleMouseUp(e),e&&e.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?Ya(this.player_.play()):this.update_()}stepForward(){this.userSeek_(this.player_.currentTime()+lm)}stepBack(){this.userSeek_(this.player_.currentTime()-lm)}handleAction(e){this.player_.paused()?this.player_.play():this.player_.pause()}handleKeyDown(e){const t=this.player_.liveTracker;if(e.key===" "||e.key==="Enter")e.preventDefault(),e.stopPropagation(),this.handleAction(e);else if(e.key==="Home")e.preventDefault(),e.stopPropagation(),this.userSeek_(0);else if(e.key==="End")e.preventDefault(),e.stopPropagation(),t&&t.isLive()?this.userSeek_(t.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(e.key)){e.preventDefault(),e.stopPropagation();const i=parseInt(e.key,10)*.1;t&&t.isLive()?this.userSeek_(t.seekableStart()+t.liveWindow()*i):this.userSeek_(this.player_.duration()*i)}else e.key==="PageDown"?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()-lm*IM)):e.key==="PageUp"?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()+lm*IM)):super.handleKeyDown(e)}dispose(){this.disableInterval_(),this.off(this.player_,["durationchange","timeupdate"],this.update),this.off(this.player_,["ended"],this.update_),this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.update),this.off(this.player_,["playing"],this.enableIntervalHandler_),this.off(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in pe&&"visibilityState"in pe&&this.off(pe,"visibilitychange",this.toggleVisibility_),super.dispose()}}xA.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"};!Mi&&!cs&&xA.prototype.options_.children.splice(1,0,"mouseTimeDisplay");se.registerComponent("SeekBar",xA);class s8 extends se{constructor(e,t){super(e,t),this.handleMouseMove=fs($t(this,this.handleMouseMove),Kn),this.throttledHandleMouseSeek=fs($t(this,this.handleMouseSeek),Kn),this.handleMouseUpHandler_=i=>this.handleMouseUp(i),this.handleMouseDownHandler_=i=>this.handleMouseDown(i),this.enable()}createEl(){return super.createEl("div",{className:"vjs-progress-control vjs-control"})}handleMouseMove(e){const t=this.getChild("seekBar");if(!t)return;const i=t.getChild("playProgressBar"),n=t.getChild("mouseTimeDisplay");if(!i&&!n)return;const a=t.el(),s=cv(a);let o=r1(a,e).x;o=lg(o,0,1),n&&n.update(s,o),i&&i.update(s,t.getProgress())}handleMouseSeek(e){const t=this.getChild("seekBar");t&&t.handleMouseMove(e)}enabled(){return this.enabled_}disable(){if(this.children().forEach(e=>e.disable&&e.disable()),!!this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDownHandler_),this.off(this.el_,"mousemove",this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass("disabled"),this.enabled_=!1,this.player_.scrubbing())){const e=this.getChild("seekBar");this.player_.scrubbing(!1),e.videoWasPlaying&&Ya(this.player_.play())}}enable(){this.children().forEach(e=>e.enable&&e.enable()),!this.enabled()&&(this.on(["mousedown","touchstart"],this.handleMouseDownHandler_),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)}removeListenersAddedOnMousedownAndTouchstart(){const e=this.el_.ownerDocument;this.off(e,"mousemove",this.throttledHandleMouseSeek),this.off(e,"touchmove",this.throttledHandleMouseSeek),this.off(e,"mouseup",this.handleMouseUpHandler_),this.off(e,"touchend",this.handleMouseUpHandler_)}handleMouseDown(e){const t=this.el_.ownerDocument,i=this.getChild("seekBar");i&&i.handleMouseDown(e),this.on(t,"mousemove",this.throttledHandleMouseSeek),this.on(t,"touchmove",this.throttledHandleMouseSeek),this.on(t,"mouseup",this.handleMouseUpHandler_),this.on(t,"touchend",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.getChild("seekBar");t&&t.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()}}s8.prototype.options_={children:["seekBar"]};se.registerComponent("ProgressControl",s8);class o8 extends li{constructor(e,t){super(e,t),this.setIcon("picture-in-picture-enter"),this.on(e,["enterpictureinpicture","leavepictureinpicture"],i=>this.handlePictureInPictureChange(i)),this.on(e,["disablepictureinpicturechanged","loadedmetadata"],i=>this.handlePictureInPictureEnabledChange(i)),this.on(e,["loadedmetadata","audioonlymodechange","audiopostermodechange"],()=>this.handlePictureInPictureAudioModeChange()),this.disable()}buildCSSClass(){return`vjs-picture-in-picture-control vjs-hidden ${super.buildCSSClass()}`}handlePictureInPictureAudioModeChange(){if(!(this.player_.currentType().substring(0,5)==="audio"||this.player_.audioPosterMode()||this.player_.audioOnlyMode())){this.show();return}this.player_.isInPictureInPicture()&&this.player_.exitPictureInPicture(),this.hide()}handlePictureInPictureEnabledChange(){pe.pictureInPictureEnabled&&this.player_.disablePictureInPicture()===!1||this.player_.options_.enableDocumentPictureInPicture&&"documentPictureInPicture"in H?this.enable():this.disable()}handlePictureInPictureChange(e){this.player_.isInPictureInPicture()?(this.setIcon("picture-in-picture-exit"),this.controlText("Exit Picture-in-Picture")):(this.setIcon("picture-in-picture-enter"),this.controlText("Picture-in-Picture")),this.handlePictureInPictureEnabledChange()}handleClick(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()}show(){typeof pe.exitPictureInPicture=="function"&&super.show()}}o8.prototype.controlText_="Picture-in-Picture";se.registerComponent("PictureInPictureToggle",o8);class l8 extends li{constructor(e,t){super(e,t),this.setIcon("fullscreen-enter"),this.on(e,"fullscreenchange",i=>this.handleFullscreenChange(i)),pe[e.fsApi_.fullscreenEnabled]===!1&&this.disable()}buildCSSClass(){return`vjs-fullscreen-control ${super.buildCSSClass()}`}handleFullscreenChange(e){this.player_.isFullscreen()?(this.controlText("Exit Fullscreen"),this.setIcon("fullscreen-exit")):(this.controlText("Fullscreen"),this.setIcon("fullscreen-enter"))}handleClick(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()}}l8.prototype.controlText_="Fullscreen";se.registerComponent("FullscreenToggle",l8);const bre=function(r,e){e.tech_&&!e.tech_.featuresVolumeControl&&r.addClass("vjs-hidden"),r.on(e,"loadstart",function(){e.tech_.featuresVolumeControl?r.removeClass("vjs-hidden"):r.addClass("vjs-hidden")})};class Sre extends se{createEl(){const e=super.createEl("div",{className:"vjs-volume-level"});return this.setIcon("circle",e),e.appendChild(super.createEl("span",{className:"vjs-control-text"})),e}}se.registerComponent("VolumeLevel",Sre);class Tre extends se{constructor(e,t){super(e,t),this.update=fs($t(this,this.update),Kn)}createEl(){return super.createEl("div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"})}update(e,t,i,n){if(!i){const a=af(this.el_),s=af(this.player_.el()),o=e.width*t;if(!s||!a)return;const l=e.left-s.left+o,u=e.width-o+(s.right-e.right);let c=a.width/2;l<c?c+=c-l:u<c&&(c=u),c<0?c=0:c>a.width&&(c=a.width),this.el_.style.right=`-${c}px`}this.write(`${n}%`)}write(e){fl(this.el_,e)}updateVolume(e,t,i,n,a){this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",()=>{this.update(e,t,i,n.toFixed(0)),a&&a()})}}se.registerComponent("VolumeLevelTooltip",Tre);class u8 extends se{constructor(e,t){super(e,t),this.update=fs($t(this,this.update),Kn)}createEl(){return super.createEl("div",{className:"vjs-mouse-display"})}update(e,t,i){const n=100*t;this.getChild("volumeLevelTooltip").updateVolume(e,t,i,n,()=>{i?this.el_.style.bottom=`${e.height*t}px`:this.el_.style.left=`${e.width*t}px`})}}u8.prototype.options_={children:["volumeLevelTooltip"]};se.registerComponent("MouseVolumeLevelDisplay",u8);class u1 extends SA{constructor(e,t){super(e,t),this.on("slideractive",i=>this.updateLastVolume_(i)),this.on(e,"volumechange",i=>this.updateARIAAttributes(i)),e.ready(()=>this.updateARIAAttributes())}createEl(){return super.createEl("div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})}handleMouseDown(e){hv(e)&&super.handleMouseDown(e)}handleMouseMove(e){const t=this.getChild("mouseVolumeLevelDisplay");if(t){const i=this.el(),n=af(i),a=this.vertical();let s=r1(i,e);s=a?s.y:s.x,s=lg(s,0,1),t.update(n,s,a)}hv(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))}checkMuted(){this.player_.muted()&&this.player_.muted(!1)}getPercent(){return this.player_.muted()?0:this.player_.volume()}stepForward(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)}stepBack(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)}updateARIAAttributes(e){const t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",t),this.el_.setAttribute("aria-valuetext",t+"%")}volumeAsPercentage_(){return Math.round(this.player_.volume()*100)}updateLastVolume_(){const e=this.player_.volume();this.one("sliderinactive",()=>{this.player_.volume()===0&&this.player_.lastVolume_(e)})}}u1.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"};!Mi&&!cs&&u1.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay");u1.prototype.playerEvent="volumechange";se.registerComponent("VolumeBar",u1);class c8 extends se{constructor(e,t={}){t.vertical=t.vertical||!1,(typeof t.volumeBar>"u"||rf(t.volumeBar))&&(t.volumeBar=t.volumeBar||{},t.volumeBar.vertical=t.vertical),super(e,t),bre(this,e),this.throttledHandleMouseMove=fs($t(this,this.handleMouseMove),Kn),this.handleMouseUpHandler_=i=>this.handleMouseUp(i),this.on("mousedown",i=>this.handleMouseDown(i)),this.on("touchstart",i=>this.handleMouseDown(i)),this.on("mousemove",i=>this.handleMouseMove(i)),this.on(this.volumeBar,["focus","slideractive"],()=>{this.volumeBar.addClass("vjs-slider-active"),this.addClass("vjs-slider-active"),this.trigger("slideractive")}),this.on(this.volumeBar,["blur","sliderinactive"],()=>{this.volumeBar.removeClass("vjs-slider-active"),this.removeClass("vjs-slider-active"),this.trigger("sliderinactive")})}createEl(){let e="vjs-volume-horizontal";return this.options_.vertical&&(e="vjs-volume-vertical"),super.createEl("div",{className:`vjs-volume-control vjs-control ${e}`})}handleMouseDown(e){const t=this.el_.ownerDocument;this.on(t,"mousemove",this.throttledHandleMouseMove),this.on(t,"touchmove",this.throttledHandleMouseMove),this.on(t,"mouseup",this.handleMouseUpHandler_),this.on(t,"touchend",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.el_.ownerDocument;this.off(t,"mousemove",this.throttledHandleMouseMove),this.off(t,"touchmove",this.throttledHandleMouseMove),this.off(t,"mouseup",this.handleMouseUpHandler_),this.off(t,"touchend",this.handleMouseUpHandler_)}handleMouseMove(e){this.volumeBar.handleMouseMove(e)}}c8.prototype.options_={children:["volumeBar"]};se.registerComponent("VolumeControl",c8);const xre=function(r,e){e.tech_&&!e.tech_.featuresMuteControl&&r.addClass("vjs-hidden"),r.on(e,"loadstart",function(){e.tech_.featuresMuteControl?r.removeClass("vjs-hidden"):r.addClass("vjs-hidden")})};class h8 extends li{constructor(e,t){super(e,t),xre(this,e),this.on(e,["loadstart","volumechange"],i=>this.update(i))}buildCSSClass(){return`vjs-mute-control ${super.buildCSSClass()}`}handleClick(e){const t=this.player_.volume(),i=this.player_.lastVolume_();if(t===0){const n=i<.1?.1:i;this.player_.volume(n),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())}update(e){this.updateIcon_(),this.updateControlText_()}updateIcon_(){const e=this.player_.volume();let t=3;this.setIcon("volume-high"),Mi&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),e===0||this.player_.muted()?(this.setIcon("volume-mute"),t=0):e<.33?(this.setIcon("volume-low"),t=1):e<.67&&(this.setIcon("volume-medium"),t=2),e1(this.el_,[0,1,2,3].reduce((i,n)=>i+`${n?" ":""}vjs-vol-${n}`,"")),ku(this.el_,`vjs-vol-${t}`)}updateControlText_(){const t=this.player_.muted()||this.player_.volume()===0?"Unmute":"Mute";this.controlText()!==t&&this.controlText(t)}}h8.prototype.controlText_="Mute";se.registerComponent("MuteToggle",h8);class f8 extends se{constructor(e,t={}){typeof t.inline<"u"?t.inline=t.inline:t.inline=!0,(typeof t.volumeControl>"u"||rf(t.volumeControl))&&(t.volumeControl=t.volumeControl||{},t.volumeControl.vertical=!t.inline),super(e,t),this.handleKeyPressHandler_=i=>this.handleKeyPress(i),this.on(e,["loadstart"],i=>this.volumePanelState_(i)),this.on(this.muteToggle,"keyup",i=>this.handleKeyPress(i)),this.on(this.volumeControl,"keyup",i=>this.handleVolumeControlKeyUp(i)),this.on("keydown",i=>this.handleKeyPress(i)),this.on("mouseover",i=>this.handleMouseOver(i)),this.on("mouseout",i=>this.handleMouseOut(i)),this.on(this.volumeControl,["slideractive"],this.sliderActive_),this.on(this.volumeControl,["sliderinactive"],this.sliderInactive_)}sliderActive_(){this.addClass("vjs-slider-active")}sliderInactive_(){this.removeClass("vjs-slider-active")}volumePanelState_(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")}createEl(){let e="vjs-volume-panel-horizontal";return this.options_.inline||(e="vjs-volume-panel-vertical"),super.createEl("div",{className:`vjs-volume-panel vjs-control ${e}`})}dispose(){this.handleMouseOut(),super.dispose()}handleVolumeControlKeyUp(e){e.key==="Escape"&&this.muteToggle.focus()}handleMouseOver(e){this.addClass("vjs-hover"),Tn(pe,"keyup",this.handleKeyPressHandler_)}handleMouseOut(e){this.removeClass("vjs-hover"),oi(pe,"keyup",this.handleKeyPressHandler_)}handleKeyPress(e){e.key==="Escape"&&this.handleMouseOut()}}f8.prototype.options_={children:["muteToggle","volumeControl"]};se.registerComponent("VolumePanel",f8);class d8 extends li{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipForwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`forward-${this.skipTime}`),this.controlText(this.localize("Skip forward {1} seconds",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipForwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.forward}buildCSSClass(){return`vjs-skip-forward-${this.getSkipForwardTime()} ${super.buildCSSClass()}`}handleClick(e){if(isNaN(this.player_.duration()))return;const t=this.player_.currentTime(),i=this.player_.liveTracker,n=i&&i.isLive()?i.seekableEnd():this.player_.duration();let a;t+this.skipTime<=n?a=t+this.skipTime:a=n,this.player_.currentTime(a)}handleLanguagechange(){this.controlText(this.localize("Skip forward {1} seconds",[this.skipTime]))}}d8.prototype.controlText_="Skip Forward";se.registerComponent("SkipForward",d8);class p8 extends li{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipBackwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`replay-${this.skipTime}`),this.controlText(this.localize("Skip backward {1} seconds",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipBackwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.backward}buildCSSClass(){return`vjs-skip-backward-${this.getSkipBackwardTime()} ${super.buildCSSClass()}`}handleClick(e){const t=this.player_.currentTime(),i=this.player_.liveTracker,n=i&&i.isLive()&&i.seekableStart();let a;n&&t-this.skipTime<=n?a=n:t>=this.skipTime?a=t-this.skipTime:a=0,this.player_.currentTime(a)}handleLanguagechange(){this.controlText(this.localize("Skip backward {1} seconds",[this.skipTime]))}}p8.prototype.controlText_="Skip Backward";se.registerComponent("SkipBackward",p8);class v8 extends se{constructor(e,t){super(e,t),t&&(this.menuButton_=t.menuButton),this.focusedChild_=-1,this.on("keydown",i=>this.handleKeyDown(i)),this.boundHandleBlur_=i=>this.handleBlur(i),this.boundHandleTapClick_=i=>this.handleTapClick(i)}addEventListenerForItem(e){e instanceof se&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))}removeEventListenerForItem(e){e instanceof se&&(this.off(e,"blur",this.boundHandleBlur_),this.off(e,["tap","click"],this.boundHandleTapClick_))}removeChild(e){typeof e=="string"&&(e=this.getChild(e)),this.removeEventListenerForItem(e),super.removeChild(e)}addItem(e){const t=this.addChild(e);t&&this.addEventListenerForItem(t)}createEl(){const e=this.options_.contentElType||"ul";this.contentEl_=Ze(e,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");const t=super.createEl("div",{append:this.contentEl_,className:"vjs-menu"});return t.appendChild(this.contentEl_),Tn(t,"click",function(i){i.preventDefault(),i.stopImmediatePropagation()}),t}dispose(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,super.dispose()}handleBlur(e){const t=e.relatedTarget||pe.activeElement;if(!this.children().some(i=>i.el()===t)){const i=this.menuButton_;i&&i.buttonPressed_&&t!==i.el().firstChild&&i.unpressButton()}}handleTapClick(e){if(this.menuButton_){this.menuButton_.unpressButton();const t=this.children();if(!Array.isArray(t))return;const i=t.filter(n=>n.el()===e.target)[0];if(!i)return;i.name()!=="CaptionSettingsMenuItem"&&this.menuButton_.focus()}}handleKeyDown(e){e.key==="ArrowLeft"||e.key==="ArrowDown"?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(e.key==="ArrowRight"||e.key==="ArrowUp")&&(e.preventDefault(),e.stopPropagation(),this.stepBack())}stepForward(){let e=0;this.focusedChild_!==void 0&&(e=this.focusedChild_+1),this.focus(e)}stepBack(){let e=0;this.focusedChild_!==void 0&&(e=this.focusedChild_-1),this.focus(e)}focus(e=0){const t=this.children().slice();t.length&&t[0].hasClass("vjs-menu-title")&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())}}se.registerComponent("Menu",v8);class wA extends se{constructor(e,t={}){super(e,t),this.menuButton_=new li(e,t),this.menuButton_.controlText(this.controlText_),this.menuButton_.el_.setAttribute("aria-haspopup","true");const i=li.prototype.buildCSSClass();this.menuButton_.el_.className=this.buildCSSClass()+" "+i,this.menuButton_.removeClass("vjs-control"),this.addChild(this.menuButton_),this.update(),this.enabled_=!0;const n=a=>this.handleClick(a);this.handleMenuKeyUp_=a=>this.handleMenuKeyUp(a),this.on(this.menuButton_,"tap",n),this.on(this.menuButton_,"click",n),this.on(this.menuButton_,"keydown",a=>this.handleKeyDown(a)),this.on(this.menuButton_,"mouseenter",()=>{this.addClass("vjs-hover"),this.menu.show(),Tn(pe,"keyup",this.handleMenuKeyUp_)}),this.on("mouseleave",a=>this.handleMouseLeave(a)),this.on("keydown",a=>this.handleSubmenuKeyDown(a))}update(){const e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?(this.hide(),this.menu.contentEl_.removeAttribute("role")):(this.show(),this.menu.contentEl_.setAttribute("role","menu"))}createMenu(){const e=new v8(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){const t=Ze("li",{className:"vjs-menu-title",textContent:sr(this.options_.title),tabIndex:-1}),i=new se(this.player_,{el:t});e.addItem(i)}if(this.items=this.createItems(),this.items)for(let t=0;t<this.items.length;t++)e.addItem(this.items[t]);return e}createItems(){}createEl(){return super.createEl("div",{className:this.buildWrapperCSSClass()},{})}setIcon(e){super.setIcon(e,this.menuButton_.el_)}buildWrapperCSSClass(){let e="vjs-menu-button";this.options_.inline===!0?e+="-inline":e+="-popup";const t=li.prototype.buildCSSClass();return`vjs-menu-button ${e} ${t} ${super.buildCSSClass()}`}buildCSSClass(){let e="vjs-menu-button";return this.options_.inline===!0?e+="-inline":e+="-popup",`vjs-menu-button ${e} ${super.buildCSSClass()}`}controlText(e,t=this.menuButton_.el()){return this.menuButton_.controlText(e,t)}dispose(){this.handleMouseLeave(),super.dispose()}handleClick(e){this.buttonPressed_?this.unpressButton():this.pressButton()}handleMouseLeave(e){this.removeClass("vjs-hover"),oi(pe,"keyup",this.handleMenuKeyUp_)}focus(){this.menuButton_.focus()}blur(){this.menuButton_.blur()}handleKeyDown(e){e.key==="Esc"||e.key==="Tab"?(this.buttonPressed_&&this.unpressButton(),!e.key==="Tab"&&(e.preventDefault(),this.menuButton_.focus())):(e.key==="Up"||e.key==="Down"&&!(this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled))&&(this.buttonPressed_||(e.preventDefault(),this.pressButton()))}handleMenuKeyUp(e){(e.key==="Esc"||e.key==="Tab")&&this.removeClass("vjs-hover")}handleSubmenuKeyPress(e){this.handleSubmenuKeyDown(e)}handleSubmenuKeyDown(e){(e.key==="Esc"||e.key==="Tab")&&(this.buttonPressed_&&this.unpressButton(),!e.key==="Tab"&&(e.preventDefault(),this.menuButton_.focus()))}pressButton(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),Mi&&AF())return;this.menu.focus()}}unpressButton(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute("aria-expanded","false"))}disable(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()}enable(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()}}se.registerComponent("MenuButton",wA);class CA extends wA{constructor(e,t){const i=t.tracks;if(super(e,t),this.items.length<=1&&this.hide(),!i)return;const n=$t(this,this.update);i.addEventListener("removetrack",n),i.addEventListener("addtrack",n),i.addEventListener("labelchange",n),this.player_.on("ready",n),this.player_.on("dispose",function(){i.removeEventListener("removetrack",n),i.removeEventListener("addtrack",n),i.removeEventListener("labelchange",n)})}}se.registerComponent("TrackButton",CA);class ug extends l1{constructor(e,t){super(e,t),this.selectable=t.selectable,this.isSelected_=t.selected||!1,this.multiSelectable=t.multiSelectable,this.selected(this.isSelected_),this.selectable?this.multiSelectable?this.el_.setAttribute("role","menuitemcheckbox"):this.el_.setAttribute("role","menuitemradio"):this.el_.setAttribute("role","menuitem")}createEl(e,t,i){this.nonIconControl=!0;const n=super.createEl("li",Object.assign({className:"vjs-menu-item",tabIndex:-1},t),i),a=Ze("span",{className:"vjs-menu-item-text",textContent:this.localize(this.options_.label)});return this.player_.options_.experimentalSvgIcons?n.appendChild(a):n.replaceChild(a,n.querySelector(".vjs-icon-placeholder")),n}handleKeyDown(e){["Tab","Escape","ArrowUp","ArrowLeft","ArrowRight","ArrowDown"].includes(e.key)||super.handleKeyDown(e)}handleClick(e){this.selected(!0)}selected(e){this.selectable&&(e?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))}}se.registerComponent("MenuItem",ug);class cg extends ug{constructor(e,t){const i=t.track,n=e.textTracks();t.label=i.label||i.language||"Unknown",t.selected=i.mode==="showing",super(e,t),this.track=i,this.kinds=(t.kinds||[t.kind||this.track.kind]).filter(Boolean);const a=(...o)=>{this.handleTracksChange.apply(this,o)},s=(...o)=>{this.handleSelectedLanguageChange.apply(this,o)};if(e.on(["loadstart","texttrackchange"],a),n.addEventListener("change",a),n.addEventListener("selectedlanguagechange",s),this.on("dispose",function(){e.off(["loadstart","texttrackchange"],a),n.removeEventListener("change",a),n.removeEventListener("selectedlanguagechange",s)}),n.onchange===void 0){let o;this.on(["tap","click"],function(){if(typeof H.Event!="object")try{o=new H.Event("change")}catch{}o||(o=pe.createEvent("Event"),o.initEvent("change",!0,!0)),n.dispatchEvent(o)})}this.handleTracksChange()}handleClick(e){const t=this.track,i=this.player_.textTracks();if(super.handleClick(e),!!i)for(let n=0;n<i.length;n++){const a=i[n];this.kinds.indexOf(a.kind)!==-1&&(a===t?a.mode!=="showing"&&(a.mode="showing"):a.mode!=="disabled"&&(a.mode="disabled"))}}handleTracksChange(e){const t=this.track.mode==="showing";t!==this.isSelected_&&this.selected(t)}handleSelectedLanguageChange(e){if(this.track.mode==="showing"){const t=this.player_.cache_.selectedLanguage;if(t&&t.enabled&&t.language===this.track.language&&t.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}}dispose(){this.track=null,super.dispose()}}se.registerComponent("TextTrackMenuItem",cg);class g8 extends cg{constructor(e,t){t.track={player:e,kind:t.kind,kinds:t.kinds,default:!1,mode:"disabled"},t.kinds||(t.kinds=[t.kind]),t.label?t.track.label=t.label:t.track.label=t.kinds.join(" and ")+" off",t.selectable=!0,t.multiSelectable=!1,super(e,t)}handleTracksChange(e){const t=this.player().textTracks();let i=!0;for(let n=0,a=t.length;n<a;n++){const s=t[n];if(this.options_.kinds.indexOf(s.kind)>-1&&s.mode==="showing"){i=!1;break}}i!==this.isSelected_&&this.selected(i)}handleSelectedLanguageChange(e){const t=this.player().textTracks();let i=!0;for(let n=0,a=t.length;n<a;n++){const s=t[n];if(["captions","descriptions","subtitles"].indexOf(s.kind)>-1&&s.mode==="showing"){i=!1;break}}i&&(this.player_.cache_.selectedLanguage={enabled:!1})}handleLanguagechange(){this.$(".vjs-menu-item-text").textContent=this.player_.localize(this.options_.label),super.handleLanguagechange()}}se.registerComponent("OffTextTrackMenuItem",g8);class Of extends CA{constructor(e,t={}){t.tracks=e.textTracks(),super(e,t)}createItems(e=[],t=cg){let i;this.label_&&(i=`${this.label_} off`),e.push(new g8(this.player_,{kinds:this.kinds_,kind:this.kind_,label:i})),this.hideThreshold_+=1;const n=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(let a=0;a<n.length;a++){const s=n[a];if(this.kinds_.indexOf(s.kind)>-1){const o=new t(this.player_,{track:s,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});o.addClass(`vjs-${s.kind}-menu-item`),e.push(o)}}return e}}se.registerComponent("TextTrackButton",Of);class m8 extends ug{constructor(e,t){const i=t.track,n=t.cue,a=e.currentTime();t.selectable=!0,t.multiSelectable=!1,t.label=n.text,t.selected=n.startTime<=a&&a<n.endTime,super(e,t),this.track=i,this.cue=n}handleClick(e){super.handleClick(),this.player_.currentTime(this.cue.startTime)}}se.registerComponent("ChaptersTrackMenuItem",m8);class AA extends Of{constructor(e,t,i){super(e,t,i),this.setIcon("chapters"),this.selectCurrentItem_=()=>{this.items.forEach(n=>{n.selected(this.track_.activeCues[0]===n.cue)})}}buildCSSClass(){return`vjs-chapters-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-chapters-button ${super.buildWrapperCSSClass()}`}update(e){if(e&&e.track&&e.track.kind!=="chapters")return;const t=this.findChaptersTrack();t!==this.track_?(this.setTrack(t),super.update()):(!this.items||t&&t.cues&&t.cues.length!==this.items.length)&&super.update()}setTrack(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){const t=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);t&&t.removeEventListener("load",this.updateHandler_),this.track_.removeEventListener("cuechange",this.selectCurrentItem_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode="hidden";const t=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);t&&t.addEventListener("load",this.updateHandler_),this.track_.addEventListener("cuechange",this.selectCurrentItem_)}}}findChaptersTrack(){const e=this.player_.textTracks()||[];for(let t=e.length-1;t>=0;t--){const i=e[t];if(i.kind===this.kind_)return i}}getMenuCaption(){return this.track_&&this.track_.label?this.track_.label:this.localize(sr(this.kind_))}createMenu(){return this.options_.title=this.getMenuCaption(),super.createMenu()}createItems(){const e=[];if(!this.track_)return e;const t=this.track_.cues;if(!t)return e;for(let i=0,n=t.length;i<n;i++){const a=t[i],s=new m8(this.player_,{track:this.track_,cue:a});e.push(s)}return e}}AA.prototype.kind_="chapters";AA.prototype.controlText_="Chapters";se.registerComponent("ChaptersButton",AA);class DA extends Of{constructor(e,t,i){super(e,t,i),this.setIcon("audio-description");const n=e.textTracks(),a=$t(this,this.handleTracksChange);n.addEventListener("change",a),this.on("dispose",function(){n.removeEventListener("change",a)})}handleTracksChange(e){const t=this.player().textTracks();let i=!1;for(let n=0,a=t.length;n<a;n++){const s=t[n];if(s.kind!==this.kind_&&s.mode==="showing"){i=!0;break}}i?this.disable():this.enable()}buildCSSClass(){return`vjs-descriptions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-descriptions-button ${super.buildWrapperCSSClass()}`}}DA.prototype.kind_="descriptions";DA.prototype.controlText_="Descriptions";se.registerComponent("DescriptionsButton",DA);class EA extends Of{constructor(e,t,i){super(e,t,i),this.setIcon("subtitles")}buildCSSClass(){return`vjs-subtitles-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subtitles-button ${super.buildWrapperCSSClass()}`}}EA.prototype.kind_="subtitles";EA.prototype.controlText_="Subtitles";se.registerComponent("SubtitlesButton",EA);class IA extends cg{constructor(e,t){t.track={player:e,kind:t.kind,label:t.kind+" settings",selectable:!1,default:!1,mode:"disabled"},t.selectable=!1,t.name="CaptionSettingsMenuItem",super(e,t),this.addClass("vjs-texttrack-settings"),this.controlText(", opens "+t.kind+" settings dialog")}handleClick(e){this.player().getChild("textTrackSettings").open()}handleLanguagechange(){this.$(".vjs-menu-item-text").textContent=this.player_.localize(this.options_.kind+" settings"),super.handleLanguagechange()}}se.registerComponent("CaptionSettingsMenuItem",IA);class PA extends Of{constructor(e,t,i){super(e,t,i),this.setIcon("captions")}buildCSSClass(){return`vjs-captions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-captions-button ${super.buildWrapperCSSClass()}`}createItems(){const e=[];return!(this.player().tech_&&this.player().tech_.featuresNativeTextTracks)&&this.player().getChild("textTrackSettings")&&(e.push(new IA(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),super.createItems(e)}}PA.prototype.kind_="captions";PA.prototype.controlText_="Captions";se.registerComponent("CaptionsButton",PA);class y8 extends cg{createEl(e,t,i){const n=super.createEl(e,t,i),a=n.querySelector(".vjs-menu-item-text");return this.options_.track.kind==="captions"&&(this.player_.options_.experimentalSvgIcons?this.setIcon("captions",n):a.appendChild(Ze("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),a.appendChild(Ze("span",{className:"vjs-control-text",textContent:` ${this.localize("Captions")}`}))),n}}se.registerComponent("SubsCapsMenuItem",y8);class MA extends Of{constructor(e,t={}){super(e,t),this.label_="subtitles",this.setIcon("subtitles"),["en","en-us","en-ca","fr-ca"].indexOf(this.player_.language_)>-1&&(this.label_="captions",this.setIcon("captions")),this.menuButton_.controlText(sr(this.label_))}buildCSSClass(){return`vjs-subs-caps-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subs-caps-button ${super.buildWrapperCSSClass()}`}createItems(){let e=[];return!(this.player().tech_&&this.player().tech_.featuresNativeTextTracks)&&this.player().getChild("textTrackSettings")&&(e.push(new IA(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=super.createItems(e,y8),e}}MA.prototype.kinds_=["captions","subtitles"];MA.prototype.controlText_="Subtitles";se.registerComponent("SubsCapsButton",MA);class _8 extends ug{constructor(e,t){const i=t.track,n=e.audioTracks();t.label=i.label||i.language||"Unknown",t.selected=i.enabled,super(e,t),this.track=i,this.addClass(`vjs-${i.kind}-menu-item`);const a=(...s)=>{this.handleTracksChange.apply(this,s)};n.addEventListener("change",a),this.on("dispose",()=>{n.removeEventListener("change",a)})}createEl(e,t,i){const n=super.createEl(e,t,i),a=n.querySelector(".vjs-menu-item-text");return["main-desc","descriptions"].indexOf(this.options_.track.kind)>=0&&(a.appendChild(Ze("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),a.appendChild(Ze("span",{className:"vjs-control-text",textContent:" "+this.localize("Descriptions")}))),n}handleClick(e){if(super.handleClick(e),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks){const t=this.player_.audioTracks();for(let i=0;i<t.length;i++){const n=t[i];n!==this.track&&(n.enabled=n===this.track)}}}handleTracksChange(e){this.selected(this.track.enabled)}}se.registerComponent("AudioTrackMenuItem",_8);class b8 extends CA{constructor(e,t={}){t.tracks=e.audioTracks(),super(e,t),this.setIcon("audio")}buildCSSClass(){return`vjs-audio-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-audio-button ${super.buildWrapperCSSClass()}`}createItems(e=[]){this.hideThreshold_=1;const t=this.player_.audioTracks();for(let i=0;i<t.length;i++){const n=t[i];e.push(new _8(this.player_,{track:n,selectable:!0,multiSelectable:!1}))}return e}}b8.prototype.controlText_="Audio Track";se.registerComponent("AudioTrackButton",b8);class LA extends ug{constructor(e,t){const i=t.rate,n=parseFloat(i,10);t.label=i,t.selected=n===e.playbackRate(),t.selectable=!0,t.multiSelectable=!1,super(e,t),this.label=i,this.rate=n,this.on(e,"ratechange",a=>this.update(a))}handleClick(e){super.handleClick(),this.player().playbackRate(this.rate)}update(e){this.selected(this.player().playbackRate()===this.rate)}}LA.prototype.contentElType="button";se.registerComponent("PlaybackRateMenuItem",LA);class S8 extends wA{constructor(e,t){super(e,t),this.menuButton_.el_.setAttribute("aria-describedby",this.labelElId_),this.updateVisibility(),this.updateLabel(),this.on(e,"loadstart",i=>this.updateVisibility(i)),this.on(e,"ratechange",i=>this.updateLabel(i)),this.on(e,"playbackrateschange",i=>this.handlePlaybackRateschange(i))}createEl(){const e=super.createEl();return this.labelElId_="vjs-playback-rate-value-label-"+this.id_,this.labelEl_=Ze("div",{className:"vjs-playback-rate-value",id:this.labelElId_,textContent:"1x"}),e.appendChild(this.labelEl_),e}dispose(){this.labelEl_=null,super.dispose()}buildCSSClass(){return`vjs-playback-rate ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-playback-rate ${super.buildWrapperCSSClass()}`}createItems(){const e=this.playbackRates(),t=[];for(let i=e.length-1;i>=0;i--)t.push(new LA(this.player(),{rate:e[i]+"x"}));return t}handlePlaybackRateschange(e){this.update()}playbackRates(){const e=this.player();return e.playbackRates&&e.playbackRates()||[]}playbackRateSupported(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0}updateVisibility(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")}updateLabel(e){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+"x")}}S8.prototype.controlText_="Playback Rate";se.registerComponent("PlaybackRateMenuButton",S8);class T8 extends se{buildCSSClass(){return`vjs-spacer ${super.buildCSSClass()}`}createEl(e="div",t={},i={}){return t.className||(t.className=this.buildCSSClass()),super.createEl(e,t,i)}}se.registerComponent("Spacer",T8);class wre extends T8{buildCSSClass(){return`vjs-custom-control-spacer ${super.buildCSSClass()}`}createEl(){return super.createEl("div",{className:this.buildCSSClass(),textContent:" "})}}se.registerComponent("CustomControlSpacer",wre);class x8 extends se{createEl(){return super.createEl("div",{className:"vjs-control-bar",dir:"ltr"})}}x8.prototype.options_={children:["playToggle","skipBackward","skipForward","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","pictureInPictureToggle","fullscreenToggle"]};se.registerComponent("ControlBar",x8);class w8 extends kf{constructor(e,t){super(e,t),this.on(e,"error",i=>{this.open(i)})}buildCSSClass(){return`vjs-error-display ${super.buildCSSClass()}`}content(){const e=this.player().error();return e?this.localize(e.message):""}}w8.prototype.options_=Object.assign({},kf.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0});se.registerComponent("ErrorDisplay",w8);class C8 extends se{constructor(e,t={}){super(e,t),this.el_.setAttribute("aria-labelledby",this.selectLabelledbyIds)}createEl(){return this.selectLabelledbyIds=[this.options_.legendId,this.options_.labelId].join(" ").trim(),Ze("select",{id:this.options_.id},{},this.options_.SelectOptions.map(t=>{const i=(this.options_.labelId?this.options_.labelId:`vjs-track-option-${Yn()}`)+"-"+t[1].replace(/\W+/g,""),n=Ze("option",{id:i,value:this.localize(t[0]),textContent:t[1]});return n.setAttribute("aria-labelledby",`${this.selectLabelledbyIds} ${i}`),n}))}}se.registerComponent("TextTrackSelect",C8);class Ou extends se{constructor(e,t={}){super(e,t);const i=Ze("legend",{textContent:this.localize(this.options_.legendText),id:this.options_.legendId});this.el().appendChild(i);const n=this.options_.selects;for(const a of n){const s=this.options_.selectConfigs[a],o=s.className,l=s.id.replace("%s",this.options_.id_);let u=null;const c=`vjs_select_${Yn()}`;if(this.options_.type==="colors"){u=Ze("span",{className:o});const d=Ze("label",{id:l,className:"vjs-label",textContent:s.label});d.setAttribute("for",c),u.appendChild(d)}const h=new C8(e,{SelectOptions:s.options,legendId:this.options_.legendId,id:c,labelId:l});this.addChild(h),this.options_.type==="colors"&&(u.appendChild(h.el()),this.el().appendChild(u))}}createEl(){return Ze("fieldset",{className:this.options_.className})}}se.registerComponent("TextTrackFieldset",Ou);class A8 extends se{constructor(e,t={}){super(e,t);const i=this.options_.textTrackComponentid,n=new Ou(e,{id_:i,legendId:`captions-text-legend-${i}`,legendText:this.localize("Text"),className:"vjs-fg vjs-track-setting",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(n);const a=new Ou(e,{id_:i,legendId:`captions-background-${i}`,legendText:this.localize("Text Background"),className:"vjs-bg vjs-track-setting",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(a);const s=new Ou(e,{id_:i,legendId:`captions-window-${i}`,legendText:this.localize("Caption Area Background"),className:"vjs-window vjs-track-setting",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(s)}createEl(){return Ze("div",{className:"vjs-track-settings-colors"})}}se.registerComponent("TextTrackSettingsColors",A8);class D8 extends se{constructor(e,t={}){super(e,t);const i=this.options_.textTrackComponentid,n=new Ou(e,{id_:i,legendId:`captions-font-size-${i}`,legendText:"Font Size",className:"vjs-font-percent vjs-track-setting",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:"font"});this.addChild(n);const a=new Ou(e,{id_:i,legendId:`captions-edge-style-${i}`,legendText:this.localize("Text Edge Style"),className:"vjs-edge-style vjs-track-setting",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:"font"});this.addChild(a);const s=new Ou(e,{id_:i,legendId:`captions-font-family-${i}`,legendText:this.localize("Font Family"),className:"vjs-font-family vjs-track-setting",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:"font"});this.addChild(s)}createEl(){return Ze("div",{className:"vjs-track-settings-font"})}}se.registerComponent("TextTrackSettingsFont",D8);class E8 extends se{constructor(e,t={}){super(e,t);const i=this.localize("restore all settings to the default values"),n=new li(e,{controlText:i,className:"vjs-default-button"});n.el().classList.remove("vjs-control","vjs-button"),n.el().textContent=this.localize("Reset"),this.addChild(n);const a=new li(e,{controlText:i,className:"vjs-done-button"});a.el().classList.remove("vjs-control","vjs-button"),a.el().textContent=this.localize("Done"),this.addChild(a)}createEl(){return Ze("div",{className:"vjs-track-settings-controls"})}}se.registerComponent("TrackSettingsControls",E8);const Hb="vjs-text-track-settings",PM=["#000","Black"],MM=["#00F","Blue"],LM=["#0FF","Cyan"],kM=["#0F0","Green"],RM=["#F0F","Magenta"],OM=["#F00","Red"],NM=["#FFF","White"],BM=["#FF0","Yellow"],$b=["1","Opaque"],Wb=["0.5","Semi-Transparent"],FM=["0","Transparent"],Mo={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[PM,NM,OM,kM,MM,BM,RM,LM],className:"vjs-bg-color"},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Opacity",options:[$b,Wb,FM],className:"vjs-bg-opacity vjs-opacity"},color:{selector:".vjs-text-color > select",id:"captions-foreground-color-%s",label:"Color",options:[NM,PM,OM,kM,MM,BM,RM,LM],className:"vjs-text-color"},edgeStyle:{selector:".vjs-edge-style > select",id:"",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Drop shadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:r=>r==="1.00"?null:Number(r)},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Opacity",options:[$b,Wb],className:"vjs-text-opacity vjs-opacity"},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color",className:"vjs-window-color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Opacity",options:[FM,Wb,$b],className:"vjs-window-opacity vjs-opacity"}};Mo.windowColor.options=Mo.backgroundColor.options;function I8(r,e){if(e&&(r=e(r)),r&&r!=="none")return r}function Cre(r,e){const t=r.options[r.options.selectedIndex].value;return I8(t,e)}function Are(r,e,t){if(e){for(let i=0;i<r.options.length;i++)if(I8(r.options[i].value,t)===e){r.selectedIndex=i;break}}}class Dre extends kf{constructor(e,t){t.temporary=!1,super(e,t),this.updateDisplay=this.updateDisplay.bind(this),this.fill(),this.hasBeenOpened_=this.hasBeenFilled_=!0,this.renderModalComponents(e),this.endDialog=Ze("p",{className:"vjs-control-text",textContent:this.localize("End of dialog window.")}),this.el().appendChild(this.endDialog),this.setDefaults(),t.persistTextTrackSettings===void 0&&(this.options_.persistTextTrackSettings=this.options_.playerOptions.persistTextTrackSettings),this.bindFunctionsToSelectsAndButtons(),this.options_.persistTextTrackSettings&&this.restoreSettings()}renderModalComponents(e){const t=new A8(e,{textTrackComponentid:this.id_,selectConfigs:Mo,fieldSets:[["color","textOpacity"],["backgroundColor","backgroundOpacity"],["windowColor","windowOpacity"]]});this.addChild(t);const i=new D8(e,{textTrackComponentid:this.id_,selectConfigs:Mo,fieldSets:[["fontPercent"],["edgeStyle"],["fontFamily"]]});this.addChild(i);const n=new E8(e);this.addChild(n)}bindFunctionsToSelectsAndButtons(){this.on(this.$(".vjs-done-button"),["click","tap"],()=>{this.saveSettings(),this.close()}),this.on(this.$(".vjs-default-button"),["click","tap"],()=>{this.setDefaults(),this.updateDisplay()}),Eh(Mo,e=>{this.on(this.$(e.selector),"change",this.updateDisplay)})}dispose(){this.endDialog=null,super.dispose()}label(){return this.localize("Caption Settings Dialog")}description(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")}buildCSSClass(){return super.buildCSSClass()+" vjs-text-track-settings"}getValues(){return _F(Mo,(e,t,i)=>{const n=Cre(this.$(t.selector),t.parser);return n!==void 0&&(e[i]=n),e},{})}setValues(e){Eh(Mo,(t,i)=>{Are(this.$(t.selector),e[i],t.parser)})}setDefaults(){Eh(Mo,e=>{const t=e.hasOwnProperty("default")?e.default:0;this.$(e.selector).selectedIndex=t})}restoreSettings(){let e;try{e=JSON.parse(H.localStorage.getItem(Hb))}catch(t){vt.warn(t)}e&&this.setValues(e)}saveSettings(){if(!this.options_.persistTextTrackSettings)return;const e=this.getValues();try{Object.keys(e).length?H.localStorage.setItem(Hb,JSON.stringify(e)):H.localStorage.removeItem(Hb)}catch(t){vt.warn(t)}}updateDisplay(){const e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()}handleLanguagechange(){this.fill(),this.renderModalComponents(this.player_),this.bindFunctionsToSelectsAndButtons()}}se.registerComponent("TextTrackSettings",Dre);class Ere extends se{constructor(e,t){let i=t.ResizeObserver||H.ResizeObserver;t.ResizeObserver===null&&(i=!1);const n=zt({createEl:!i,reportTouchActivity:!1},t);super(e,n),this.ResizeObserver=t.ResizeObserver||H.ResizeObserver,this.loadListener_=null,this.resizeObserver_=null,this.debouncedHandler_=GF(()=>{this.resizeHandler()},100,!1,this),i?(this.resizeObserver_=new this.ResizeObserver(this.debouncedHandler_),this.resizeObserver_.observe(e.el())):(this.loadListener_=()=>{if(!this.el_||!this.el_.contentWindow)return;const a=this.debouncedHandler_;let s=this.unloadListener_=function(){oi(this,"resize",a),oi(this,"unload",s),s=null};Tn(this.el_.contentWindow,"unload",s),Tn(this.el_.contentWindow,"resize",a)},this.one("load",this.loadListener_))}createEl(){return super.createEl("iframe",{className:"vjs-resize-manager",tabIndex:-1,title:this.localize("No content")},{"aria-hidden":"true"})}resizeHandler(){!this.player_||!this.player_.trigger||this.player_.trigger("playerresize")}dispose(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off("load",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,super.dispose()}}se.registerComponent("ResizeManager",Ere);const Ire={trackingThreshold:20,liveTolerance:15};class Pre extends se{constructor(e,t){const i=zt(Ire,t,{createEl:!1});super(e,i),this.trackLiveHandler_=()=>this.trackLive_(),this.handlePlay_=n=>this.handlePlay(n),this.handleFirstTimeupdate_=n=>this.handleFirstTimeupdate(n),this.handleSeeked_=n=>this.handleSeeked(n),this.seekToLiveEdge_=n=>this.seekToLiveEdge(n),this.reset_(),this.on(this.player_,"durationchange",n=>this.handleDurationchange(n)),this.on(this.player_,"canplay",()=>this.toggleTracking())}trackLive_(){const e=this.player_.seekable();if(!e||!e.length)return;const t=Number(H.performance.now().toFixed(4)),i=this.lastTime_===-1?0:(t-this.lastTime_)/1e3;this.lastTime_=t,this.pastSeekEnd_=this.pastSeekEnd()+i;const n=this.liveCurrentTime(),a=this.player_.currentTime();let s=this.player_.paused()||this.seekedBehindLive_||Math.abs(n-a)>this.options_.liveTolerance;(!this.timeupdateSeen_||n===1/0)&&(s=!1),s!==this.behindLiveEdge_&&(this.behindLiveEdge_=s,this.trigger("liveedgechange"))}handleDurationchange(){this.toggleTracking()}toggleTracking(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass("vjs-liveui"),this.startTracking()):(this.player_.removeClass("vjs-liveui"),this.stopTracking())}startTracking(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,Kn),this.trackLive_(),this.on(this.player_,["play","pause"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,"seeked",this.handleSeeked_):(this.one(this.player_,"play",this.handlePlay_),this.one(this.player_,"timeupdate",this.handleFirstTimeupdate_)))}handleFirstTimeupdate(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked_)}handleSeeked(){const e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()}handlePlay(){this.one(this.player_,"timeupdate",this.seekToLiveEdge_)}reset_(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,["play","pause"],this.trackLiveHandler_),this.off(this.player_,"seeked",this.handleSeeked_),this.off(this.player_,"play",this.handlePlay_),this.off(this.player_,"timeupdate",this.handleFirstTimeupdate_),this.off(this.player_,"timeupdate",this.seekToLiveEdge_)}nextSeekedFromUser(){this.nextSeekedFromUser_=!0}stopTracking(){this.isTracking()&&(this.reset_(),this.trigger("liveedgechange"))}seekableEnd(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;for(;i--;)t.push(e.end(i));return t.length?t.sort()[t.length-1]:1/0}seekableStart(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;for(;i--;)t.push(e.start(i));return t.length?t.sort()[0]:0}liveWindow(){const e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()}isLive(){return this.isTracking()}atLiveEdge(){return!this.behindLiveEdge()}liveCurrentTime(){return this.pastSeekEnd()+this.seekableEnd()}pastSeekEnd(){const e=this.seekableEnd();return this.lastSeekEnd_!==-1&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_}behindLiveEdge(){return this.behindLiveEdge_}isTracking(){return typeof this.trackingInterval_=="number"}seekToLiveEdge(){this.seekedBehindLive_=!1,!this.atLiveEdge()&&(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))}dispose(){this.stopTracking(),super.dispose()}}se.registerComponent("LiveTracker",Pre);class Mre extends se{constructor(e,t){super(e,t),this.on("statechanged",i=>this.updateDom_()),this.updateDom_()}createEl(){return this.els={title:Ze("div",{className:"vjs-title-bar-title",id:`vjs-title-bar-title-${Yn()}`}),description:Ze("div",{className:"vjs-title-bar-description",id:`vjs-title-bar-description-${Yn()}`})},Ze("div",{className:"vjs-title-bar"},{},bF(this.els))}updateDom_(){const e=this.player_.tech_,t=e&&e.el_,i={title:"aria-labelledby",description:"aria-describedby"};["title","description"].forEach(n=>{const a=this.state[n],s=this.els[n],o=i[n];i1(s),a&&fl(s,a),t&&(t.removeAttribute(o),a&&t.setAttribute(o,s.id))}),this.state.title||this.state.description?this.show():this.hide()}update(e){this.setState(e)}dispose(){const e=this.player_.tech_,t=e&&e.el_;t&&(t.removeAttribute("aria-labelledby"),t.removeAttribute("aria-describedby")),super.dispose(),this.els=null}}se.registerComponent("TitleBar",Mre);const Lre={initialDisplay:4e3,position:[],takeFocus:!1};class kre extends li{constructor(e,t){t=zt(Lre,t),super(e,t),this.controlText(t.controlText),this.hide(),this.on(this.player_,["useractive","userinactive"],i=>{this.removeClass("force-display")})}buildCSSClass(){return`vjs-transient-button focus-visible ${this.options_.position.map(e=>`vjs-${e}`).join(" ")}`}createEl(){const e=Ze("button",{},{type:"button",class:this.buildCSSClass()},Ze("span"));return this.controlTextEl_=e.querySelector("span"),e}show(){super.show(),this.addClass("force-display"),this.options_.takeFocus&&this.el().focus({preventScroll:!0}),this.forceDisplayTimeout=this.player_.setTimeout(()=>{this.removeClass("force-display")},this.options_.initialDisplay)}hide(){this.removeClass("force-display"),super.hide()}dispose(){this.player_.clearTimeout(this.forceDisplayTimeout),super.dispose()}}se.registerComponent("TransientButton",kre);const ow=r=>{const e=r.el();if(e.hasAttribute("src"))return r.triggerSourceset(e.src),!0;const t=r.$$("source"),i=[];let n="";if(!t.length)return!1;for(let a=0;a<t.length;a++){const s=t[a].src;s&&i.indexOf(s)===-1&&i.push(s)}return i.length?(i.length===1&&(n=i[0]),r.triggerSourceset(n),!0):!1},Rre=Object.defineProperty({},"innerHTML",{get(){return this.cloneNode(!0).innerHTML},set(r){const e=pe.createElement(this.nodeName.toLowerCase());e.innerHTML=r;const t=pe.createDocumentFragment();for(;e.childNodes.length;)t.appendChild(e.childNodes[0]);return this.innerText="",H.Element.prototype.appendChild.call(this,t),this.innerHTML}}),P8=(r,e)=>{let t={};for(let i=0;i<r.length&&(t=Object.getOwnPropertyDescriptor(r[i],e),!(t&&t.set&&t.get));i++);return t.enumerable=!0,t.configurable=!0,t},Ore=r=>P8([r.el(),H.HTMLMediaElement.prototype,H.Element.prototype,Rre],"innerHTML"),UM=function(r){const e=r.el();if(e.resetSourceWatch_)return;const t={},i=Ore(r),n=a=>(...s)=>{const o=a.apply(e,s);return ow(r),o};["append","appendChild","insertAdjacentHTML"].forEach(a=>{e[a]&&(t[a]=e[a],e[a]=n(t[a]))}),Object.defineProperty(e,"innerHTML",zt(i,{set:n(i.set)})),e.resetSourceWatch_=()=>{e.resetSourceWatch_=null,Object.keys(t).forEach(a=>{e[a]=t[a]}),Object.defineProperty(e,"innerHTML",i)},r.one("sourceset",e.resetSourceWatch_)},Nre=Object.defineProperty({},"src",{get(){return this.hasAttribute("src")?QF(H.Element.prototype.getAttribute.call(this,"src")):""},set(r){return H.Element.prototype.setAttribute.call(this,"src",r),r}}),Bre=r=>P8([r.el(),H.HTMLMediaElement.prototype,Nre],"src"),Fre=function(r){if(!r.featuresSourceset)return;const e=r.el();if(e.resetSourceset_)return;const t=Bre(r),i=e.setAttribute,n=e.load;Object.defineProperty(e,"src",zt(t,{set:a=>{const s=t.set.call(e,a);return r.triggerSourceset(e.src),s}})),e.setAttribute=(a,s)=>{const o=i.call(e,a,s);return/src/i.test(a)&&r.triggerSourceset(e.src),o},e.load=()=>{const a=n.call(e);return ow(r)||(r.triggerSourceset(""),UM(r)),a},e.currentSrc?r.triggerSourceset(e.currentSrc):ow(r)||UM(r),e.resetSourceset_=()=>{e.resetSourceset_=null,e.load=n,e.setAttribute=i,Object.defineProperty(e,"src",t),e.resetSourceWatch_&&e.resetSourceWatch_()}};class we extends it{constructor(e,t){super(e,t);const i=e.source;let n=!1;if(this.featuresVideoFrameCallback=this.featuresVideoFrameCallback&&this.el_.tagName==="VIDEO",i&&(this.el_.currentSrc!==i.src||e.tag&&e.tag.initNetworkState_===3)?this.setSource(i):this.handleLateInit_(this.el_),e.enableSourceset&&this.setupSourcesetHandling_(),this.isScrubbing_=!1,this.el_.hasChildNodes()){const a=this.el_.childNodes;let s=a.length;const o=[];for(;s--;){const l=a[s];l.nodeName.toLowerCase()==="track"&&(this.featuresNativeTextTracks?(this.remoteTextTrackEls().addTrackElement_(l),this.remoteTextTracks().addTrack(l.track),this.textTracks().addTrack(l.track),!n&&!this.el_.hasAttribute("crossorigin")&&o1(l.src)&&(n=!0)):o.push(l))}for(let l=0;l<o.length;l++)this.el_.removeChild(o[l])}this.proxyNativeTracks_(),this.featuresNativeTextTracks&&n&&vt.warn(`Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.
|
||
This may prevent text tracks from loading.`),this.restoreMetadataTracksInIOSNativePlayer_(),(uv||Q_)&&e.nativeControlsForTouch===!0&&this.setControls(!0),this.proxyWebkitFullscreen_(),this.triggerReady()}dispose(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),we.disposeMediaElement(this.el_),this.options_=null,super.dispose()}setupSourcesetHandling_(){Fre(this)}restoreMetadataTracksInIOSNativePlayer_(){const e=this.textTracks();let t;const i=()=>{t=[];for(let a=0;a<e.length;a++){const s=e[a];s.kind==="metadata"&&t.push({track:s,storedMode:s.mode})}};i(),e.addEventListener("change",i),this.on("dispose",()=>e.removeEventListener("change",i));const n=()=>{for(let a=0;a<t.length;a++){const s=t[a];s.track.mode==="disabled"&&s.track.mode!==s.storedMode&&(s.track.mode=s.storedMode)}e.removeEventListener("change",n)};this.on("webkitbeginfullscreen",()=>{e.removeEventListener("change",i),e.removeEventListener("change",n),e.addEventListener("change",n)}),this.on("webkitendfullscreen",()=>{e.removeEventListener("change",i),e.addEventListener("change",i),e.removeEventListener("change",n)})}overrideNative_(e,t){if(t!==this[`featuresNative${e}Tracks`])return;const i=e.toLowerCase();this[`${i}TracksListeners_`]&&Object.keys(this[`${i}TracksListeners_`]).forEach(n=>{this.el()[`${i}Tracks`].removeEventListener(n,this[`${i}TracksListeners_`][n])}),this[`featuresNative${e}Tracks`]=!t,this[`${i}TracksListeners_`]=null,this.proxyNativeTracksForType_(i)}overrideNativeAudioTracks(e){this.overrideNative_("Audio",e)}overrideNativeVideoTracks(e){this.overrideNative_("Video",e)}proxyNativeTracksForType_(e){const t=jn[e],i=this.el()[t.getterName],n=this[t.getterName]();if(!this[`featuresNative${t.capitalName}Tracks`]||!i||!i.addEventListener)return;const a={change:o=>{const l={type:"change",target:n,currentTarget:n,srcElement:n};n.trigger(l),e==="text"&&this[lf.remoteText.getterName]().trigger(l)},addtrack(o){n.addTrack(o.track)},removetrack(o){n.removeTrack(o.track)}},s=function(){const o=[];for(let l=0;l<n.length;l++){let u=!1;for(let c=0;c<i.length;c++)if(i[c]===n[l]){u=!0;break}u||o.push(n[l])}for(;o.length;)n.removeTrack(o.shift())};this[t.getterName+"Listeners_"]=a,Object.keys(a).forEach(o=>{const l=a[o];i.addEventListener(o,l),this.on("dispose",u=>i.removeEventListener(o,l))}),this.on("loadstart",s),this.on("dispose",o=>this.off("loadstart",s))}proxyNativeTracks_(){jn.names.forEach(e=>{this.proxyNativeTracksForType_(e)})}createEl(){let e=this.options_.tag;if(!e||!(this.options_.playerElIngest||this.movingMediaElementInDOM)){if(e){const i=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(i,e),we.disposeMediaElement(e),e=i}else{e=pe.createElement("video");const i=this.options_.tag&&Po(this.options_.tag),n=zt({},i);(!uv||this.options_.nativeControlsForTouch!==!0)&&delete n.controls,IF(e,Object.assign(n,{id:this.options_.techId,class:"vjs-tech"}))}e.playerId=this.options_.playerId}typeof this.options_.preload<"u"&&nf(e,"preload",this.options_.preload),this.options_.disablePictureInPicture!==void 0&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);const t=["loop","muted","playsinline","autoplay"];for(let i=0;i<t.length;i++){const n=t[i],a=this.options_[n];typeof a<"u"&&(a?nf(e,n,n):t1(e,n),e[n]=a)}return e}handleLateInit_(e){if(e.networkState===0||e.networkState===3)return;if(e.readyState===0){let i=!1;const n=function(){i=!0};this.on("loadstart",n);const a=function(){i||this.trigger("loadstart")};this.on("loadedmetadata",a),this.ready(function(){this.off("loadstart",n),this.off("loadedmetadata",a),i||this.trigger("loadstart")});return}const t=["loadstart"];t.push("loadedmetadata"),e.readyState>=2&&t.push("loadeddata"),e.readyState>=3&&t.push("canplay"),e.readyState>=4&&t.push("canplaythrough"),this.ready(function(){t.forEach(function(i){this.trigger(i)},this)})}setScrubbing(e){this.isScrubbing_=e}scrubbing(){return this.isScrubbing_}setCurrentTime(e){try{this.isScrubbing_&&this.el_.fastSeek&&J_?this.el_.fastSeek(e):this.el_.currentTime=e}catch(t){vt(t,"Video is not ready. (Video.js)")}}duration(){if(this.el_.duration===1/0&&cs&&hs&&this.el_.currentTime===0){const e=()=>{this.el_.currentTime>0&&(this.el_.duration===1/0&&this.trigger("durationchange"),this.off("timeupdate",e))};return this.on("timeupdate",e),NaN}return this.el_.duration||NaN}width(){return this.el_.offsetWidth}height(){return this.el_.offsetHeight}proxyWebkitFullscreen_(){if(!("webkitDisplayingFullscreen"in this.el_))return;const e=function(){this.trigger("fullscreenchange",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},t=function(){"webkitPresentationMode"in this.el_&&this.el_.webkitPresentationMode!=="picture-in-picture"&&(this.one("webkitendfullscreen",e),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",t),this.on("dispose",()=>{this.off("webkitbeginfullscreen",t),this.off("webkitendfullscreen",e)})}supportsFullScreen(){return typeof this.el_.webkitEnterFullScreen=="function"}enterFullScreen(){const e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)Ya(this.el_.play()),this.setTimeout(function(){e.pause();try{e.webkitEnterFullScreen()}catch(t){this.trigger("fullscreenerror",t)}},0);else try{e.webkitEnterFullScreen()}catch(t){this.trigger("fullscreenerror",t)}}exitFullScreen(){if(!this.el_.webkitDisplayingFullscreen){this.trigger("fullscreenerror",new Error("The video is not fullscreen"));return}this.el_.webkitExitFullScreen()}requestPictureInPicture(){return this.el_.requestPictureInPicture()}requestVideoFrameCallback(e){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(e):super.requestVideoFrameCallback(e)}cancelVideoFrameCallback(e){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(e):super.cancelVideoFrameCallback(e)}src(e){if(e===void 0)return this.el_.src;this.setSrc(e)}reset(){we.resetMediaElement(this.el_)}currentSrc(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc}setControls(e){this.el_.controls=!!e}addTextTrack(e,t,i){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,t,i):super.addTextTrack(e,t,i)}createRemoteTextTrack(e){if(!this.featuresNativeTextTracks)return super.createRemoteTextTrack(e);const t=pe.createElement("track");return e.kind&&(t.kind=e.kind),e.label&&(t.label=e.label),(e.language||e.srclang)&&(t.srclang=e.language||e.srclang),e.default&&(t.default=e.default),e.id&&(t.id=e.id),e.src&&(t.src=e.src),t}addRemoteTextTrack(e,t){const i=super.addRemoteTextTrack(e,t);return this.featuresNativeTextTracks&&this.el().appendChild(i),i}removeRemoteTextTrack(e){if(super.removeRemoteTextTrack(e),this.featuresNativeTextTracks){const t=this.$$("track");let i=t.length;for(;i--;)(e===t[i]||e===t[i].track)&&this.el().removeChild(t[i])}}getVideoPlaybackQuality(){if(typeof this.el().getVideoPlaybackQuality=="function")return this.el().getVideoPlaybackQuality();const e={};return typeof this.el().webkitDroppedFrameCount<"u"&&typeof this.el().webkitDecodedFrameCount<"u"&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),H.performance&&(e.creationTime=H.performance.now()),e}}Y_(we,"TEST_VID",function(){if(!Pf())return;const r=pe.createElement("video"),e=pe.createElement("track");return e.kind="captions",e.srclang="en",e.label="English",r.appendChild(e),r});we.isSupported=function(){try{we.TEST_VID.volume=.5}catch{return!1}return!!(we.TEST_VID&&we.TEST_VID.canPlayType)};we.canPlayType=function(r){return we.TEST_VID.canPlayType(r)};we.canPlaySource=function(r,e){return we.canPlayType(r.type)};we.canControlVolume=function(){try{const r=we.TEST_VID.volume;we.TEST_VID.volume=r/2+.1;const e=r!==we.TEST_VID.volume;return e&&Mi?(H.setTimeout(()=>{we&&we.prototype&&(we.prototype.featuresVolumeControl=r!==we.TEST_VID.volume)}),!1):e}catch{return!1}};we.canMuteVolume=function(){try{const r=we.TEST_VID.muted;return we.TEST_VID.muted=!r,we.TEST_VID.muted?nf(we.TEST_VID,"muted","muted"):t1(we.TEST_VID,"muted","muted"),r!==we.TEST_VID.muted}catch{return!1}};we.canControlPlaybackRate=function(){if(cs&&hs&&K_<58)return!1;try{const r=we.TEST_VID.playbackRate;return we.TEST_VID.playbackRate=r/2+.1,r!==we.TEST_VID.playbackRate}catch{return!1}};we.canOverrideAttributes=function(){try{const r=()=>{};Object.defineProperty(pe.createElement("video"),"src",{get:r,set:r}),Object.defineProperty(pe.createElement("audio"),"src",{get:r,set:r}),Object.defineProperty(pe.createElement("video"),"innerHTML",{get:r,set:r}),Object.defineProperty(pe.createElement("audio"),"innerHTML",{get:r,set:r})}catch{return!1}return!0};we.supportsNativeTextTracks=function(){return J_||Mi&&hs};we.supportsNativeVideoTracks=function(){return!!(we.TEST_VID&&we.TEST_VID.videoTracks)};we.supportsNativeAudioTracks=function(){return!!(we.TEST_VID&&we.TEST_VID.audioTracks)};we.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"];[["featuresMuteControl","canMuteVolume"],["featuresPlaybackRate","canControlPlaybackRate"],["featuresSourceset","canOverrideAttributes"],["featuresNativeTextTracks","supportsNativeTextTracks"],["featuresNativeVideoTracks","supportsNativeVideoTracks"],["featuresNativeAudioTracks","supportsNativeAudioTracks"]].forEach(function([r,e]){Y_(we.prototype,r,()=>we[e](),!0)});we.prototype.featuresVolumeControl=we.canControlVolume();we.prototype.movingMediaElementInDOM=!Mi;we.prototype.featuresFullscreenResize=!0;we.prototype.featuresProgressEvents=!0;we.prototype.featuresTimeupdateEvents=!0;we.prototype.featuresVideoFrameCallback=!!(we.TEST_VID&&we.TEST_VID.requestVideoFrameCallback);we.disposeMediaElement=function(r){if(r){for(r.parentNode&&r.parentNode.removeChild(r);r.hasChildNodes();)r.removeChild(r.firstChild);r.removeAttribute("src"),typeof r.load=="function"&&function(){try{r.load()}catch{}}()}};we.resetMediaElement=function(r){if(!r)return;const e=r.querySelectorAll("source");let t=e.length;for(;t--;)r.removeChild(e[t]);r.removeAttribute("src"),typeof r.load=="function"&&function(){try{r.load()}catch{}}()};["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(r){we.prototype[r]=function(){return this.el_[r]||this.el_.hasAttribute(r)}});["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(r){we.prototype["set"+sr(r)]=function(e){this.el_[r]=e,e?this.el_.setAttribute(r,r):this.el_.removeAttribute(r)}});["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","disablePictureInPicture","played","networkState","readyState","videoWidth","videoHeight","crossOrigin"].forEach(function(r){we.prototype[r]=function(){return this.el_[r]}});["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach(function(r){we.prototype["set"+sr(r)]=function(e){this.el_[r]=e}});["pause","load","play"].forEach(function(r){we.prototype[r]=function(){return this.el_[r]()}});it.withSourceHandlers(we);we.nativeSourceHandler={};we.nativeSourceHandler.canPlayType=function(r){try{return we.TEST_VID.canPlayType(r)}catch{return""}};we.nativeSourceHandler.canHandleSource=function(r,e){if(r.type)return we.nativeSourceHandler.canPlayType(r.type);if(r.src){const t=gA(r.src);return we.nativeSourceHandler.canPlayType(`video/${t}`)}return""};we.nativeSourceHandler.handleSource=function(r,e,t){e.setSrc(r.src)};we.nativeSourceHandler.dispose=function(){};we.registerSourceHandler(we.nativeSourceHandler);it.registerTech("Html5",we);const M8=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],qb={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},lw=["tiny","xsmall","small","medium","large","xlarge","huge"],wy={};lw.forEach(r=>{const e=r.charAt(0)==="x"?`x-${r.substring(1)}`:r;wy[r]=`vjs-layout-${e}`});const Ure={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0};let kr=class ch extends se{constructor(e,t,i){if(e.id=e.id||t.id||`vjs_video_${Yn()}`,t=Object.assign(ch.getTagSettings(e),t),t.initChildren=!1,t.createEl=!1,t.evented=!1,t.reportTouchActivity=!1,!t.language){const s=e.closest("[lang]");s&&(t.language=s.getAttribute("lang"))}if(super(null,t,i),this.boundDocumentFullscreenChange_=s=>this.documentFullscreenChange_(s),this.boundFullWindowOnEscKey_=s=>this.fullWindowOnEscKey(s),this.boundUpdateStyleEl_=s=>this.updateStyleEl_(s),this.boundApplyInitTime_=s=>this.applyInitTime_(s),this.boundUpdateCurrentBreakpoint_=s=>this.updateCurrentBreakpoint_(s),this.boundHandleTechClick_=s=>this.handleTechClick_(s),this.boundHandleTechDoubleClick_=s=>this.handleTechDoubleClick_(s),this.boundHandleTechTouchStart_=s=>this.handleTechTouchStart_(s),this.boundHandleTechTouchMove_=s=>this.handleTechTouchMove_(s),this.boundHandleTechTouchEnd_=s=>this.handleTechTouchEnd_(s),this.boundHandleTechTap_=s=>this.handleTechTap_(s),this.boundUpdatePlayerHeightOnAudioOnlyMode_=s=>this.updatePlayerHeightOnAudioOnlyMode_(s),this.isFullscreen_=!1,this.log=mF(this.id_),this.fsApi_=s0,this.isPosterFromTech_=!1,this.queuedCallbacks_=[],this.isReady_=!1,this.hasStarted_=!1,this.userActive_=!1,this.debugEnabled_=!1,this.audioOnlyMode_=!1,this.audioPosterMode_=!1,this.audioOnlyCache_={controlBarHeight:null,playerHeight:null,hiddenChildren:[]},!this.options_||!this.options_.techOrder||!this.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(this.tag=e,this.tagAttributes=e&&Po(e),this.language(this.options_.language),t.languages){const s={};Object.getOwnPropertyNames(t.languages).forEach(function(o){s[o.toLowerCase()]=t.languages[o]}),this.languages_=s}else this.languages_=ch.prototype.options_.languages;this.resetCache_(),this.poster_=t.poster||"",this.controls_=!!t.controls,e.controls=!1,e.removeAttribute("controls"),this.changingSrc_=!1,this.playCallbacks_=[],this.playTerminatedQueue_=[],e.hasAttribute("autoplay")?this.autoplay(!0):this.autoplay(this.options_.autoplay),t.plugins&&Object.keys(t.plugins).forEach(s=>{if(typeof this[s]!="function")throw new Error(`plugin "${s}" does not exist`)}),this.scrubbing_=!1,this.el_=this.createEl(),fA(this,{eventBusKey:"el_"}),this.fsApi_.requestFullscreen&&(Tn(pe,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),this.on(this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_)),this.fluid_&&this.on(["playerreset","resize"],this.boundUpdateStyleEl_);const n=zt(this.options_);if(t.plugins&&Object.keys(t.plugins).forEach(s=>{this[s](t.plugins[s])}),t.debug&&this.debug(!0),this.options_.playerOptions=n,this.middleware_=[],this.playbackRates(t.playbackRates),t.experimentalSvgIcons){const o=new H.DOMParser().parseFromString(lre,"image/svg+xml");if(o.querySelector("parsererror"))vt.warn("Failed to load SVG Icons. Falling back to Font Icons."),this.options_.experimentalSvgIcons=null;else{const u=o.documentElement;u.style.display="none",this.el_.appendChild(u),this.addClass("vjs-svg-icons-enabled")}}this.initChildren(),this.isAudio(e.nodeName.toLowerCase()==="audio"),this.controls()?this.addClass("vjs-controls-enabled"):this.addClass("vjs-controls-disabled"),this.el_.setAttribute("role","region"),this.isAudio()?this.el_.setAttribute("aria-label",this.localize("Audio Player")):this.el_.setAttribute("aria-label",this.localize("Video Player")),this.isAudio()&&this.addClass("vjs-audio"),t.spatialNavigation&&t.spatialNavigation.enabled&&(this.spatialNavigation=new ure(this),this.addClass("vjs-spatial-navigation-enabled")),uv&&this.addClass("vjs-touch-enabled"),Mi||this.addClass("vjs-workinghover"),ch.players[this.id_]=this;const a=Qx.split(".")[0];this.addClass(`vjs-v${a}`),this.userActive(!0),this.reportUserActivity(),this.one("play",s=>this.listenForUserActivity_(s)),this.on("keydown",s=>this.handleKeyDown(s)),this.on("languagechange",s=>this.handleLanguagechange(s)),this.breakpoints(this.options_.breakpoints),this.responsive(this.options_.responsive),this.on("ready",()=>{this.audioPosterMode(this.options_.audioPosterMode),this.audioOnlyMode(this.options_.audioOnlyMode)})}dispose(){this.trigger("dispose"),this.off("dispose"),oi(pe,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),oi(pe,"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),ch.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),nre(this),Ai.names.forEach(e=>{const t=Ai[e],i=this[t.getterName]();i&&i.off&&i.off()}),super.dispose({restoreEl:this.options_.restoreEl})}createEl(){let e=this.tag,t,i=this.playerElIngest_=e.parentNode&&e.parentNode.hasAttribute&&e.parentNode.hasAttribute("data-vjs-player");const n=this.tag.tagName.toLowerCase()==="video-js";i?t=this.el_=e.parentNode:n||(t=this.el_=super.createEl("div"));const a=Po(e);if(n){for(t=this.el_=e,e=this.tag=pe.createElement("video");t.children.length;)e.appendChild(t.firstChild);Ip(t,"video-js")||ku(t,"video-js"),t.appendChild(e),i=this.playerElIngest_=t,Object.keys(t).forEach(l=>{try{e[l]=t[l]}catch{}})}e.setAttribute("tabindex","-1"),a.tabindex="-1",hs&&Z_&&(e.setAttribute("role","application"),a.role="application"),e.removeAttribute("width"),e.removeAttribute("height"),"width"in a&&delete a.width,"height"in a&&delete a.height,Object.getOwnPropertyNames(a).forEach(function(l){n&&l==="class"||t.setAttribute(l,a[l]),n&&e.setAttribute(l,a[l])}),e.playerId=e.id,e.id+="_html5_api",e.className="vjs-tech",e.player=t.player=this,this.addClass("vjs-paused");const s=["IS_SMART_TV","IS_TIZEN","IS_WEBOS","IS_ANDROID","IS_IPAD","IS_IPHONE","IS_CHROMECAST_RECEIVER"].filter(l=>CF[l]).map(l=>"vjs-device-"+l.substring(3).toLowerCase().replace(/\_/g,"-"));if(this.addClass(...s),H.VIDEOJS_NO_DYNAMIC_STYLE!==!0){this.styleEl_=VF("vjs-styles-dimensions");const l=rl(".vjs-styles-defaults"),u=rl("head");u.insertBefore(this.styleEl_,l?l.nextSibling:u.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);const o=e.getElementsByTagName("a");for(let l=0;l<o.length;l++){const u=o.item(l);ku(u,"vjs-hidden"),u.setAttribute("hidden","hidden")}return e.initNetworkState_=e.networkState,e.parentNode&&!i&&e.parentNode.insertBefore(t,e),ew(e,t),this.children_.unshift(e),this.el_.setAttribute("lang",this.language_),this.el_.setAttribute("translate","no"),this.el_=t,t}crossOrigin(e){if(typeof e>"u")return this.techGet_("crossOrigin");if(e!==null&&e!=="anonymous"&&e!=="use-credentials"){vt.warn(`crossOrigin must be null, "anonymous" or "use-credentials", given "${e}"`);return}this.techCall_("setCrossOrigin",e),this.posterImage&&this.posterImage.crossOrigin(e)}width(e){return this.dimension("width",e)}height(e){return this.dimension("height",e)}dimension(e,t){const i=e+"_";if(t===void 0)return this[i]||0;if(t===""||t==="auto"){this[i]=void 0,this.updateStyleEl_();return}const n=parseFloat(t);if(isNaN(n)){vt.error(`Improper value "${t}" supplied for for ${e}`);return}this[i]=n,this.updateStyleEl_()}fluid(e){if(e===void 0)return!!this.fluid_;this.fluid_=!!e,Hs(this)&&this.off(["playerreset","resize"],this.boundUpdateStyleEl_),e?(this.addClass("vjs-fluid"),this.fill(!1),Rte(this,()=>{this.on(["playerreset","resize"],this.boundUpdateStyleEl_)})):this.removeClass("vjs-fluid"),this.updateStyleEl_()}fill(e){if(e===void 0)return!!this.fill_;this.fill_=!!e,e?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")}aspectRatio(e){if(e===void 0)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(e))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()}updateStyleEl_(){if(H.VIDEOJS_NO_DYNAMIC_STYLE===!0){const o=typeof this.width_=="number"?this.width_:this.options_.width,l=typeof this.height_=="number"?this.height_:this.options_.height,u=this.tech_&&this.tech_.el();u&&(o>=0&&(u.width=o),l>=0&&(u.height=l));return}let e,t,i,n;this.aspectRatio_!==void 0&&this.aspectRatio_!=="auto"?i=this.aspectRatio_:this.videoWidth()>0?i=this.videoWidth()+":"+this.videoHeight():i="16:9";const a=i.split(":"),s=a[1]/a[0];this.width_!==void 0?e=this.width_:this.height_!==void 0?e=this.height_/s:e=this.videoWidth()||300,this.height_!==void 0?t=this.height_:t=e*s,/^[^a-zA-Z]/.test(this.id())?n="dimensions-"+this.id():n=this.id()+"-dimensions",this.addClass(n),zF(this.styleEl_,`
|
||
.${n} {
|
||
width: ${e}px;
|
||
height: ${t}px;
|
||
}
|
||
|
||
.${n}.vjs-fluid:not(.vjs-audio-only-mode) {
|
||
padding-top: ${s*100}%;
|
||
}
|
||
`)}loadTech_(e,t){this.tech_&&this.unloadTech_();const i=sr(e),n=e.charAt(0).toLowerCase()+e.slice(1);i!=="Html5"&&this.tag&&(it.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=i,this.isReady_=!1;let a=this.autoplay();(typeof this.autoplay()=="string"||this.autoplay()===!0&&this.options_.normalizeAutoplay)&&(a=!1);const s={source:t,autoplay:a,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:`${this.id()}_${n}_api`,playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};Ai.names.forEach(l=>{const u=Ai[l];s[u.getterName]=this[u.privateName]}),Object.assign(s,this.options_[i]),Object.assign(s,this.options_[n]),Object.assign(s,this.options_[e.toLowerCase()]),this.tag&&(s.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(s.startTime=this.cache_.currentTime);const o=it.getTech(e);if(!o)throw new Error(`No Tech named '${i}' exists! '${i}' should be registered using videojs.registerTech()'`);this.tech_=new o(s),this.tech_.ready($t(this,this.handleTechReady_),!0),yM.jsonToTextTracks(this.textTracksJson_||[],this.tech_),M8.forEach(l=>{this.on(this.tech_,l,u=>this[`handleTech${sr(l)}_`](u))}),Object.keys(qb).forEach(l=>{this.on(this.tech_,l,u=>{if(this.tech_.playbackRate()===0&&this.tech_.seeking()){this.queuedCallbacks_.push({callback:this[`handleTech${qb[l]}_`].bind(this),event:u});return}this[`handleTech${qb[l]}_`](u)})}),this.on(this.tech_,"loadstart",l=>this.handleTechLoadStart_(l)),this.on(this.tech_,"sourceset",l=>this.handleTechSourceset_(l)),this.on(this.tech_,"waiting",l=>this.handleTechWaiting_(l)),this.on(this.tech_,"ended",l=>this.handleTechEnded_(l)),this.on(this.tech_,"seeking",l=>this.handleTechSeeking_(l)),this.on(this.tech_,"play",l=>this.handleTechPlay_(l)),this.on(this.tech_,"pause",l=>this.handleTechPause_(l)),this.on(this.tech_,"durationchange",l=>this.handleTechDurationChange_(l)),this.on(this.tech_,"fullscreenchange",(l,u)=>this.handleTechFullscreenChange_(l,u)),this.on(this.tech_,"fullscreenerror",(l,u)=>this.handleTechFullscreenError_(l,u)),this.on(this.tech_,"enterpictureinpicture",l=>this.handleTechEnterPictureInPicture_(l)),this.on(this.tech_,"leavepictureinpicture",l=>this.handleTechLeavePictureInPicture_(l)),this.on(this.tech_,"error",l=>this.handleTechError_(l)),this.on(this.tech_,"posterchange",l=>this.handleTechPosterChange_(l)),this.on(this.tech_,"textdata",l=>this.handleTechTextData_(l)),this.on(this.tech_,"ratechange",l=>this.handleTechRateChange_(l)),this.on(this.tech_,"loadedmetadata",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode!==this.el()&&(i!=="Html5"||!this.tag)&&ew(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)}unloadTech_(){Ai.names.forEach(e=>{const t=Ai[e];this[t.privateName]=this[t.getterName]()}),this.textTracksJson_=yM.textTracksToJson(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1}tech(e){return e===void 0&&vt.warn(`Using the tech directly can be dangerous. I hope you know what you're doing.
|
||
See https://github.com/videojs/video.js/issues/2617 for more info.
|
||
`),this.tech_}version(){return{"video.js":Qx}}addTechControlsListeners_(){this.removeTechControlsListeners_(),this.on(this.tech_,"click",this.boundHandleTechClick_),this.on(this.tech_,"dblclick",this.boundHandleTechDoubleClick_),this.on(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.on(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.on(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.on(this.tech_,"tap",this.boundHandleTechTap_)}removeTechControlsListeners_(){this.off(this.tech_,"tap",this.boundHandleTechTap_),this.off(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.off(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.off(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.off(this.tech_,"click",this.boundHandleTechClick_),this.off(this.tech_,"dblclick",this.boundHandleTechDoubleClick_)}handleTechReady_(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()}handleTechLoadStart_(){this.removeClass("vjs-ended","vjs-seeking"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):this.trigger("loadstart"),this.manualAutoplay_(this.autoplay()===!0&&this.options_.normalizeAutoplay?"play":this.autoplay())}manualAutoplay_(e){if(!this.tech_||typeof e!="string")return;const t=()=>{const n=this.muted();this.muted(!0);const a=()=>{this.muted(n)};this.playTerminatedQueue_.push(a);const s=this.play();if(Mp(s))return s.catch(o=>{throw a(),new Error(`Rejection at manualAutoplay. Restoring muted value. ${o||""}`)})};let i;if(e==="any"&&!this.muted()?(i=this.play(),Mp(i)&&(i=i.catch(t))):e==="muted"&&!this.muted()?i=t():i=this.play(),!!Mp(i))return i.then(()=>{this.trigger({type:"autoplay-success",autoplay:e})}).catch(()=>{this.trigger({type:"autoplay-failure",autoplay:e})})}updateSourceCaches_(e=""){let t=e,i="";typeof t!="string"&&(t=e.src,i=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!i&&(i=ore(this,t)),this.cache_.source=zt({},e,{src:t,type:i});const n=this.cache_.sources.filter(l=>l.src&&l.src===t),a=[],s=this.$$("source"),o=[];for(let l=0;l<s.length;l++){const u=Po(s[l]);a.push(u),u.src&&u.src===t&&o.push(u.src)}o.length&&!n.length?this.cache_.sources=a:n.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t}handleTechSourceset_(e){if(!this.changingSrc_){let t=a=>this.updateSourceCaches_(a);const i=this.currentSource().src,n=e.src;i&&!/^blob:/.test(i)&&/^blob:/.test(n)&&(!this.lastSource_||this.lastSource_.tech!==n&&this.lastSource_.player!==i)&&(t=()=>{}),t(n),e.src||this.tech_.any(["sourceset","loadstart"],a=>{if(a.type==="sourceset")return;const s=this.techGet_("currentSrc");this.lastSource_.tech=s,this.updateSourceCaches_(s)})}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:"sourceset"})}hasStarted(e){if(e===void 0)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?this.addClass("vjs-has-started"):this.removeClass("vjs-has-started"))}handleTechPlay_(){this.removeClass("vjs-ended","vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")}handleTechRateChange_(){this.tech_.playbackRate()>0&&this.cache_.lastPlaybackRate===0&&(this.queuedCallbacks_.forEach(e=>e.callback(e.event)),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")}handleTechWaiting_(){this.addClass("vjs-waiting"),this.trigger("waiting");const e=this.currentTime(),t=()=>{e!==this.currentTime()&&(this.removeClass("vjs-waiting"),this.off("timeupdate",t))};this.on("timeupdate",t)}handleTechCanPlay_(){this.removeClass("vjs-waiting"),this.trigger("canplay")}handleTechCanPlayThrough_(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")}handleTechPlaying_(){this.removeClass("vjs-waiting"),this.trigger("playing")}handleTechSeeking_(){this.addClass("vjs-seeking"),this.trigger("seeking")}handleTechSeeked_(){this.removeClass("vjs-seeking","vjs-ended"),this.trigger("seeked")}handleTechPause_(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")}handleTechEnded_(){this.addClass("vjs-ended"),this.removeClass("vjs-waiting"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")}handleTechDurationChange_(){this.duration(this.techGet_("duration"))}handleTechClick_(e){this.controls_&&(this.options_===void 0||this.options_.userActions===void 0||this.options_.userActions.click===void 0||this.options_.userActions.click!==!1)&&(this.options_!==void 0&&this.options_.userActions!==void 0&&typeof this.options_.userActions.click=="function"?this.options_.userActions.click.call(this,e):this.paused()?Ya(this.play()):this.pause())}handleTechDoubleClick_(e){if(!this.controls_)return;Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),i=>i.contains(e.target))||(this.options_===void 0||this.options_.userActions===void 0||this.options_.userActions.doubleClick===void 0||this.options_.userActions.doubleClick!==!1)&&(this.options_!==void 0&&this.options_.userActions!==void 0&&typeof this.options_.userActions.doubleClick=="function"?this.options_.userActions.doubleClick.call(this,e):this.isFullscreen()?this.exitFullscreen():this.requestFullscreen())}handleTechTap_(){this.userActive(!this.userActive())}handleTechTouchStart_(){this.userWasActive=this.userActive()}handleTechTouchMove_(){this.userWasActive&&this.reportUserActivity()}handleTechTouchEnd_(e){e.cancelable&&e.preventDefault()}toggleFullscreenClass_(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")}documentFullscreenChange_(e){const t=e.target.player;if(t&&t!==this)return;const i=this.el();let n=pe[this.fsApi_.fullscreenElement]===i;!n&&i.matches&&(n=i.matches(":"+this.fsApi_.fullscreen)),this.isFullscreen(n)}handleTechFullscreenChange_(e,t){t&&(t.nativeIOSFullscreen&&(this.addClass("vjs-ios-native-fs"),this.tech_.one("webkitendfullscreen",()=>{this.removeClass("vjs-ios-native-fs")})),this.isFullscreen(t.isFullscreen))}handleTechFullscreenError_(e,t){this.trigger("fullscreenerror",t)}togglePictureInPictureClass_(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")}handleTechEnterPictureInPicture_(e){this.isInPictureInPicture(!0)}handleTechLeavePictureInPicture_(e){this.isInPictureInPicture(!1)}handleTechError_(){const e=this.tech_.error();e&&this.error(e)}handleTechTextData_(){let e=null;arguments.length>1&&(e=arguments[1]),this.trigger("textdata",e)}getCache(){return this.cache_}resetCache_(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],playbackRates:[],volume:1}}techCall_(e,t){this.ready(function(){if(e in rre)return ere(this.middleware_,this.tech_,e,t);if(e in xM)return TM(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(i){throw vt(i),i}},!0)}techGet_(e){if(!(!this.tech_||!this.tech_.isReady_)){if(e in tre)return Jte(this.middleware_,this.tech_,e);if(e in xM)return TM(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){throw this.tech_[e]===void 0?(vt(`Video.js: ${e} method not defined for ${this.techName_} playback technology.`,t),t):t.name==="TypeError"?(vt(`Video.js: ${e} unavailable on ${this.techName_} playback technology element.`,t),this.tech_.isReady_=!1,t):(vt(t),t)}}}play(){return new Promise(e=>{this.play_(e)})}play_(e=Ya){this.playCallbacks_.push(e);const t=!!(!this.changingSrc_&&(this.src()||this.currentSrc())),i=!!(J_||Mi);if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!t){this.waitToPlay_=s=>{this.play_()},this.one(["ready","loadstart"],this.waitToPlay_),!t&&i&&this.load();return}const n=this.techGet_("play");i&&this.hasClass("vjs-ended")&&this.resetProgressBar_(),n===null?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(n)}runPlayTerminatedQueue_(){const e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach(function(t){t()})}runPlayCallbacks_(e){const t=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],t.forEach(function(i){i(e)})}pause(){this.techCall_("pause")}paused(){return this.techGet_("paused")!==!1}played(){return this.techGet_("played")||ba(0,0)}scrubbing(e){if(typeof e>"u")return this.scrubbing_;this.scrubbing_=!!e,this.techCall_("setScrubbing",this.scrubbing_),e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")}currentTime(e){if(e===void 0)return this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime;if(e<0&&(e=0),!this.isReady_||this.changingSrc_||!this.tech_||!this.tech_.isReady_){this.cache_.initTime=e,this.off("canplay",this.boundApplyInitTime_),this.one("canplay",this.boundApplyInitTime_);return}this.techCall_("setCurrentTime",e),this.cache_.initTime=0,isFinite(e)&&(this.cache_.currentTime=Number(e))}applyInitTime_(){this.currentTime(this.cache_.initTime)}duration(e){if(e===void 0)return this.cache_.duration!==void 0?this.cache_.duration:NaN;e=parseFloat(e),e<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),isNaN(e)||this.trigger("durationchange"))}remainingTime(){return this.duration()-this.currentTime()}remainingTimeDisplay(){return Math.floor(this.duration())-Math.floor(this.currentTime())}buffered(){let e=this.techGet_("buffered");return(!e||!e.length)&&(e=ba(0,0)),e}seekable(){let e=this.techGet_("seekable");return(!e||!e.length)&&(e=ba(0,0)),e}seeking(){return this.techGet_("seeking")}ended(){return this.techGet_("ended")}networkState(){return this.techGet_("networkState")}readyState(){return this.techGet_("readyState")}bufferedPercent(){return KF(this.buffered(),this.duration())}bufferedEnd(){const e=this.buffered(),t=this.duration();let i=e.end(e.length-1);return i>t&&(i=t),i}volume(e){let t;if(e!==void 0){t=Math.max(0,Math.min(1,e)),this.cache_.volume=t,this.techCall_("setVolume",t),t>0&&this.lastVolume_(t);return}return t=parseFloat(this.techGet_("volume")),isNaN(t)?1:t}muted(e){if(e!==void 0){this.techCall_("setMuted",e);return}return this.techGet_("muted")||!1}defaultMuted(e){return e!==void 0&&this.techCall_("setDefaultMuted",e),this.techGet_("defaultMuted")||!1}lastVolume_(e){if(e!==void 0&&e!==0){this.cache_.lastVolume=e;return}return this.cache_.lastVolume}supportsFullScreen(){return this.techGet_("supportsFullScreen")||!1}isFullscreen(e){if(e!==void 0){const t=this.isFullscreen_;this.isFullscreen_=!!e,this.isFullscreen_!==t&&this.fsApi_.prefixed&&this.trigger("fullscreenchange"),this.toggleFullscreenClass_();return}return this.isFullscreen_}requestFullscreen(e){this.isInPictureInPicture()&&this.exitPictureInPicture();const t=this;return new Promise((i,n)=>{function a(){t.off("fullscreenerror",o),t.off("fullscreenchange",s)}function s(){a(),i()}function o(u,c){a(),n(c)}t.one("fullscreenchange",s),t.one("fullscreenerror",o);const l=t.requestFullscreenHelper_(e);l&&(l.then(a,a),l.then(i,n))})}requestFullscreenHelper_(e){let t;if(this.fsApi_.prefixed||(t=this.options_.fullscreen&&this.options_.fullscreen.options||{},e!==void 0&&(t=e)),this.fsApi_.requestFullscreen){const i=this.el_[this.fsApi_.requestFullscreen](t);return i&&i.then(()=>this.isFullscreen(!0),()=>this.isFullscreen(!1)),i}else this.tech_.supportsFullScreen()&&!this.options_.preferFullWindow?this.techCall_("enterFullScreen"):this.enterFullWindow()}exitFullscreen(){const e=this;return new Promise((t,i)=>{function n(){e.off("fullscreenerror",s),e.off("fullscreenchange",a)}function a(){n(),t()}function s(l,u){n(),i(u)}e.one("fullscreenchange",a),e.one("fullscreenerror",s);const o=e.exitFullscreenHelper_();o&&(o.then(n,n),o.then(t,i))})}exitFullscreenHelper_(){if(this.fsApi_.requestFullscreen){const e=pe[this.fsApi_.exitFullscreen]();return e&&Ya(e.then(()=>this.isFullscreen(!1))),e}else this.tech_.supportsFullScreen()&&!this.options_.preferFullWindow?this.techCall_("exitFullScreen"):this.exitFullWindow()}enterFullWindow(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=pe.documentElement.style.overflow,Tn(pe,"keydown",this.boundFullWindowOnEscKey_),pe.documentElement.style.overflow="hidden",ku(pe.body,"vjs-full-window"),this.trigger("enterFullWindow")}fullWindowOnEscKey(e){e.key==="Escape"&&this.isFullscreen()===!0&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())}exitFullWindow(){this.isFullscreen(!1),this.isFullWindow=!1,oi(pe,"keydown",this.boundFullWindowOnEscKey_),pe.documentElement.style.overflow=this.docOrigOverflow,e1(pe.body,"vjs-full-window"),this.trigger("exitFullWindow")}disablePictureInPicture(e){if(e===void 0)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",e),this.options_.disablePictureInPicture=e,this.trigger("disablepictureinpicturechanged")}isInPictureInPicture(e){if(e!==void 0){this.isInPictureInPicture_=!!e,this.togglePictureInPictureClass_();return}return!!this.isInPictureInPicture_}requestPictureInPicture(){if(this.options_.enableDocumentPictureInPicture&&H.documentPictureInPicture){const e=pe.createElement(this.el().tagName);return e.classList=this.el().classList,e.classList.add("vjs-pip-container"),this.posterImage&&e.appendChild(this.posterImage.el().cloneNode(!0)),this.titleBar&&e.appendChild(this.titleBar.el().cloneNode(!0)),e.appendChild(Ze("p",{className:"vjs-pip-text"},{},this.localize("Playing in picture-in-picture"))),H.documentPictureInPicture.requestWindow({width:this.videoWidth(),height:this.videoHeight()}).then(t=>(BF(t),this.el_.parentNode.insertBefore(e,this.el_),t.document.body.appendChild(this.el_),t.document.body.classList.add("vjs-pip-window"),this.player_.isInPictureInPicture(!0),this.player_.trigger({type:"enterpictureinpicture",pipWindow:t}),t.addEventListener("pagehide",i=>{const n=i.target.querySelector(".video-js");e.parentNode.replaceChild(n,e),this.player_.isInPictureInPicture(!1),this.player_.trigger("leavepictureinpicture")}),t))}return"pictureInPictureEnabled"in pe&&this.disablePictureInPicture()===!1?this.techGet_("requestPictureInPicture"):Promise.reject("No PiP mode is available")}exitPictureInPicture(){if(H.documentPictureInPicture&&H.documentPictureInPicture.window)return H.documentPictureInPicture.window.close(),Promise.resolve();if("pictureInPictureEnabled"in pe)return pe.exitPictureInPicture()}handleKeyDown(e){const{userActions:t}=this.options_;!t||!t.hotkeys||(n=>{const a=n.tagName.toLowerCase();if(n.isContentEditable)return!0;const s=["button","checkbox","hidden","radio","reset","submit"];return a==="input"?s.indexOf(n.type)===-1:["textarea"].indexOf(a)!==-1})(this.el_.ownerDocument.activeElement)||(typeof t.hotkeys=="function"?t.hotkeys.call(this,e):this.handleHotkeys(e))}handleHotkeys(e){const t=this.options_.userActions?this.options_.userActions.hotkeys:{},{fullscreenKey:i=s=>e.key.toLowerCase()==="f",muteKey:n=s=>e.key.toLowerCase()==="m",playPauseKey:a=s=>e.key.toLowerCase()==="k"||e.key.toLowerCase()===" "}=t;if(i.call(this,e)){e.preventDefault(),e.stopPropagation();const s=se.getComponent("FullscreenToggle");pe[this.fsApi_.fullscreenEnabled]!==!1&&s.prototype.handleClick.call(this,e)}else n.call(this,e)?(e.preventDefault(),e.stopPropagation(),se.getComponent("MuteToggle").prototype.handleClick.call(this,e)):a.call(this,e)&&(e.preventDefault(),e.stopPropagation(),se.getComponent("PlayToggle").prototype.handleClick.call(this,e))}canPlayType(e){let t;for(let i=0,n=this.options_.techOrder;i<n.length;i++){const a=n[i];let s=it.getTech(a);if(s||(s=se.getComponent(a)),!s){vt.error(`The "${a}" tech is undefined. Skipped browser support check for that tech.`);continue}if(s.isSupported()&&(t=s.canPlayType(e),t))return t}return""}selectSource(e){const t=this.options_.techOrder.map(o=>[o,it.getTech(o)]).filter(([o,l])=>l?l.isSupported():(vt.error(`The "${o}" tech is undefined. Skipped browser support check for that tech.`),!1)),i=function(o,l,u){let c;return o.some(h=>l.some(d=>{if(c=u(h,d),c)return!0})),c};let n;const a=o=>(l,u)=>o(u,l),s=([o,l],u)=>{if(l.canPlaySource(u,this.options_[o.toLowerCase()]))return{source:u,tech:o}};return this.options_.sourceOrder?n=i(e,t,a(s)):n=i(t,e,s),n||!1}handleSrc_(e,t){if(typeof e>"u")return this.cache_.src||"";this.resetRetryOnError_&&this.resetRetryOnError_();const i=t8(e);if(!i.length){this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0);return}if(this.changingSrc_=!0,t||(this.cache_.sources=i),this.updateSourceCaches_(i[0]),Zte(this,i[0],(n,a)=>{if(this.middleware_=a,t||(this.cache_.sources=i),this.updateSourceCaches_(n),this.src_(n)){if(i.length>1)return this.handleSrc_(i.slice(1));this.changingSrc_=!1,this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0),this.triggerReady();return}Qte(a,this.tech_)}),i.length>1){const n=()=>{this.error(null),this.handleSrc_(i.slice(1),!0)},a=()=>{this.off("error",n)};this.one("error",n),this.one("playing",a),this.resetRetryOnError_=()=>{this.off("error",n),this.off("playing",a)}}}src(e){return this.handleSrc_(e,!1)}src_(e){const t=this.selectSource([e]);return t?qF(t.tech,this.techName_)?(this.ready(function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),this.changingSrc_=!1},!0),!1):(this.changingSrc_=!0,this.loadTech_(t.tech,t.source),this.tech_.ready(()=>{this.changingSrc_=!1}),!1):!0}load(){if(this.tech_&&this.tech_.vhs){this.src(this.currentSource());return}this.techCall_("load")}reset(){if(this.paused())this.doReset_();else{const e=this.play();Ya(e.then(()=>this.doReset_()))}}doReset_(){this.tech_&&this.tech_.clearTracks("text"),this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.resetCache_(),this.poster(""),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),this.resetControlBarUI_(),this.error(null),this.titleBar&&this.titleBar.update({title:void 0,description:void 0}),Hs(this)&&this.trigger("playerreset")}resetControlBarUI_(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()}resetProgressBar_(){this.currentTime(0);const{currentTimeDisplay:e,durationDisplay:t,progressControl:i,remainingTimeDisplay:n}=this.controlBar||{},{seekBar:a}=i||{};e&&e.updateContent(),t&&t.updateContent(),n&&n.updateContent(),a&&(a.update(),a.loadProgressBar&&a.loadProgressBar.update())}resetPlaybackRate_(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()}resetVolumeBar_(){this.volume(1),this.trigger("volumechange")}currentSources(){const e=this.currentSource(),t=[];return Object.keys(e).length!==0&&t.push(e),this.cache_.sources||t}currentSource(){return this.cache_.source||{}}currentSrc(){return this.currentSource()&&this.currentSource().src||""}currentType(){return this.currentSource()&&this.currentSource().type||""}preload(e){if(e!==void 0){this.techCall_("setPreload",e),this.options_.preload=e;return}return this.techGet_("preload")}autoplay(e){if(e===void 0)return this.options_.autoplay||!1;let t;typeof e=="string"&&/(any|play|muted)/.test(e)||e===!0&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_(typeof e=="string"?e:"play"),t=!1):e?this.options_.autoplay=!0:this.options_.autoplay=!1,t=typeof t>"u"?this.options_.autoplay:t,this.tech_&&this.techCall_("setAutoplay",t)}playsinline(e){return e!==void 0&&(this.techCall_("setPlaysinline",e),this.options_.playsinline=e),this.techGet_("playsinline")}loop(e){if(e!==void 0){this.techCall_("setLoop",e),this.options_.loop=e;return}return this.techGet_("loop")}poster(e){if(e===void 0)return this.poster_;e||(e=""),e!==this.poster_&&(this.poster_=e,this.techCall_("setPoster",e),this.isPosterFromTech_=!1,this.trigger("posterchange"))}handleTechPosterChange_(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){const e=this.tech_.poster()||"";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger("posterchange"))}}controls(e){if(e===void 0)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_("setControls",e),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))}usingNativeControls(e){if(e===void 0)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))}error(e){if(e===void 0)return this.error_||null;if(tl("beforeerror").forEach(t=>{const i=t(this,e);if(!(us(i)&&!Array.isArray(i)||typeof i=="string"||typeof i=="number"||i===null)){this.log.error("please return a value that MediaError expects in beforeerror hooks");return}e=i}),this.options_.suppressNotSupportedError&&e&&e.code===4){const t=function(){this.error(e)};this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],t),this.one("loadstart",function(){this.off(["click","touchstart"],t)});return}if(e===null){this.error_=null,this.removeClass("vjs-error"),this.errorDisplay&&this.errorDisplay.close();return}this.error_=new rr(e),this.addClass("vjs-error"),vt.error(`(CODE:${this.error_.code} ${rr.errorTypes[this.error_.code]})`,this.error_.message,this.error_),this.trigger("error"),tl("error").forEach(t=>t(this,this.error_))}reportUserActivity(e){this.userActivity_=!0}userActive(e){if(e===void 0)return this.userActive_;if(e=!!e,e!==this.userActive_){if(this.userActive_=e,this.userActive_){this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),this.trigger("useractive");return}this.tech_&&this.tech_.one("mousemove",function(t){t.stopPropagation(),t.preventDefault()}),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}}listenForUserActivity_(){let e,t,i;const n=$t(this,this.reportUserActivity),a=function(h){(h.screenX!==t||h.screenY!==i)&&(t=h.screenX,i=h.screenY,n())},s=function(){n(),this.clearInterval(e),e=this.setInterval(n,250)},o=function(h){n(),this.clearInterval(e)};this.on("mousedown",s),this.on("mousemove",a),this.on("mouseup",o),this.on("mouseleave",o);const l=this.getChild("controlBar");l&&!Mi&&!cs&&(l.on("mouseenter",function(h){this.player().options_.inactivityTimeout!==0&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0}),l.on("mouseleave",function(h){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout})),this.on("keydown",n),this.on("keyup",n);let u;const c=function(){if(!this.userActivity_)return;this.userActivity_=!1,this.userActive(!0),this.clearTimeout(u);const h=this.options_.inactivityTimeout;h<=0||(u=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},h))};this.setInterval(c,250)}playbackRate(e){if(e!==void 0){this.techCall_("setPlaybackRate",e);return}return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1}defaultPlaybackRate(e){return e!==void 0?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1}isAudio(e){if(e!==void 0){this.isAudio_=!!e;return}return!!this.isAudio_}updatePlayerHeightOnAudioOnlyMode_(){const e=this.getChild("ControlBar");!e||this.audioOnlyCache_.controlBarHeight===e.currentHeight()||(this.audioOnlyCache_.controlBarHeight=e.currentHeight(),this.height(this.audioOnlyCache_.controlBarHeight))}enableAudioOnlyUI_(){this.addClass("vjs-audio-only-mode");const e=this.children(),t=this.getChild("ControlBar"),i=t&&t.currentHeight();e.forEach(n=>{n!==t&&n.el_&&!n.hasClass("vjs-hidden")&&(n.hide(),this.audioOnlyCache_.hiddenChildren.push(n))}),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.audioOnlyCache_.controlBarHeight=i,this.on("playerresize",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.height(i),this.trigger("audioonlymodechange")}disableAudioOnlyUI_(){this.removeClass("vjs-audio-only-mode"),this.off("playerresize",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.audioOnlyCache_.hiddenChildren.forEach(e=>e.show()),this.height(this.audioOnlyCache_.playerHeight),this.trigger("audioonlymodechange")}audioOnlyMode(e){if(typeof e!="boolean"||e===this.audioOnlyMode_)return this.audioOnlyMode_;if(this.audioOnlyMode_=e,e){const t=[];return this.isInPictureInPicture()&&t.push(this.exitPictureInPicture()),this.isFullscreen()&&t.push(this.exitFullscreen()),this.audioPosterMode()&&t.push(this.audioPosterMode(!1)),Promise.all(t).then(()=>this.enableAudioOnlyUI_())}return Promise.resolve().then(()=>this.disableAudioOnlyUI_())}enablePosterModeUI_(){(this.tech_&&this.tech_).hide(),this.addClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")}disablePosterModeUI_(){(this.tech_&&this.tech_).show(),this.removeClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")}audioPosterMode(e){return typeof e!="boolean"||e===this.audioPosterMode_?this.audioPosterMode_:(this.audioPosterMode_=e,e?this.audioOnlyMode()?this.audioOnlyMode(!1).then(()=>{this.enablePosterModeUI_()}):Promise.resolve().then(()=>{this.enablePosterModeUI_()}):Promise.resolve().then(()=>{this.disablePosterModeUI_()}))}addTextTrack(e,t,i){if(this.tech_)return this.tech_.addTextTrack(e,t,i)}addRemoteTextTrack(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)}removeRemoteTextTrack(e={}){let{track:t}=e;if(t||(t=e),this.tech_)return this.tech_.removeRemoteTextTrack(t)}getVideoPlaybackQuality(){return this.techGet_("getVideoPlaybackQuality")}videoWidth(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0}videoHeight(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0}language(e){if(e===void 0)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),Hs(this)&&this.trigger("languagechange"))}languages(){return zt(ch.prototype.options_.languages,this.languages_)}toJSON(){const e=zt(this.options_),t=e.tracks;e.tracks=[];for(let i=0;i<t.length;i++){let n=t[i];n=zt(n),n.player=void 0,e.tracks[i]=n}return e}createModal(e,t){t=t||{},t.content=e||"";const i=new kf(this,t);return this.addChild(i),i.on("dispose",()=>{this.removeChild(i)}),i.open(),i}updateCurrentBreakpoint_(){if(!this.responsive())return;const e=this.currentBreakpoint(),t=this.currentWidth();for(let i=0;i<lw.length;i++){const n=lw[i],a=this.breakpoints_[n];if(t<=a){if(e===n)return;e&&this.removeClass(wy[e]),this.addClass(wy[n]),this.breakpoint_=n;break}}}removeCurrentBreakpoint_(){const e=this.currentBreakpointClass();this.breakpoint_="",e&&this.removeClass(e)}breakpoints(e){return e===void 0?Object.assign(this.breakpoints_):(this.breakpoint_="",this.breakpoints_=Object.assign({},Ure,e),this.updateCurrentBreakpoint_(),Object.assign(this.breakpoints_))}responsive(e){if(e===void 0)return this.responsive_;e=!!e;const t=this.responsive_;if(e!==t)return this.responsive_=e,e?(this.on("playerresize",this.boundUpdateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize",this.boundUpdateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e}currentBreakpoint(){return this.breakpoint_}currentBreakpointClass(){return wy[this.breakpoint_]||""}loadMedia(e,t){if(!e||typeof e!="object")return;const i=this.crossOrigin();this.reset(),this.cache_.media=zt(e);const{artist:n,artwork:a,description:s,poster:o,src:l,textTracks:u,title:c}=this.cache_.media;!a&&o&&(this.cache_.media.artwork=[{src:o,type:g0(o)}]),i&&this.crossOrigin(i),l&&this.src(l),o&&this.poster(o),Array.isArray(u)&&u.forEach(h=>this.addRemoteTextTrack(h,!1)),this.titleBar&&this.titleBar.update({title:c,description:s||n||""}),this.ready(t)}getMedia(){if(!this.cache_.media){const e=this.poster(),t=this.currentSources(),i=Array.prototype.map.call(this.remoteTextTracks(),a=>({kind:a.kind,label:a.label,language:a.language,src:a.src})),n={src:t,textTracks:i};return e&&(n.poster=e,n.artwork=[{src:n.poster,type:g0(n.poster)}]),n}return zt(this.cache_.media)}static getTagSettings(e){const t={sources:[],tracks:[]},i=Po(e),n=i["data-setup"];if(Ip(e,"vjs-fill")&&(i.fill=!0),Ip(e,"vjs-fluid")&&(i.fluid=!0),n!==null)try{Object.assign(i,JSON.parse(n||"{}"))}catch(a){vt.error("data-setup",a)}if(Object.assign(t,i),e.hasChildNodes()){const a=e.childNodes;for(let s=0,o=a.length;s<o;s++){const l=a[s],u=l.nodeName.toLowerCase();u==="source"?t.sources.push(Po(l)):u==="track"&&t.tracks.push(Po(l))}}return t}debug(e){if(e===void 0)return this.debugEnabled_;e?(this.trigger("debugon"),this.previousLogLevel_=this.log.level,this.log.level("debug"),this.debugEnabled_=!0):(this.trigger("debugoff"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)}playbackRates(e){if(e===void 0)return this.cache_.playbackRates;Array.isArray(e)&&e.every(t=>typeof t=="number")&&(this.cache_.playbackRates=e,this.trigger("playbackrateschange"))}};Ai.names.forEach(function(r){const e=Ai[r];kr.prototype[e.getterName]=function(){return this.tech_?this.tech_[e.getterName]():(this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName])}});kr.prototype.crossorigin=kr.prototype.crossOrigin;kr.players={};const xd=H.navigator;kr.prototype.options_={techOrder:it.defaultTechOrder_,html5:{},enableSourceset:!0,inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","titleBar","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:xd&&(xd.languages&&xd.languages[0]||xd.userLanguage||xd.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:!1,audioOnlyMode:!1,audioPosterMode:!1,spatialNavigation:{enabled:!1,horizontalSeek:!1},enableSmoothSeeking:!1};M8.forEach(function(r){kr.prototype[`handleTech${sr(r)}_`]=function(){return this.trigger(r)}});se.registerComponent("Player",kr);const m0="plugin",Mh="activePlugins_",yh={},y0=r=>yh.hasOwnProperty(r),Cy=r=>y0(r)?yh[r]:void 0,L8=(r,e)=>{r[Mh]=r[Mh]||{},r[Mh][e]=!0},_0=(r,e,t)=>{const i=(t?"before":"")+"pluginsetup";r.trigger(i,e),r.trigger(i+":"+e.name,e)},Vre=function(r,e){const t=function(){_0(this,{name:r,plugin:e,instance:null},!0);const i=e.apply(this,arguments);return L8(this,r),_0(this,{name:r,plugin:e,instance:i}),i};return Object.keys(e).forEach(function(i){t[i]=e[i]}),t},VM=(r,e)=>(e.prototype.name=r,function(...t){_0(this,{name:r,plugin:e,instance:null},!0);const i=new e(this,...t);return this[r]=()=>i,_0(this,i.getEventHash()),i});class Xi{constructor(e){if(this.constructor===Xi)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=e,this.log||(this.log=this.player.log.createLogger(this.name)),fA(this),delete this.trigger,WF(this,this.constructor.defaultState),L8(e,this.name),this.dispose=this.dispose.bind(this),e.on("dispose",this.dispose)}version(){return this.constructor.VERSION}getEventHash(e={}){return e.name=this.name,e.plugin=this.constructor,e.instance=this,e}trigger(e,t={}){return Lf(this.eventBusEl_,e,this.getEventHash(t))}handleStateChanged(e){}dispose(){const{name:e,player:t}=this;this.trigger("dispose"),this.off(),t.off("dispose",this.dispose),t[Mh][e]=!1,this.player=this.state=null,t[e]=VM(e,yh[e])}static isBasic(e){const t=typeof e=="string"?Cy(e):e;return typeof t=="function"&&!Xi.prototype.isPrototypeOf(t.prototype)}static registerPlugin(e,t){if(typeof e!="string")throw new Error(`Illegal plugin name, "${e}", must be a string, was ${typeof e}.`);if(y0(e))vt.warn(`A plugin named "${e}" already exists. You may want to avoid re-registering plugins!`);else if(kr.prototype.hasOwnProperty(e))throw new Error(`Illegal plugin name, "${e}", cannot share a name with an existing player method!`);if(typeof t!="function")throw new Error(`Illegal plugin for "${e}", must be a function, was ${typeof t}.`);return yh[e]=t,e!==m0&&(Xi.isBasic(t)?kr.prototype[e]=Vre(e,t):kr.prototype[e]=VM(e,t)),t}static deregisterPlugin(e){if(e===m0)throw new Error("Cannot de-register base plugin.");y0(e)&&(delete yh[e],delete kr.prototype[e])}static getPlugins(e=Object.keys(yh)){let t;return e.forEach(i=>{const n=Cy(i);n&&(t=t||{},t[i]=n)}),t}static getPluginVersion(e){const t=Cy(e);return t&&t.VERSION||""}}Xi.getPlugin=Cy;Xi.BASE_PLUGIN_NAME=m0;Xi.registerPlugin(m0,Xi);kr.prototype.usingPlugin=function(r){return!!this[Mh]&&this[Mh][r]===!0};kr.prototype.hasPlugin=function(r){return!!y0(r)};function zre(r,e){let t=!1;return function(...i){return t||vt.warn(r),t=!0,e.apply(this,i)}}function Ma(r,e,t,i){return zre(`${e} is deprecated and will be removed in ${r}.0; please use ${t} instead.`,i)}var Gre={NetworkBadStatus:"networkbadstatus",NetworkRequestFailed:"networkrequestfailed",NetworkRequestAborted:"networkrequestaborted",NetworkRequestTimeout:"networkrequesttimeout",NetworkBodyParserFailed:"networkbodyparserfailed",StreamingHlsPlaylistParserError:"streaminghlsplaylistparsererror",StreamingDashManifestParserError:"streamingdashmanifestparsererror",StreamingContentSteeringParserError:"streamingcontentsteeringparsererror",StreamingVttParserError:"streamingvttparsererror",StreamingFailedToSelectNextSegment:"streamingfailedtoselectnextsegment",StreamingFailedToDecryptSegment:"streamingfailedtodecryptsegment",StreamingFailedToTransmuxSegment:"streamingfailedtotransmuxsegment",StreamingFailedToAppendSegment:"streamingfailedtoappendsegment",StreamingCodecsChangeError:"streamingcodecschangeerror"};const k8=r=>r.indexOf("#")===0?r.slice(1):r;function K(r,e,t){let i=K.getPlayer(r);if(i)return e&&vt.warn(`Player "${r}" is already initialised. Options will not be applied.`),t&&i.ready(t),i;const n=typeof r=="string"?rl("#"+k8(r)):r;if(!Mf(n))throw new TypeError("The element or ID supplied is not valid. (videojs)");const s=("getRootNode"in n?n.getRootNode()instanceof H.ShadowRoot:!1)?n.getRootNode():n.ownerDocument.body;(!n.ownerDocument.defaultView||!s.contains(n))&&vt.warn("The element supplied is not included in the DOM"),e=e||{},e.restoreEl===!0&&(e.restoreEl=(n.parentNode&&n.parentNode.hasAttribute&&n.parentNode.hasAttribute("data-vjs-player")?n.parentNode:n).cloneNode(!0)),tl("beforesetup").forEach(l=>{const u=l(n,zt(e));if(!us(u)||Array.isArray(u)){vt.error("please return an object in beforesetup hooks");return}e=zt(e,u)});const o=se.getComponent("Player");return i=new o(n,e,t),tl("setup").forEach(l=>l(i)),i}K.hooks_=ks;K.hooks=tl;K.hook=bte;K.hookOnce=Ste;K.removeHook=gF;if(H.VIDEOJS_NO_DYNAMIC_STYLE!==!0&&Pf()){let r=rl(".vjs-styles-defaults");if(!r){r=VF("vjs-styles-defaults");const e=rl("head");e&&e.insertBefore(r,e.firstChild),zF(r,`
|
||
.video-js {
|
||
width: 300px;
|
||
height: 150px;
|
||
}
|
||
|
||
.vjs-fluid:not(.vjs-audio-only-mode) {
|
||
padding-top: 56.25%
|
||
}
|
||
`)}}rw(1,K);K.VERSION=Qx;K.options=kr.prototype.options_;K.getPlayers=()=>kr.players;K.getPlayer=r=>{const e=kr.players;let t;if(typeof r=="string"){const i=k8(r),n=e[i];if(n)return n;t=rl("#"+i)}else t=r;if(Mf(t)){const{player:i,playerId:n}=t;if(i||e[n])return i||e[n]}};K.getAllPlayers=()=>Object.keys(kr.players).map(r=>kr.players[r]).filter(Boolean);K.players=kr.players;K.getComponent=se.getComponent;K.registerComponent=(r,e)=>(it.isTech(e)&&vt.warn(`The ${r} tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)`),se.registerComponent.call(se,r,e));K.getTech=it.getTech;K.registerTech=it.registerTech;K.use=Kte;Object.defineProperty(K,"middleware",{value:{},writeable:!1,enumerable:!0});Object.defineProperty(K.middleware,"TERMINATOR",{value:v0,writeable:!1,enumerable:!0});K.browser=CF;K.obj=wte;K.mergeOptions=Ma(9,"videojs.mergeOptions","videojs.obj.merge",zt);K.defineLazyProperty=Ma(9,"videojs.defineLazyProperty","videojs.obj.defineLazyProperty",Y_);K.bind=Ma(9,"videojs.bind","native Function.prototype.bind",$t);K.registerPlugin=Xi.registerPlugin;K.deregisterPlugin=Xi.deregisterPlugin;K.plugin=(r,e)=>(vt.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),Xi.registerPlugin(r,e));K.getPlugins=Xi.getPlugins;K.getPlugin=Xi.getPlugin;K.getPluginVersion=Xi.getPluginVersion;K.addLanguage=function(r,e){return r=(""+r).toLowerCase(),K.options.languages=zt(K.options.languages,{[r]:e}),K.options.languages[r]};K.log=vt;K.createLogger=mF;K.time=Ute;K.createTimeRange=Ma(9,"videojs.createTimeRange","videojs.time.createTimeRanges",ba);K.createTimeRanges=Ma(9,"videojs.createTimeRanges","videojs.time.createTimeRanges",ba);K.formatTime=Ma(9,"videojs.formatTime","videojs.time.formatTime",Ju);K.setFormatTime=Ma(9,"videojs.setFormatTime","videojs.time.setFormatTime",XF);K.resetFormatTime=Ma(9,"videojs.resetFormatTime","videojs.time.resetFormatTime",YF);K.parseUrl=Ma(9,"videojs.parseUrl","videojs.url.parseUrl",vA);K.isCrossOrigin=Ma(9,"videojs.isCrossOrigin","videojs.url.isCrossOrigin",o1);K.EventTarget=xn;K.any=hA;K.on=Tn;K.one=a1;K.off=oi;K.trigger=Lf;K.xhr=b4;K.TextTrack=og;K.AudioTrack=JF;K.VideoTrack=e8;["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(r=>{K[r]=function(){return vt.warn(`videojs.${r}() is deprecated; use videojs.dom.${r}() instead`),FF[r].apply(null,arguments)}});K.computedStyle=Ma(9,"videojs.computedStyle","videojs.dom.computedStyle",sf);K.dom=FF;K.fn=kte;K.num=mre;K.str=Bte;K.url=Xte;K.Error=Gre;/*! @name videojs-contrib-quality-levels @version 4.1.0 @license Apache-2.0 */class Hre{constructor(e){let t=this;return t.id=e.id,t.label=t.id,t.width=e.width,t.height=e.height,t.bitrate=e.bandwidth,t.frameRate=e.frameRate,t.enabled_=e.enabled,Object.defineProperty(t,"enabled",{get(){return t.enabled_()},set(i){t.enabled_(i)}}),t}}class b0 extends K.EventTarget{constructor(){super();let e=this;return e.levels_=[],e.selectedIndex_=-1,Object.defineProperty(e,"selectedIndex",{get(){return e.selectedIndex_}}),Object.defineProperty(e,"length",{get(){return e.levels_.length}}),e[Symbol.iterator]=()=>e.levels_.values(),e}addQualityLevel(e){let t=this.getQualityLevelById(e.id);if(t)return t;const i=this.levels_.length;return t=new Hre(e),""+i in this||Object.defineProperty(this,i,{get(){return this.levels_[i]}}),this.levels_.push(t),this.trigger({qualityLevel:t,type:"addqualitylevel"}),t}removeQualityLevel(e){let t=null;for(let i=0,n=this.length;i<n;i++)if(this[i]===e){t=this.levels_.splice(i,1)[0],this.selectedIndex_===i?this.selectedIndex_=-1:this.selectedIndex_>i&&this.selectedIndex_--;break}return t&&this.trigger({qualityLevel:e,type:"removequalitylevel"}),t}getQualityLevelById(e){for(let t=0,i=this.length;t<i;t++){const n=this[t];if(n.id===e)return n}return null}dispose(){this.selectedIndex_=-1,this.levels_.length=0}}b0.prototype.allowedEvents_={change:"change",addqualitylevel:"addqualitylevel",removequalitylevel:"removequalitylevel"};for(const r in b0.prototype.allowedEvents_)b0.prototype["on"+r]=null;var R8="4.1.0";const $re=function(r,e){const t=r.qualityLevels,i=new b0,n=function(){i.dispose(),r.qualityLevels=t,r.off("dispose",n)};return r.on("dispose",n),r.qualityLevels=()=>i,r.qualityLevels.VERSION=R8,i},O8=function(r){return $re(this,K.obj.merge({},r))};K.registerPlugin("qualityLevels",O8);O8.VERSION=R8;/*! @name @videojs/http-streaming @version 3.14.2 @license Apache-2.0 */const zi=G_,S0=(r,e)=>e&&e.responseURL&&r!==e.responseURL?e.responseURL:r,ea=r=>K.log.debug?K.log.debug.bind(K,"VHS:",`${r} >`):function(){};function Pt(...r){const e=K.obj||K;return(e.merge||e.mergeOptions).apply(e,r)}function Zr(...r){const e=K.time||K;return(e.createTimeRanges||e.createTimeRanges).apply(e,r)}function Wre(r){if(r.length===0)return"Buffered Ranges are empty";let e=`Buffered Ranges:
|
||
`;for(let t=0;t<r.length;t++){const i=r.start(t),n=r.end(t);e+=`${i} --> ${n}. Duration (${n-i})
|
||
`}return e}const Ka=1/30,Za=Ka*3,N8=function(r,e){const t=[];let i;if(r&&r.length)for(i=0;i<r.length;i++)e(r.start(i),r.end(i))&&t.push([r.start(i),r.end(i)]);return Zr(t)},_h=function(r,e){return N8(r,function(t,i){return t-Za<=e&&i+Za>=e})},um=function(r,e){return N8(r,function(t){return t-Ka>=e})},qre=function(r){if(r.length<2)return Zr();const e=[];for(let t=1;t<r.length;t++){const i=r.end(t-1),n=r.start(t);e.push([i,n])}return Zr(e)},jre=function(r,e){let t=null,i=null,n=0;const a=[],s=[];if(!r||!r.length||!e||!e.length)return Zr();let o=r.length;for(;o--;)a.push({time:r.start(o),type:"start"}),a.push({time:r.end(o),type:"end"});for(o=e.length;o--;)a.push({time:e.start(o),type:"start"}),a.push({time:e.end(o),type:"end"});for(a.sort(function(l,u){return l.time-u.time}),o=0;o<a.length;o++)a[o].type==="start"?(n++,n===2&&(t=a[o].time)):a[o].type==="end"&&(n--,n===1&&(i=a[o].time)),t!==null&&i!==null&&(s.push([t,i]),t=null,i=null);return Zr(s)},B8=r=>{const e=[];if(!r||!r.length)return"";for(let t=0;t<r.length;t++)e.push(r.start(t)+" => "+r.end(t));return e.join(", ")},Xre=function(r,e,t=1){return((r.length?r.end(r.length-1):0)-e)/t},Su=r=>{const e=[];for(let t=0;t<r.length;t++)e.push({start:r.start(t),end:r.end(t)});return e},Yre=function(r,e){if(r===e)return!1;if(!r&&e||!e&&r||r.length!==e.length)return!0;for(let t=0;t<r.length;t++)if(r.start(t)!==e.start(t)||r.end(t)!==e.end(t))return!0;return!1},jb=function(r){if(!(!r||!r.length||!r.end))return r.end(r.length-1)},kA=function(r,e){let t=0;if(!r||!r.length)return t;for(let i=0;i<r.length;i++){const n=r.start(i),a=r.end(i);if(!(e>a)){if(e>n&&e<=a){t+=a-e;continue}t+=a-n}}return t},RA=(r,e)=>{if(!e.preload)return e.duration;let t=0;return(e.parts||[]).forEach(function(i){t+=i.duration}),(e.preloadHints||[]).forEach(function(i){i.type==="PART"&&(t+=r.partTargetDuration)}),t},uw=r=>(r.segments||[]).reduce((e,t,i)=>(t.parts?t.parts.forEach(function(n,a){e.push({duration:n.duration,segmentIndex:i,partIndex:a,part:n,segment:t})}):e.push({duration:t.duration,segmentIndex:i,partIndex:null,segment:t,part:null}),e),[]),F8=r=>{const e=r.segments&&r.segments.length&&r.segments[r.segments.length-1];return e&&e.parts||[]},U8=({preloadSegment:r})=>{if(!r)return;const{parts:e,preloadHints:t}=r;let i=(t||[]).reduce((n,a)=>n+(a.type==="PART"?1:0),0);return i+=e&&e.length?e.length:0,i},V8=(r,e)=>{if(e.endList)return 0;if(r&&r.suggestedPresentationDelay)return r.suggestedPresentationDelay;const t=F8(e).length>0;return t&&e.serverControl&&e.serverControl.partHoldBack?e.serverControl.partHoldBack:t&&e.partTargetDuration?e.partTargetDuration*3:e.serverControl&&e.serverControl.holdBack?e.serverControl.holdBack:e.targetDuration?e.targetDuration*3:0},Kre=function(r,e){let t=0,i=e-r.mediaSequence,n=r.segments[i];if(n){if(typeof n.start<"u")return{result:n.start,precise:!0};if(typeof n.end<"u")return{result:n.end-n.duration,precise:!0}}for(;i--;){if(n=r.segments[i],typeof n.end<"u")return{result:t+n.end,precise:!0};if(t+=RA(r,n),typeof n.start<"u")return{result:t+n.start,precise:!0}}return{result:t,precise:!1}},Zre=function(r,e){let t=0,i,n=e-r.mediaSequence;for(;n<r.segments.length;n++){if(i=r.segments[n],typeof i.start<"u")return{result:i.start-t,precise:!0};if(t+=RA(r,i),typeof i.end<"u")return{result:i.end-t,precise:!0}}return{result:-1,precise:!1}},z8=function(r,e,t){if(typeof e>"u"&&(e=r.mediaSequence+r.segments.length),e<r.mediaSequence)return 0;const i=Kre(r,e);if(i.precise)return i.result;const n=Zre(r,e);return n.precise?n.result:i.result+t},G8=function(r,e,t){if(!r)return 0;if(typeof t!="number"&&(t=0),typeof e>"u"){if(r.totalDuration)return r.totalDuration;if(!r.endList)return H.Infinity}return z8(r,e,t)},Lp=function({defaultDuration:r,durationList:e,startIndex:t,endIndex:i}){let n=0;if(t>i&&([t,i]=[i,t]),t<0){for(let a=t;a<Math.min(0,i);a++)n+=r;t=0}for(let a=t;a<i;a++)n+=e[a].duration;return n},H8=function(r,e,t,i){if(!r||!r.segments)return null;if(r.endList)return G8(r);if(e===null)return null;e=e||0;let n=z8(r,r.mediaSequence+r.segments.length,e);return t&&(i=typeof i=="number"?i:V8(null,r),n-=i),Math.max(0,n)},Qre=function(r,e,t){const n=e||0;let a=H8(r,e,!0,t);return a===null?Zr():(a<n&&(a=n),Zr(n,a))},Jre=function({playlist:r,currentTime:e,startingSegmentIndex:t,startingPartIndex:i,startTime:n,exactManifestTimings:a}){let s=e-n;const o=uw(r);let l=0;for(let u=0;u<o.length;u++){const c=o[u];if(t===c.segmentIndex&&!(typeof i=="number"&&typeof c.partIndex=="number"&&i!==c.partIndex)){l=u;break}}if(s<0){if(l>0)for(let u=l-1;u>=0;u--){const c=o[u];if(s+=c.duration,a){if(s<0)continue}else if(s+Ka<=0)continue;return{partIndex:c.partIndex,segmentIndex:c.segmentIndex,startTime:n-Lp({defaultDuration:r.targetDuration,durationList:o,startIndex:l,endIndex:u})}}return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:e}}if(l<0){for(let u=l;u<0;u++)if(s-=r.targetDuration,s<0)return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:e};l=0}for(let u=l;u<o.length;u++){const c=o[u];s-=c.duration;const h=c.duration>Ka,d=s===0,f=h&&s+Ka>=0;if(!((d||f)&&u!==o.length-1)){if(a){if(s>0)continue}else if(s-Ka>=0)continue;return{partIndex:c.partIndex,segmentIndex:c.segmentIndex,startTime:n+Lp({defaultDuration:r.targetDuration,durationList:o,startIndex:l,endIndex:u})}}}return{segmentIndex:o[o.length-1].segmentIndex,partIndex:o[o.length-1].partIndex,startTime:e}},$8=function(r){return r.excludeUntil&&r.excludeUntil>Date.now()},OA=function(r){return r.excludeUntil&&r.excludeUntil===1/0},c1=function(r){const e=$8(r);return!r.disabled&&!e},eie=function(r){return r.disabled},tie=function(r){for(let e=0;e<r.segments.length;e++)if(r.segments[e].key)return!0;return!1},W8=function(r,e){return e.attributes&&e.attributes[r]},rie=function(r,e,t,i=0){return W8("BANDWIDTH",t)?(r*t.attributes.BANDWIDTH-i*8)/e:NaN},cw=(r,e)=>{if(r.playlists.length===1)return!0;const t=e.attributes.BANDWIDTH||Number.MAX_VALUE;return r.playlists.filter(i=>c1(i)?(i.attributes.BANDWIDTH||0)<t:!1).length===0},NA=(r,e)=>!r&&!e||!r&&e||r&&!e?!1:!!(r===e||r.id&&e.id&&r.id===e.id||r.resolvedUri&&e.resolvedUri&&r.resolvedUri===e.resolvedUri||r.uri&&e.uri&&r.uri===e.uri),zM=function(r,e){const t=r&&r.mediaGroups&&r.mediaGroups.AUDIO||{};let i=!1;for(const n in t){for(const a in t[n])if(i=e(t[n][a]),i)break;if(i)break}return!!i},hg=r=>{if(!r||!r.playlists||!r.playlists.length)return zM(r,t=>t.playlists&&t.playlists.length||t.uri);for(let e=0;e<r.playlists.length;e++){const t=r.playlists[e],i=t.attributes&&t.attributes.CODECS;if(!(i&&i.split(",").every(a=>A4(a))||zM(r,a=>NA(t,a))))return!1}return!0};var $i={liveEdgeDelay:V8,duration:G8,seekable:Qre,getMediaInfoForTime:Jre,isEnabled:c1,isDisabled:eie,isExcluded:$8,isIncompatible:OA,playlistEnd:H8,isAes:tie,hasAttribute:W8,estimateSegmentRequestTime:rie,isLowestEnabledRendition:cw,isAudioOnly:hg,playlistMatch:NA,segmentDurationWithParts:RA};const{log:q8}=K,Lh=(r,e)=>`${r}-${e}`,j8=(r,e,t)=>`placeholder-uri-${r}-${e}-${t}`,iie=({onwarn:r,oninfo:e,manifestString:t,customTagParsers:i=[],customTagMappers:n=[],llhls:a})=>{const s=new _J;r&&s.on("warn",r),e&&s.on("info",e),i.forEach(u=>s.addParser(u)),n.forEach(u=>s.addTagMapper(u)),s.push(t),s.end();const o=s.manifest;if(a||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach(function(u){o.hasOwnProperty(u)&&delete o[u]}),o.segments&&o.segments.forEach(function(u){["parts","preloadHints"].forEach(function(c){u.hasOwnProperty(c)&&delete u[c]})})),!o.targetDuration){let u=10;o.segments&&o.segments.length&&(u=o.segments.reduce((c,h)=>Math.max(c,h.duration),0)),r&&r({message:`manifest has no targetDuration defaulting to ${u}`}),o.targetDuration=u}const l=F8(o);if(l.length&&!o.partTargetDuration){const u=l.reduce((c,h)=>Math.max(c,h.duration),0);r&&(r({message:`manifest has no partTargetDuration defaulting to ${u}`}),q8.error("LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.")),o.partTargetDuration=u}return o},Nf=(r,e)=>{r.mediaGroups&&["AUDIO","SUBTITLES"].forEach(t=>{if(r.mediaGroups[t])for(const i in r.mediaGroups[t])for(const n in r.mediaGroups[t][i]){const a=r.mediaGroups[t][i][n];e(a,t,i,n)}})},X8=({playlist:r,uri:e,id:t})=>{r.id=t,r.playlistErrors_=0,e&&(r.uri=e),r.attributes=r.attributes||{}},nie=r=>{let e=r.playlists.length;for(;e--;){const t=r.playlists[e];X8({playlist:t,id:Lh(e,t.uri)}),t.resolvedUri=zi(r.uri,t.uri),r.playlists[t.id]=t,r.playlists[t.uri]=t,t.attributes.BANDWIDTH||q8.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}},aie=r=>{Nf(r,e=>{e.uri&&(e.resolvedUri=zi(r.uri,e.uri))})},sie=(r,e)=>{const t=Lh(0,e),i={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:H.location.href,resolvedUri:H.location.href,playlists:[{uri:e,id:t,resolvedUri:e,attributes:{}}]};return i.playlists[t]=i.playlists[0],i.playlists[e]=i.playlists[0],i},Y8=(r,e,t=j8)=>{r.uri=e;for(let n=0;n<r.playlists.length;n++)if(!r.playlists[n].uri){const a=`placeholder-uri-${n}`;r.playlists[n].uri=a}const i=hg(r);Nf(r,(n,a,s,o)=>{if(!n.playlists||!n.playlists.length){if(i&&a==="AUDIO"&&!n.uri)for(let l=0;l<r.playlists.length;l++){const u=r.playlists[l];if(u.attributes&&u.attributes.AUDIO&&u.attributes.AUDIO===s)return}n.playlists=[or({},n)]}n.playlists.forEach(function(l,u){const c=t(a,s,o,l),h=Lh(u,c);l.uri?l.resolvedUri=l.resolvedUri||zi(r.uri,l.uri):(l.uri=u===0?c:h,l.resolvedUri=l.uri),l.id=l.id||h,l.attributes=l.attributes||{},r.playlists[l.id]=l,r.playlists[l.uri]=l})}),nie(r),aie(r)};class GM{constructor(){this.offset_=null,this.pendingDateRanges_=new Map,this.processedDateRanges_=new Map}setOffset(e=[]){if(this.offset_!==null||!e.length)return;const[t]=e;t.programDateTime!==void 0&&(this.offset_=t.programDateTime/1e3)}setPendingDateRanges(e=[]){if(!e.length)return;const[t]=e,i=t.startDate.getTime();this.trimProcessedDateRanges_(i),this.pendingDateRanges_=e.reduce((n,a)=>(n.set(a.id,a),n),new Map)}processDateRange(e){this.pendingDateRanges_.delete(e.id),this.processedDateRanges_.set(e.id,e)}getDateRangesToProcess(){if(this.offset_===null)return[];const e={},t=[];this.pendingDateRanges_.forEach((i,n)=>{if(!this.processedDateRanges_.has(n)&&(i.startTime=i.startDate.getTime()/1e3-this.offset_,i.processDateRange=()=>this.processDateRange(i),t.push(i),!!i.class))if(e[i.class]){const a=e[i.class].push(i);i.classListIndex=a-1}else e[i.class]=[i],i.classListIndex=0});for(const i of t){const n=e[i.class]||[];i.endDate?i.endTime=i.endDate.getTime()/1e3-this.offset_:i.endOnNext&&n[i.classListIndex+1]?i.endTime=n[i.classListIndex+1].startTime:i.duration?i.endTime=i.startTime+i.duration:i.plannedDuration?i.endTime=i.startTime+i.plannedDuration:i.endTime=i.startTime}return t}trimProcessedDateRanges_(e){new Map(this.processedDateRanges_).forEach((i,n)=>{i.startDate.getTime()<e&&this.processedDateRanges_.delete(n)})}}const K8=22,Nu=({requestType:r,request:e,error:t,parseFailure:i})=>{const n=e.status<200||e.status>299,a=e.status>=400&&e.status<=499,s={uri:e.uri,requestType:r},o=n&&!a||i;if(t&&a)s.error=or({},t),s.errorType=K.Error.NetworkRequestFailed;else if(e.aborted)s.errorType=K.Error.NetworkRequestAborted;else if(e.timedout)s.erroType=K.Error.NetworkRequestTimeout;else if(o){const l=i?K.Error.NetworkBodyParserFailed:K.Error.NetworkBadStatus;s.errorType=l,s.status=e.status,s.headers=e.headers}return s},{EventTarget:oie}=K,lie=(r,e)=>{if(e.endList||!e.serverControl)return r;const t={};if(e.serverControl.canBlockReload){const{preloadSegment:i}=e;let n=e.mediaSequence+e.segments.length;if(i){const a=i.parts||[],s=U8(e)-1;s>-1&&s!==a.length-1&&(t._HLS_part=s),(s>-1||a.length)&&n--}t._HLS_msn=n}if(e.serverControl&&e.serverControl.canSkipUntil&&(t._HLS_skip=e.serverControl.canSkipDateranges?"v2":"YES"),Object.keys(t).length){const i=new H.URL(r);["_HLS_skip","_HLS_msn","_HLS_part"].forEach(function(n){t.hasOwnProperty(n)&&i.searchParams.set(n,t[n])}),r=i.toString()}return r},uie=(r,e)=>{if(!r)return e;const t=Pt(r,e);if(r.preloadHints&&!e.preloadHints&&delete t.preloadHints,r.parts&&!e.parts)delete t.parts;else if(r.parts&&e.parts)for(let i=0;i<e.parts.length;i++)r.parts&&r.parts[i]&&(t.parts[i]=Pt(r.parts[i],e.parts[i]));return!r.skipped&&e.skipped&&(t.skipped=!1),r.preload&&!e.preload&&(t.preload=!1),t},cie=(r,e,t)=>{const i=r.slice(),n=e.slice();t=t||0;const a=[];let s;for(let o=0;o<n.length;o++){const l=i[o+t],u=n[o];l?(s=l.map||s,a.push(uie(l,u))):(s&&!u.map&&(u.map=s),a.push(u))}return a},Z8=(r,e)=>{!r.resolvedUri&&r.uri&&(r.resolvedUri=zi(e,r.uri)),r.key&&!r.key.resolvedUri&&(r.key.resolvedUri=zi(e,r.key.uri)),r.map&&!r.map.resolvedUri&&(r.map.resolvedUri=zi(e,r.map.uri)),r.map&&r.map.key&&!r.map.key.resolvedUri&&(r.map.key.resolvedUri=zi(e,r.map.key.uri)),r.parts&&r.parts.length&&r.parts.forEach(t=>{t.resolvedUri||(t.resolvedUri=zi(e,t.uri))}),r.preloadHints&&r.preloadHints.length&&r.preloadHints.forEach(t=>{t.resolvedUri||(t.resolvedUri=zi(e,t.uri))})},Q8=function(r){const e=r.segments||[],t=r.preloadSegment;if(t&&t.parts&&t.parts.length){if(t.preloadHints){for(let i=0;i<t.preloadHints.length;i++)if(t.preloadHints[i].type==="MAP")return e}t.duration=r.targetDuration,t.preload=!0,e.push(t)}return e},J8=(r,e)=>r===e||r.segments&&e.segments&&r.segments.length===e.segments.length&&r.endList===e.endList&&r.mediaSequence===e.mediaSequence&&r.preloadSegment===e.preloadSegment,hw=(r,e,t=J8)=>{const i=Pt(r,{}),n=i.playlists[e.id];if(!n||t(n,e))return null;e.segments=Q8(e);const a=Pt(n,e);if(a.preloadSegment&&!e.preloadSegment&&delete a.preloadSegment,n.segments){if(e.skip){e.segments=e.segments||[];for(let s=0;s<e.skip.skippedSegments;s++)e.segments.unshift({skipped:!0})}a.segments=cie(n.segments,e.segments,e.mediaSequence-n.mediaSequence)}a.segments.forEach(s=>{Z8(s,a.resolvedUri)});for(let s=0;s<i.playlists.length;s++)i.playlists[s].id===e.id&&(i.playlists[s]=a);return i.playlists[e.id]=a,i.playlists[e.uri]=a,Nf(r,(s,o,l,u)=>{if(s.playlists)for(let c=0;c<s.playlists.length;c++)e.id===s.playlists[c].id&&(s.playlists[c]=a)}),i},fw=(r,e)=>{const t=r.segments||[],i=t[t.length-1],n=i&&i.parts&&i.parts[i.parts.length-1],a=n&&n.duration||i&&i.duration;return e&&a?a*1e3:(r.partTargetDuration||r.targetDuration||10)*500},HM=(r,e,t)=>{if(!r)return;const i=[];return r.forEach(n=>{if(!n.attributes)return;const{BANDWIDTH:a,RESOLUTION:s,CODECS:o}=n.attributes;i.push({id:n.id,bandwidth:a,resolution:s,codecs:o})}),{type:e,isLive:t,renditions:i}};class bh extends oie{constructor(e,t,i={}){if(super(),!e)throw new Error("A non-empty playlist URL or object is required");this.logger_=ea("PlaylistLoader");const{withCredentials:n=!1}=i;this.src=e,this.vhs_=t,this.withCredentials=n,this.addDateRangesToTextTrack_=i.addDateRangesToTextTrack;const a=t.options_;this.customTagParsers=a&&a.customTagParsers||[],this.customTagMappers=a&&a.customTagMappers||[],this.llhls=a&&a.llhls,this.dateRangesStorage_=new GM,this.state="HAVE_NOTHING",this.handleMediaupdatetimeout_=this.handleMediaupdatetimeout_.bind(this),this.on("mediaupdatetimeout",this.handleMediaupdatetimeout_),this.on("loadedplaylist",this.handleLoadedPlaylist_.bind(this))}handleLoadedPlaylist_(){const e=this.media();if(!e)return;this.dateRangesStorage_.setOffset(e.segments),this.dateRangesStorage_.setPendingDateRanges(e.dateRanges);const t=this.dateRangesStorage_.getDateRangesToProcess();!t.length||!this.addDateRangesToTextTrack_||this.addDateRangesToTextTrack_(t)}handleMediaupdatetimeout_(){if(this.state!=="HAVE_METADATA")return;const e=this.media();let t=zi(this.main.uri,e.uri);this.llhls&&(t=lie(t,e)),this.state="HAVE_CURRENT_METADATA",this.request=this.vhs_.xhr({uri:t,withCredentials:this.withCredentials,requestType:"hls-playlist"},(i,n)=>{if(this.request){if(i)return this.playlistRequestError(this.request,this.media(),"HAVE_METADATA");this.haveMetadata({playlistString:this.request.responseText,url:this.media().uri,id:this.media().id})}})}playlistRequestError(e,t,i){const{uri:n,id:a}=t;this.request=null,i&&(this.state=i),this.error={playlist:this.main.playlists[a],status:e.status,message:`HLS playlist request error at URL: ${n}.`,responseText:e.responseText,code:e.status>=500?4:2,metadata:Nu({requestType:e.requestType,request:e,error:e.error})},this.trigger("error")}parseManifest_({url:e,manifestString:t}){try{return iie({onwarn:({message:i})=>this.logger_(`m3u8-parser warn for ${e}: ${i}`),oninfo:({message:i})=>this.logger_(`m3u8-parser info for ${e}: ${i}`),manifestString:t,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,llhls:this.llhls})}catch(i){this.error=i,this.error.metadata={errorType:K.Error.StreamingHlsPlaylistParserError,error:i}}}haveMetadata({playlistString:e,playlistObject:t,url:i,id:n}){this.request=null,this.state="HAVE_METADATA";const a={playlistInfo:{type:"media",uri:i}};this.trigger({type:"playlistparsestart",metadata:a});const s=t||this.parseManifest_({url:i,manifestString:e});s.lastRequest=Date.now(),X8({playlist:s,uri:i,id:n});const o=hw(this.main,s);this.targetDuration=s.partTargetDuration||s.targetDuration,this.pendingMedia_=null,o?(this.main=o,this.media_=this.main.playlists[n]):this.trigger("playlistunchanged"),this.updateMediaUpdateTimeout_(fw(this.media(),!!o)),a.parsedPlaylist=HM(this.main.playlists,a.playlistInfo.type,!this.media_.endList),this.trigger({type:"playlistparsecomplete",metadata:a}),this.trigger("loadedplaylist")}dispose(){this.trigger("dispose"),this.stopRequest(),H.clearTimeout(this.mediaUpdateTimeout),H.clearTimeout(this.finalRenditionTimeout),this.dateRangesStorage_=new GM,this.off()}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e,t){if(!e)return this.media_;if(this.state==="HAVE_NOTHING")throw new Error("Cannot switch media playlist from "+this.state);if(typeof e=="string"){if(!this.main.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.main.playlists[e]}if(H.clearTimeout(this.finalRenditionTimeout),t){const o=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;this.finalRenditionTimeout=H.setTimeout(this.media.bind(this,e,!1),o);return}const i=this.state,n=!this.media_||e.id!==this.media_.id,a=this.main.playlists[e.id];if(a&&a.endList||e.endList&&e.segments.length){this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=e,n&&(this.trigger("mediachanging"),i==="HAVE_MAIN_MANIFEST"?this.trigger("loadedmetadata"):this.trigger("mediachange"));return}if(this.updateMediaUpdateTimeout_(fw(e,!0)),!n)return;if(this.state="SWITCHING_MEDIA",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.pendingMedia_=e;const s={playlistInfo:{type:"media",uri:e.uri}};this.trigger({type:"playlistrequeststart",metadata:s}),this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials,requestType:"hls-playlist"},(o,l)=>{if(this.request){if(e.lastRequest=Date.now(),e.resolvedUri=S0(e.resolvedUri,l),o)return this.playlistRequestError(this.request,e,i);this.trigger({type:"playlistrequestcomplete",metadata:s}),this.haveMetadata({playlistString:l.responseText,url:e.uri,id:e.id}),i==="HAVE_MAIN_MANIFEST"?this.trigger("loadedmetadata"):this.trigger("mediachange")}})}pause(){this.mediaUpdateTimeout&&(H.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),this.state==="HAVE_NOTHING"&&(this.started=!1),this.state==="SWITCHING_MEDIA"?this.media_?this.state="HAVE_METADATA":this.state="HAVE_MAIN_MANIFEST":this.state==="HAVE_CURRENT_METADATA"&&(this.state="HAVE_METADATA")}load(e){this.mediaUpdateTimeout&&(H.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);const t=this.media();if(e){const i=t?(t.partTargetDuration||t.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=H.setTimeout(()=>{this.mediaUpdateTimeout=null,this.load()},i);return}if(!this.started){this.start();return}t&&!t.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist")}updateMediaUpdateTimeout_(e){this.mediaUpdateTimeout&&(H.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),!(!this.media()||this.media().endList)&&(this.mediaUpdateTimeout=H.setTimeout(()=>{this.mediaUpdateTimeout=null,this.trigger("mediaupdatetimeout"),this.updateMediaUpdateTimeout_(e)},e))}start(){if(this.started=!0,typeof this.src=="object"){this.src.uri||(this.src.uri=H.location.href),this.src.resolvedUri=this.src.uri,setTimeout(()=>{this.setupInitialPlaylist(this.src)},0);return}const e={playlistInfo:{type:"multivariant",uri:this.src}};this.trigger({type:"playlistrequeststart",metadata:e}),this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials,requestType:"hls-playlist"},(t,i)=>{if(!this.request)return;if(this.request=null,t)return this.error={status:i.status,message:`HLS playlist request error at URL: ${this.src}.`,responseText:i.responseText,code:2,metadata:Nu({requestType:i.requestType,request:i,error:t})},this.state==="HAVE_NOTHING"&&(this.started=!1),this.trigger("error");this.trigger({type:"playlistrequestcomplete",metadata:e}),this.src=S0(this.src,i),this.trigger({type:"playlistparsestart",metadata:e});const n=this.parseManifest_({manifestString:i.responseText,url:this.src});e.parsedPlaylist=HM(n.playlists,e.playlistInfo.type,!1),this.trigger({type:"playlistparsecomplete",metadata:e}),this.setupInitialPlaylist(n)})}srcUri(){return typeof this.src=="string"?this.src:this.src.uri}setupInitialPlaylist(e){if(this.state="HAVE_MAIN_MANIFEST",e.playlists){this.main=e,Y8(this.main,this.srcUri()),e.playlists.forEach(i=>{i.segments=Q8(i),i.segments.forEach(n=>{Z8(n,i.resolvedUri)})}),this.trigger("loadedplaylist"),this.request||this.media(this.main.playlists[0]);return}const t=this.srcUri()||H.location.href;this.main=sie(e,t),this.haveMetadata({playlistObject:e,url:t,id:this.main.playlists[0].id}),this.trigger("loadedmetadata")}updateOrDeleteClone(e,t){const i=this.main,n=e.ID;let a=i.playlists.length;for(;a--;){const s=i.playlists[a];if(s.attributes["PATHWAY-ID"]===n){const o=s.resolvedUri,l=s.id;if(t){const u=this.createCloneURI_(s.resolvedUri,e),c=Lh(n,u),h=this.createCloneAttributes_(n,s.attributes),d=this.createClonePlaylist_(s,c,e,h);i.playlists[a]=d,i.playlists[c]=d,i.playlists[u]=d}else i.playlists.splice(a,1);delete i.playlists[l],delete i.playlists[o]}}this.updateOrDeleteCloneMedia(e,t)}updateOrDeleteCloneMedia(e,t){const i=this.main,n=e.ID;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(a=>{if(!(!i.mediaGroups[a]||!i.mediaGroups[a][n])){for(const s in i.mediaGroups[a])if(s===n){for(const o in i.mediaGroups[a][s])i.mediaGroups[a][s][o].playlists.forEach((u,c)=>{const h=i.playlists[u.id],d=h.id,f=h.resolvedUri;delete i.playlists[d],delete i.playlists[f]});delete i.mediaGroups[a][s]}}}),t&&this.createClonedMediaGroups_(e)}addClonePathway(e,t={}){const i=this.main,n=i.playlists.length,a=this.createCloneURI_(t.resolvedUri,e),s=Lh(e.ID,a),o=this.createCloneAttributes_(e.ID,t.attributes),l=this.createClonePlaylist_(t,s,e,o);i.playlists[n]=l,i.playlists[s]=l,i.playlists[a]=l,this.createClonedMediaGroups_(e)}createClonedMediaGroups_(e){const t=e.ID,i=e["BASE-ID"],n=this.main;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(a=>{if(!(!n.mediaGroups[a]||n.mediaGroups[a][t]))for(const s in n.mediaGroups[a]){if(s===i)n.mediaGroups[a][t]={};else continue;for(const o in n.mediaGroups[a][s]){const l=n.mediaGroups[a][s][o];n.mediaGroups[a][t][o]=or({},l);const u=n.mediaGroups[a][t][o],c=this.createCloneURI_(l.resolvedUri,e);u.resolvedUri=c,u.uri=c,u.playlists=[],l.playlists.forEach((h,d)=>{const f=n.playlists[h.id],p=j8(a,t,o),v=Lh(t,p);if(f&&!n.playlists[v]){const g=this.createClonePlaylist_(f,v,e),m=g.resolvedUri;n.playlists[v]=g,n.playlists[m]=g}u.playlists[d]=this.createClonePlaylist_(h,v,e)})}}})}createClonePlaylist_(e,t,i,n){const a=this.createCloneURI_(e.resolvedUri,i),s={resolvedUri:a,uri:a,id:t};return e.segments&&(s.segments=[]),n&&(s.attributes=n),Pt(e,s)}createCloneURI_(e,t){const i=new URL(e);i.hostname=t["URI-REPLACEMENT"].HOST;const n=t["URI-REPLACEMENT"].PARAMS;for(const a of Object.keys(n))i.searchParams.set(a,n[a]);return i.href}createCloneAttributes_(e,t){const i={"PATHWAY-ID":e};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(n=>{t[n]&&(i[n]=e)}),i}getKeyIdSet(e){if(e.contentProtection){const t=new Set;for(const i in e.contentProtection){const n=e.contentProtection[i].attributes.keyId;n&&t.add(n.toLowerCase())}return t}}}const dw=function(r,e,t,i){const n=r.responseType==="arraybuffer"?r.response:r.responseText;!e&&n&&(r.responseTime=Date.now(),r.roundTripTime=r.responseTime-r.requestTime,r.bytesReceived=n.byteLength||n.length,r.bandwidth||(r.bandwidth=Math.floor(r.bytesReceived/r.roundTripTime*8*1e3))),t.headers&&(r.responseHeaders=t.headers),e&&e.code==="ETIMEDOUT"&&(r.timedout=!0),!e&&!r.aborted&&t.statusCode!==200&&t.statusCode!==206&&t.statusCode!==0&&(e=new Error("XHR Failed with a response of: "+(r&&(n||r.responseText)))),i(e,r)},hie=(r,e)=>{if(!r||!r.size)return;let t=e;return r.forEach(i=>{t=i(t)}),t},fie=(r,e,t,i)=>{!r||!r.size||r.forEach(n=>{n(e,t,i)})},eU=function(){const r=function e(t,i){t=Pt({timeout:45e3},t);const n=e.beforeRequest||K.Vhs.xhr.beforeRequest,a=e._requestCallbackSet||K.Vhs.xhr._requestCallbackSet||new Set,s=e._responseCallbackSet||K.Vhs.xhr._responseCallbackSet;n&&typeof n=="function"&&(K.log.warn("beforeRequest is deprecated, use onRequest instead."),a.add(n));const o=K.Vhs.xhr.original===!0?K.xhr:K.Vhs.xhr,l=hie(a,t);a.delete(n);const u=o(l||t,function(h,d){return fie(s,u,h,d),dw(u,h,d,i)}),c=u.abort;return u.abort=function(){return u.aborted=!0,c.apply(u,arguments)},u.uri=t.uri,u.requestType=t.requestType,u.requestTime=Date.now(),u};return r.original=!0,r},die=function(r){let e;const t=r.offset;return typeof r.offset=="bigint"||typeof r.length=="bigint"?e=H.BigInt(r.offset)+H.BigInt(r.length)-H.BigInt(1):e=r.offset+r.length-1,"bytes="+t+"-"+e},pw=function(r){const e={};return r.byterange&&(e.Range=die(r.byterange)),e},pie=function(r,e){return r.start(e)+"-"+r.end(e)},vie=function(r,e){const t=r.toString(16);return"00".substring(0,2-t.length)+t+(e%2?" ":"")},gie=function(r){return r>=32&&r<126?String.fromCharCode(r):"."},tU=function(r){const e={};return Object.keys(r).forEach(t=>{const i=r[t];E4(i)?e[t]={bytes:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength}:e[t]=i}),e},T0=function(r){const e=r.byterange||{length:1/0,offset:0};return[e.length,e.offset,r.resolvedUri].join(",")},rU=function(r){return r.resolvedUri},iU=r=>{const e=Array.prototype.slice.call(r),t=16;let i="",n,a;for(let s=0;s<e.length/t;s++)n=e.slice(s*t,s*t+t).map(vie).join(""),a=e.slice(s*t,s*t+t).map(gie).join(""),i+=n+" "+a+`
|
||
`;return i},mie=({bytes:r})=>iU(r),yie=r=>{let e="",t;for(t=0;t<r.length;t++)e+=pie(r,t)+" ";return e};var _ie=Object.freeze({__proto__:null,createTransferableMessage:tU,initSegmentId:T0,segmentKeyId:rU,hexDump:iU,tagDump:mie,textRanges:yie});const nU=.25,bie=(r,e)=>{if(!e.dateTimeObject)return null;const t=e.videoTimingInfo.transmuxerPrependedSeconds,n=e.videoTimingInfo.transmuxedPresentationStart+t,a=r-n;return new Date(e.dateTimeObject.getTime()+a*1e3)},Sie=r=>r.transmuxedPresentationEnd-r.transmuxedPresentationStart-r.transmuxerPrependedSeconds,Tie=(r,e)=>{let t;try{t=new Date(r)}catch{return null}if(!e||!e.segments||e.segments.length===0)return null;let i=e.segments[0];if(t<new Date(i.dateTimeObject))return null;for(let l=0;l<e.segments.length-1;l++){i=e.segments[l];const u=new Date(e.segments[l+1].dateTimeObject);if(t<u)break}const n=e.segments[e.segments.length-1],a=n.dateTimeObject,s=n.videoTimingInfo?Sie(n.videoTimingInfo):n.duration+n.duration*nU,o=new Date(a.getTime()+s*1e3);return t>o?null:(t>new Date(a)&&(i=n),{segment:i,estimatedStart:i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationStart:$i.duration(e,e.mediaSequence+e.segments.indexOf(i)),type:i.videoTimingInfo?"accurate":"estimate"})},xie=(r,e)=>{if(!e||!e.segments||e.segments.length===0)return null;let t=0,i;for(let a=0;a<e.segments.length&&(i=e.segments[a],t=i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationEnd:t+i.duration,!(r<=t));a++);const n=e.segments[e.segments.length-1];if(n.videoTimingInfo&&n.videoTimingInfo.transmuxedPresentationEnd<r)return null;if(r>t){if(r>t+n.duration*nU)return null;i=n}return{segment:i,estimatedStart:i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationStart:t-i.duration,type:i.videoTimingInfo?"accurate":"estimate"}},wie=(r,e)=>{let t,i;try{t=new Date(r),i=new Date(e)}catch{}const n=t.getTime();return(i.getTime()-n)/1e3},Cie=r=>{if(!r.segments||r.segments.length===0)return!1;for(let e=0;e<r.segments.length;e++)if(!r.segments[e].dateTimeObject)return!1;return!0},Aie=({playlist:r,time:e=void 0,callback:t})=>{if(!t)throw new Error("getProgramTime: callback must be provided");if(!r||e===void 0)return t({message:"getProgramTime: playlist and time must be provided"});const i=xie(e,r);if(!i)return t({message:"valid programTime was not found"});if(i.type==="estimate")return t({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:i.estimatedStart});const n={mediaSeconds:e},a=bie(e,i.segment);return a&&(n.programDateTime=a.toISOString()),t(null,n)},aU=({programTime:r,playlist:e,retryCount:t=2,seekTo:i,pauseAfterSeek:n=!0,tech:a,callback:s})=>{if(!s)throw new Error("seekToProgramTime: callback must be provided");if(typeof r>"u"||!e||!i)return s({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!e.endList&&!a.hasStarted_)return s({message:"player must be playing a live stream to start buffering"});if(!Cie(e))return s({message:"programDateTime tags must be provided in the manifest "+e.resolvedUri});const o=Tie(r,e);if(!o)return s({message:`${r} was not found in the stream`});const l=o.segment,u=wie(l.dateTimeObject,r);if(o.type==="estimate"){if(t===0)return s({message:`${r} is not buffered yet. Try again`});i(o.estimatedStart+u),a.one("seeked",()=>{aU({programTime:r,playlist:e,retryCount:t-1,seekTo:i,pauseAfterSeek:n,tech:a,callback:s})});return}const c=l.start+u,h=()=>s(null,a.currentTime());a.one("seeked",h),n&&a.pause(),i(c)},Xb=(r,e)=>{if(r.readyState===4)return e()},Die=(r,e,t,i)=>{let n=[],a,s=!1;const o=function(h,d,f,p){return d.abort(),s=!0,t(h,d,f,p)},l=function(h,d){if(s)return;if(h)return h.metadata=Nu({requestType:i,request:d,error:h}),o(h,d,"",n);const f=d.responseText.substring(n&&n.byteLength||0,d.responseText.length);if(n=MJ(n,I4(f,!0)),a=a||ap(n),n.length<10||a&&n.length<a+2)return Xb(d,()=>o(h,d,"",n));const p=rA(n);return p==="ts"&&n.length<188?Xb(d,()=>o(h,d,"",n)):!p&&n.length<376?Xb(d,()=>o(h,d,"",n)):o(null,d,p,n)},c=e({uri:r,beforeSend(h){h.overrideMimeType("text/plain; charset=x-user-defined"),h.addEventListener("progress",function({total:d,loaded:f}){return dw(h,null,{statusCode:h.status},l)})}},function(h,d){return dw(c,h,d,l)});return c},{EventTarget:Eie}=K,$M=function(r,e){if(!J8(r,e)||r.sidx&&e.sidx&&(r.sidx.offset!==e.sidx.offset||r.sidx.length!==e.sidx.length))return!1;if(!r.sidx&&e.sidx||r.sidx&&!e.sidx||r.segments&&!e.segments||!r.segments&&e.segments)return!1;if(!r.segments&&!e.segments)return!0;for(let t=0;t<r.segments.length;t++){const i=r.segments[t],n=e.segments[t];if(i.uri!==n.uri)return!1;if(!i.byterange&&!n.byterange)continue;const a=i.byterange,s=n.byterange;if(a&&!s||!a&&s||a.offset!==s.offset||a.length!==s.length)return!1}return!0},Iie=(r,e,t,i)=>{const n=i.attributes.NAME||t;return`placeholder-uri-${r}-${e}-${n}`},Pie=({mainXml:r,srcUrl:e,clientOffset:t,sidxMapping:i,previousManifest:n})=>{const a=Qee(r,{manifestUri:e,clientOffset:t,sidxMapping:i,previousManifest:n});return Y8(a,e,Iie),a},Mie=(r,e)=>{Nf(r,(t,i,n,a)=>{(!e.mediaGroups[i][n]||!(a in e.mediaGroups[i][n]))&&delete r.mediaGroups[i][n][a]})},Lie=(r,e,t)=>{let i=!0,n=Pt(r,{duration:e.duration,minimumUpdatePeriod:e.minimumUpdatePeriod,timelineStarts:e.timelineStarts});for(let a=0;a<e.playlists.length;a++){const s=e.playlists[a];if(s.sidx){const l=q_(s.sidx);t&&t[l]&&t[l].sidx&&JC(s,t[l].sidx,s.sidx.resolvedUri)}const o=hw(n,s,$M);o&&(n=o,i=!1)}return Nf(e,(a,s,o,l)=>{if(a.playlists&&a.playlists.length){const u=a.playlists[0].id,c=hw(n,a.playlists[0],$M);c&&(n=c,l in n.mediaGroups[s][o]||(n.mediaGroups[s][o][l]=a),n.mediaGroups[s][o][l].playlists[0]=n.playlists[u],i=!1)}}),Mie(n,e),e.minimumUpdatePeriod!==r.minimumUpdatePeriod&&(i=!1),i?null:n},kie=(r,e)=>(!r.map&&!e.map||!!(r.map&&e.map&&r.map.byterange.offset===e.map.byterange.offset&&r.map.byterange.length===e.map.byterange.length))&&r.uri===e.uri&&r.byterange.offset===e.byterange.offset&&r.byterange.length===e.byterange.length,WM=(r,e)=>{const t={};for(const i in r){const a=r[i].sidx;if(a){const s=q_(a);if(!e[s])break;const o=e[s].sidxInfo;kie(o,a)&&(t[s]=e[s])}}return t},Rie=(r,e)=>{let i=WM(r.playlists,e);return Nf(r,(n,a,s,o)=>{if(n.playlists&&n.playlists.length){const l=n.playlists;i=Pt(i,WM(l,e))}}),i};class vw extends Eie{constructor(e,t,i={},n){super(),this.mainPlaylistLoader_=n||this,n||(this.isMain_=!0);const{withCredentials:a=!1}=i;if(this.vhs_=t,this.withCredentials=a,this.addMetadataToTextTrack=i.addMetadataToTextTrack,!e)throw new Error("A non-empty playlist URL or object is required");this.on("minimumUpdatePeriod",()=>{this.refreshXml_()}),this.on("mediaupdatetimeout",()=>{this.refreshMedia_(this.media().id)}),this.state="HAVE_NOTHING",this.loadedPlaylists_={},this.logger_=ea("DashPlaylistLoader"),this.isMain_?(this.mainPlaylistLoader_.srcUrl=e,this.mainPlaylistLoader_.sidxMapping_={}):this.childPlaylist_=e}requestErrored_(e,t,i){if(!this.request)return!0;if(this.request=null,e)return this.error=typeof e=="object"&&!(e instanceof Error)?e:{status:t.status,message:"DASH request error at URL: "+t.uri,response:t.response,code:2,metadata:e.metadata},i&&(this.state=i),this.trigger("error"),!0}addSidxSegments_(e,t,i){const n=e.sidx&&q_(e.sidx);if(!e.sidx||!n||this.mainPlaylistLoader_.sidxMapping_[n]){this.mediaRequest_=H.setTimeout(()=>i(!1),0);return}const a=S0(e.sidx.resolvedUri),s=(l,u)=>{if(this.requestErrored_(l,u,t))return;const c=this.mainPlaylistLoader_.sidxMapping_,{requestType:h}=u;let d;try{d=nte(qe(u.response).subarray(8))}catch(f){f.metadata=Nu({requestType:h,request:u,parseFailure:!0}),this.requestErrored_(f,u,t);return}return c[n]={sidxInfo:e.sidx,sidx:d},JC(e,d,e.sidx.resolvedUri),i(!0)},o="dash-sidx";this.request=Die(a,this.vhs_.xhr,(l,u,c,h)=>{if(l)return s(l,u);if(!c||c!=="mp4"){const p=c||"unknown";return s({status:u.status,message:`Unsupported ${p} container type for sidx segment at URL: ${a}`,response:"",playlist:e,internal:!0,playlistExclusionDuration:1/0,code:2},u)}const{offset:d,length:f}=e.sidx.byterange;if(h.length>=f+d)return s(l,{response:h.subarray(d,d+f),status:u.status,uri:u.uri});this.request=this.vhs_.xhr({uri:a,responseType:"arraybuffer",requestType:"dash-sidx",headers:pw({byterange:e.sidx.byterange})},s)},o)}dispose(){this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},H.clearTimeout(this.minimumUpdatePeriodTimeout_),H.clearTimeout(this.mediaRequest_),H.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.off()}hasPendingRequest(){return this.request||this.mediaRequest_}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e){if(!e)return this.media_;if(this.state==="HAVE_NOTHING")throw new Error("Cannot switch media playlist from "+this.state);const t=this.state;if(typeof e=="string"){if(!this.mainPlaylistLoader_.main.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.mainPlaylistLoader_.main.playlists[e]}const i=!this.media_||e.id!==this.media_.id;if(i&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList){this.state="HAVE_METADATA",this.media_=e,i&&(this.trigger("mediachanging"),this.trigger("mediachange"));return}i&&(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(e,t,n=>{this.haveMetadata({startingState:t,playlist:e})}))}haveMetadata({startingState:e,playlist:t}){this.state="HAVE_METADATA",this.loadedPlaylists_[t.id]=t,this.mediaRequest_=null,this.refreshMedia_(t.id),e==="HAVE_MAIN_MANIFEST"?this.trigger("loadedmetadata"):this.trigger("mediachange")}pause(){this.mainPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),H.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMain_&&(H.clearTimeout(this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_),this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_=null),this.state==="HAVE_NOTHING"&&(this.started=!1)}load(e){H.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;const t=this.media();if(e){const i=t?t.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=H.setTimeout(()=>this.load(),i);return}if(!this.started){this.start();return}t&&!t.endList?(this.isMain_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger("minimumUpdatePeriod"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger("mediaupdatetimeout")):this.trigger("loadedplaylist")}start(){if(this.started=!0,!this.isMain_){this.mediaRequest_=H.setTimeout(()=>this.haveMain_(),0);return}this.requestMain_((e,t)=>{this.haveMain_(),!this.hasPendingRequest()&&!this.media_&&this.media(this.mainPlaylistLoader_.main.playlists[0])})}requestMain_(e){const t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:"manifestrequeststart",metadata:t}),this.request=this.vhs_.xhr({uri:this.mainPlaylistLoader_.srcUrl,withCredentials:this.withCredentials,requestType:"dash-manifest"},(i,n)=>{if(i){const{requestType:s}=n;i.metadata=Nu({requestType:s,request:n,error:i})}if(this.requestErrored_(i,n)){this.state==="HAVE_NOTHING"&&(this.started=!1);return}this.trigger({type:"manifestrequestcomplete",metadata:t});const a=n.responseText!==this.mainPlaylistLoader_.mainXml_;if(this.mainPlaylistLoader_.mainXml_=n.responseText,n.responseHeaders&&n.responseHeaders.date?this.mainLoaded_=Date.parse(n.responseHeaders.date):this.mainLoaded_=Date.now(),this.mainPlaylistLoader_.srcUrl=S0(this.mainPlaylistLoader_.srcUrl,n),a){this.handleMain_(),this.syncClientServerClock_(()=>e(n,a));return}return e(n,a)})}syncClientServerClock_(e){const t=Jee(this.mainPlaylistLoader_.mainXml_);if(t===null)return this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e();if(t.method==="DIRECT")return this.mainPlaylistLoader_.clientOffset_=t.value-Date.now(),e();this.request=this.vhs_.xhr({uri:zi(this.mainPlaylistLoader_.srcUrl,t.value),method:t.method,withCredentials:this.withCredentials,requestType:"dash-clock-sync"},(i,n)=>{if(!this.request)return;if(i){const{requestType:s}=n;return this.error.metadata=Nu({requestType:s,request:n,error:i}),this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()}let a;t.method==="HEAD"?!n.responseHeaders||!n.responseHeaders.date?a=this.mainLoaded_:a=Date.parse(n.responseHeaders.date):a=Date.parse(n.responseText),this.mainPlaylistLoader_.clientOffset_=a-Date.now(),e()})}haveMain_(){this.state="HAVE_MAIN_MANIFEST",this.isMain_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)}handleMain_(){this.mediaRequest_=null;const e=this.mainPlaylistLoader_.main,t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:"manifestparsestart",metadata:t});let i;try{i=Pie({mainXml:this.mainPlaylistLoader_.mainXml_,srcUrl:this.mainPlaylistLoader_.srcUrl,clientOffset:this.mainPlaylistLoader_.clientOffset_,sidxMapping:this.mainPlaylistLoader_.sidxMapping_,previousManifest:e})}catch(a){this.error=a,this.error.metadata={errorType:K.Error.StreamingDashManifestParserError,error:a},this.trigger("error")}e&&(i=Lie(e,i,this.mainPlaylistLoader_.sidxMapping_)),this.mainPlaylistLoader_.main=i||e;const n=this.mainPlaylistLoader_.main.locations&&this.mainPlaylistLoader_.main.locations[0];if(n&&n!==this.mainPlaylistLoader_.srcUrl&&(this.mainPlaylistLoader_.srcUrl=n),(!e||i&&i.minimumUpdatePeriod!==e.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),this.addEventStreamToMetadataTrack_(i),i){const{duration:a,endList:s}=i,o=[];i.playlists.forEach(u=>{o.push({id:u.id,bandwidth:u.attributes.BANDWIDTH,resolution:u.attributes.RESOLUTION,codecs:u.attributes.CODECS})});const l={duration:a,isLive:!s,renditions:o};t.parsedManifest=l,this.trigger({type:"manifestparsecomplete",metadata:t})}return!!i}updateMinimumUpdatePeriodTimeout_(){const e=this.mainPlaylistLoader_;e.createMupOnMedia_&&(e.off("loadedmetadata",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(H.clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);let t=e.main&&e.main.minimumUpdatePeriod;if(t===0&&(e.media()?t=e.media().targetDuration*1e3:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one("loadedmetadata",e.createMupOnMedia_))),typeof t!="number"||t<=0){t<0&&this.logger_(`found invalid minimumUpdatePeriod of ${t}, not setting a timeout`);return}this.createMUPTimeout_(t)}createMUPTimeout_(e){const t=this.mainPlaylistLoader_;t.minimumUpdatePeriodTimeout_=H.setTimeout(()=>{t.minimumUpdatePeriodTimeout_=null,t.trigger("minimumUpdatePeriod"),t.createMUPTimeout_(e)},e)}refreshXml_(){this.requestMain_((e,t)=>{t&&(this.media_&&(this.media_=this.mainPlaylistLoader_.main.playlists[this.media_.id]),this.mainPlaylistLoader_.sidxMapping_=Rie(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.sidxMapping_),this.addSidxSegments_(this.media(),this.state,i=>{this.refreshMedia_(this.media().id)}))})}refreshMedia_(e){if(!e)throw new Error("refreshMedia_ must take a media id");this.media_&&this.isMain_&&this.handleMain_();const t=this.mainPlaylistLoader_.main.playlists,i=!this.media_||this.media_!==t[e];if(i?this.media_=t[e]:this.trigger("playlistunchanged"),!this.mediaUpdateTimeout){const n=()=>{this.media().endList||(this.mediaUpdateTimeout=H.setTimeout(()=>{this.trigger("mediaupdatetimeout"),n()},fw(this.media(),!!i)))};n()}this.trigger("loadedplaylist")}addEventStreamToMetadataTrack_(e){if(e&&this.mainPlaylistLoader_.main.eventStream){const t=this.mainPlaylistLoader_.main.eventStream.map(i=>({cueTime:i.start,frames:[{data:i.messageData}]}));this.addMetadataToTextTrack("EventStream",t,this.mainPlaylistLoader_.main.duration)}}getKeyIdSet(e){if(e.contentProtection){const t=new Set;for(const i in e.contentProtection){const n=e.contentProtection[i].attributes["cenc:default_KID"];n&&t.add(n.replace(/-/g,"").toLowerCase())}return t}}}var Vr={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30};const Oie=r=>{const e=new Uint8Array(new ArrayBuffer(r.length));for(let t=0;t<r.length;t++)e[t]=r.charCodeAt(t);return e.buffer},sU=function(r){return r.on=r.addEventListener,r.off=r.removeEventListener,r},Nie=function(r){try{return URL.createObjectURL(new Blob([r],{type:"application/javascript"}))}catch{const t=new BlobBuilder;return t.append(r),URL.createObjectURL(t.getBlob())}},oU=function(r){return function(){const e=Nie(r),t=sU(new Worker(e));t.objURL=e;const i=t.terminate;return t.on=t.addEventListener,t.off=t.removeEventListener,t.terminate=function(){return URL.revokeObjectURL(e),i.call(this)},t}},lU=function(r){return`var browserWorkerPolyFill = ${sU.toString()};
|
||
browserWorkerPolyFill(self);
|
||
`+r},uU=function(r){return r.toString().replace(/^function.+?{/,"").slice(0,-1)},Bie=lU(uU(function(){var r=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=function(){this.init=function(){var S={};this.on=function(w,E){S[w]||(S[w]=[]),S[w]=S[w].concat(E)},this.off=function(w,E){var A;return S[w]?(A=S[w].indexOf(E),S[w]=S[w].slice(),S[w].splice(A,1),A>-1):!1},this.trigger=function(w){var E,A,P,k;if(E=S[w],!!E)if(arguments.length===2)for(P=E.length,A=0;A<P;++A)E[A].call(this,arguments[1]);else{for(k=[],A=arguments.length,A=1;A<arguments.length;++A)k.push(arguments[A]);for(P=E.length,A=0;A<P;++A)E[A].apply(this,k)}},this.dispose=function(){S={}}}};e.prototype.pipe=function(S){return this.on("data",function(w){S.push(w)}),this.on("done",function(w){S.flush(w)}),this.on("partialdone",function(w){S.partialFlush(w)}),this.on("endedtimeline",function(w){S.endTimeline(w)}),this.on("reset",function(w){S.reset(w)}),S},e.prototype.push=function(S){this.trigger("data",S)},e.prototype.flush=function(S){this.trigger("done",S)},e.prototype.partialFlush=function(S){this.trigger("partialdone",S)},e.prototype.endTimeline=function(S){this.trigger("endedtimeline",S)},e.prototype.reset=function(S){this.trigger("reset",S)};var t=e,i=Math.pow(2,32),n=function(S){var w=new DataView(S.buffer,S.byteOffset,S.byteLength),E;return w.getBigUint64?(E=w.getBigUint64(0),E<Number.MAX_SAFE_INTEGER?Number(E):E):w.getUint32(0)*i+w.getUint32(4)},a={getUint64:n,MAX_UINT32:i},s=a.MAX_UINT32,o,l,u,c,h,d,f,p,v,g,m,y,_,b,T,x,C,D,I,M,L,N,O,B,F,U,$,q,Z,te,J,oe,he,ue,Ie,Oe;(function(){var S;if(O={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},!(typeof Uint8Array>"u")){for(S in O)O.hasOwnProperty(S)&&(O[S]=[S.charCodeAt(0),S.charCodeAt(1),S.charCodeAt(2),S.charCodeAt(3)]);B=new Uint8Array([105,115,111,109]),U=new Uint8Array([97,118,99,49]),F=new Uint8Array([0,0,0,1]),$=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),q=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),Z={video:$,audio:q},oe=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),J=new Uint8Array([0,0,0,0,0,0,0,0]),he=new Uint8Array([0,0,0,0,0,0,0,0]),ue=he,Ie=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Oe=he,te=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}})(),o=function(S){var w=[],E=0,A,P,k;for(A=1;A<arguments.length;A++)w.push(arguments[A]);for(A=w.length;A--;)E+=w[A].byteLength;for(P=new Uint8Array(E+8),k=new DataView(P.buffer,P.byteOffset,P.byteLength),k.setUint32(0,P.byteLength),P.set(S,4),A=0,E=8;A<w.length;A++)P.set(w[A],E),E+=w[A].byteLength;return P},l=function(){return o(O.dinf,o(O.dref,oe))},u=function(S){return o(O.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,S.audioobjecttype<<3|S.samplingfrequencyindex>>>1,S.samplingfrequencyindex<<7|S.channelcount<<3,6,1,2]))},c=function(){return o(O.ftyp,B,F,B,U)},x=function(S){return o(O.hdlr,Z[S])},h=function(S){return o(O.mdat,S)},T=function(S){var w=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,S.duration>>>24&255,S.duration>>>16&255,S.duration>>>8&255,S.duration&255,85,196,0,0]);return S.samplerate&&(w[12]=S.samplerate>>>24&255,w[13]=S.samplerate>>>16&255,w[14]=S.samplerate>>>8&255,w[15]=S.samplerate&255),o(O.mdhd,w)},b=function(S){return o(O.mdia,T(S),x(S.type),f(S))},d=function(S){return o(O.mfhd,new Uint8Array([0,0,0,0,(S&4278190080)>>24,(S&16711680)>>16,(S&65280)>>8,S&255]))},f=function(S){return o(O.minf,S.type==="video"?o(O.vmhd,te):o(O.smhd,J),l(),D(S))},p=function(S,w){for(var E=[],A=w.length;A--;)E[A]=M(w[A]);return o.apply(null,[O.moof,d(S)].concat(E))},v=function(S){for(var w=S.length,E=[];w--;)E[w]=y(S[w]);return o.apply(null,[O.moov,m(4294967295)].concat(E).concat(g(S)))},g=function(S){for(var w=S.length,E=[];w--;)E[w]=L(S[w]);return o.apply(null,[O.mvex].concat(E))},m=function(S){var w=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(S&4278190080)>>24,(S&16711680)>>16,(S&65280)>>8,S&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return o(O.mvhd,w)},C=function(S){var w=S.samples||[],E=new Uint8Array(4+w.length),A,P;for(P=0;P<w.length;P++)A=w[P].flags,E[P+4]=A.dependsOn<<4|A.isDependedOn<<2|A.hasRedundancy;return o(O.sdtp,E)},D=function(S){return o(O.stbl,I(S),o(O.stts,Oe),o(O.stsc,ue),o(O.stsz,Ie),o(O.stco,he))},function(){var S,w;I=function(E){return o(O.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),E.type==="video"?S(E):w(E))},S=function(E){var A=E.sps||[],P=E.pps||[],k=[],V=[],z,G;for(z=0;z<A.length;z++)k.push((A[z].byteLength&65280)>>>8),k.push(A[z].byteLength&255),k=k.concat(Array.prototype.slice.call(A[z]));for(z=0;z<P.length;z++)V.push((P[z].byteLength&65280)>>>8),V.push(P[z].byteLength&255),V=V.concat(Array.prototype.slice.call(P[z]));if(G=[O.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(E.width&65280)>>8,E.width&255,(E.height&65280)>>8,E.height&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),o(O.avcC,new Uint8Array([1,E.profileIdc,E.profileCompatibility,E.levelIdc,255].concat([A.length],k,[P.length],V))),o(O.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],E.sarRatio){var W=E.sarRatio[0],Y=E.sarRatio[1];G.push(o(O.pasp,new Uint8Array([(W&4278190080)>>24,(W&16711680)>>16,(W&65280)>>8,W&255,(Y&4278190080)>>24,(Y&16711680)>>16,(Y&65280)>>8,Y&255])))}return o.apply(null,G)},w=function(E){return o(O.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(E.channelcount&65280)>>8,E.channelcount&255,(E.samplesize&65280)>>8,E.samplesize&255,0,0,0,0,(E.samplerate&65280)>>8,E.samplerate&255,0,0]),u(E))}}(),_=function(S){var w=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(S.id&4278190080)>>24,(S.id&16711680)>>16,(S.id&65280)>>8,S.id&255,0,0,0,0,(S.duration&4278190080)>>24,(S.duration&16711680)>>16,(S.duration&65280)>>8,S.duration&255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(S.width&65280)>>8,S.width&255,0,0,(S.height&65280)>>8,S.height&255,0,0]);return o(O.tkhd,w)},M=function(S){var w,E,A,P,k,V,z;return w=o(O.tfhd,new Uint8Array([0,0,0,58,(S.id&4278190080)>>24,(S.id&16711680)>>16,(S.id&65280)>>8,S.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),V=Math.floor(S.baseMediaDecodeTime/s),z=Math.floor(S.baseMediaDecodeTime%s),E=o(O.tfdt,new Uint8Array([1,0,0,0,V>>>24&255,V>>>16&255,V>>>8&255,V&255,z>>>24&255,z>>>16&255,z>>>8&255,z&255])),k=92,S.type==="audio"?(A=N(S,k),o(O.traf,w,E,A)):(P=C(S),A=N(S,P.length+k),o(O.traf,w,E,A,P))},y=function(S){return S.duration=S.duration||4294967295,o(O.trak,_(S),b(S))},L=function(S){var w=new Uint8Array([0,0,0,0,(S.id&4278190080)>>24,(S.id&16711680)>>16,(S.id&65280)>>8,S.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return S.type!=="video"&&(w[w.length-1]=0),o(O.trex,w)},function(){var S,w,E;E=function(A,P){var k=0,V=0,z=0,G=0;return A.length&&(A[0].duration!==void 0&&(k=1),A[0].size!==void 0&&(V=2),A[0].flags!==void 0&&(z=4),A[0].compositionTimeOffset!==void 0&&(G=8)),[0,0,k|V|z|G,1,(A.length&4278190080)>>>24,(A.length&16711680)>>>16,(A.length&65280)>>>8,A.length&255,(P&4278190080)>>>24,(P&16711680)>>>16,(P&65280)>>>8,P&255]},w=function(A,P){var k,V,z,G,W,Y;for(G=A.samples||[],P+=20+16*G.length,z=E(G,P),V=new Uint8Array(z.length+G.length*16),V.set(z),k=z.length,Y=0;Y<G.length;Y++)W=G[Y],V[k++]=(W.duration&4278190080)>>>24,V[k++]=(W.duration&16711680)>>>16,V[k++]=(W.duration&65280)>>>8,V[k++]=W.duration&255,V[k++]=(W.size&4278190080)>>>24,V[k++]=(W.size&16711680)>>>16,V[k++]=(W.size&65280)>>>8,V[k++]=W.size&255,V[k++]=W.flags.isLeading<<2|W.flags.dependsOn,V[k++]=W.flags.isDependedOn<<6|W.flags.hasRedundancy<<4|W.flags.paddingValue<<1|W.flags.isNonSyncSample,V[k++]=W.flags.degradationPriority&61440,V[k++]=W.flags.degradationPriority&15,V[k++]=(W.compositionTimeOffset&4278190080)>>>24,V[k++]=(W.compositionTimeOffset&16711680)>>>16,V[k++]=(W.compositionTimeOffset&65280)>>>8,V[k++]=W.compositionTimeOffset&255;return o(O.trun,V)},S=function(A,P){var k,V,z,G,W,Y;for(G=A.samples||[],P+=20+8*G.length,z=E(G,P),k=new Uint8Array(z.length+G.length*8),k.set(z),V=z.length,Y=0;Y<G.length;Y++)W=G[Y],k[V++]=(W.duration&4278190080)>>>24,k[V++]=(W.duration&16711680)>>>16,k[V++]=(W.duration&65280)>>>8,k[V++]=W.duration&255,k[V++]=(W.size&4278190080)>>>24,k[V++]=(W.size&16711680)>>>16,k[V++]=(W.size&65280)>>>8,k[V++]=W.size&255;return o(O.trun,k)},N=function(A,P){return A.type==="audio"?S(A,P):w(A,P)}}();var Ue={ftyp:c,mdat:h,moof:p,moov:v,initSegment:function(S){var w=c(),E=v(S),A;return A=new Uint8Array(w.byteLength+E.byteLength),A.set(w),A.set(E,w.byteLength),A}},me=function(S){var w,E,A=[],P=[];for(P.byteLength=0,P.nalCount=0,P.duration=0,A.byteLength=0,w=0;w<S.length;w++)E=S[w],E.nalUnitType==="access_unit_delimiter_rbsp"?(A.length&&(A.duration=E.dts-A.dts,P.byteLength+=A.byteLength,P.nalCount+=A.length,P.duration+=A.duration,P.push(A)),A=[E],A.byteLength=E.data.byteLength,A.pts=E.pts,A.dts=E.dts):(E.nalUnitType==="slice_layer_without_partitioning_rbsp_idr"&&(A.keyFrame=!0),A.duration=E.dts-A.dts,A.byteLength+=E.data.byteLength,A.push(E));return P.length&&(!A.duration||A.duration<=0)&&(A.duration=P[P.length-1].duration),P.byteLength+=A.byteLength,P.nalCount+=A.length,P.duration+=A.duration,P.push(A),P},ze=function(S){var w,E,A=[],P=[];for(A.byteLength=0,A.nalCount=0,A.duration=0,A.pts=S[0].pts,A.dts=S[0].dts,P.byteLength=0,P.nalCount=0,P.duration=0,P.pts=S[0].pts,P.dts=S[0].dts,w=0;w<S.length;w++)E=S[w],E.keyFrame?(A.length&&(P.push(A),P.byteLength+=A.byteLength,P.nalCount+=A.nalCount,P.duration+=A.duration),A=[E],A.nalCount=E.length,A.byteLength=E.byteLength,A.pts=E.pts,A.dts=E.dts,A.duration=E.duration):(A.duration+=E.duration,A.nalCount+=E.length,A.byteLength+=E.byteLength,A.push(E));return P.length&&A.duration<=0&&(A.duration=P[P.length-1].duration),P.byteLength+=A.byteLength,P.nalCount+=A.nalCount,P.duration+=A.duration,P.push(A),P},Pe=function(S){var w;return!S[0][0].keyFrame&&S.length>1&&(w=S.shift(),S.byteLength-=w.byteLength,S.nalCount-=w.nalCount,S[0][0].dts=w.dts,S[0][0].pts=w.pts,S[0][0].duration+=w.duration),S},_e=function(){return{size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}}},Me=function(S,w){var E=_e();return E.dataOffset=w,E.compositionTimeOffset=S.pts-S.dts,E.duration=S.duration,E.size=4*S.length,E.size+=S.byteLength,S.keyFrame&&(E.flags.dependsOn=2,E.flags.isNonSyncSample=0),E},St=function(S,w){var E,A,P,k,V,z=w||0,G=[];for(E=0;E<S.length;E++)for(k=S[E],A=0;A<k.length;A++)V=k[A],P=Me(V,z),z+=P.size,G.push(P);return G},Re=function(S){var w,E,A,P,k,V,z=0,G=S.byteLength,W=S.nalCount,Y=G+4*W,ee=new Uint8Array(Y),Te=new DataView(ee.buffer);for(w=0;w<S.length;w++)for(P=S[w],E=0;E<P.length;E++)for(k=P[E],A=0;A<k.length;A++)V=k[A],Te.setUint32(z,V.data.byteLength),z+=4,ee.set(V.data,z),z+=V.data.byteLength;return ee},Ge=function(S,w){var E,A=w||0,P=[];return E=Me(S,A),P.push(E),P},Lt=function(S){var w,E,A=0,P=S.byteLength,k=S.length,V=P+4*k,z=new Uint8Array(V),G=new DataView(z.buffer);for(w=0;w<S.length;w++)E=S[w],G.setUint32(A,E.data.byteLength),A+=4,z.set(E.data,A),A+=E.data.byteLength;return z},At={groupNalsIntoFrames:me,groupFramesIntoGops:ze,extendFirstKeyFrame:Pe,generateSampleTable:St,concatenateNalData:Re,generateSampleTableForFrame:Ge,concatenateNalDataForFrame:Lt},Dt=[33,16,5,32,164,27],nr=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],ht=function(S){for(var w=[];S--;)w.push(0);return w},nn=function(S){return Object.keys(S).reduce(function(w,E){return w[E]=new Uint8Array(S[E].reduce(function(A,P){return A.concat(P)},[])),w},{})},Sr,lo=function(){if(!Sr){var S={96e3:[Dt,[227,64],ht(154),[56]],88200:[Dt,[231],ht(170),[56]],64e3:[Dt,[248,192],ht(240),[56]],48e3:[Dt,[255,192],ht(268),[55,148,128],ht(54),[112]],44100:[Dt,[255,192],ht(268),[55,163,128],ht(84),[112]],32e3:[Dt,[255,192],ht(268),[55,234],ht(226),[112]],24e3:[Dt,[255,192],ht(268),[55,255,128],ht(268),[111,112],ht(126),[224]],16e3:[Dt,[255,192],ht(268),[55,255,128],ht(268),[111,255],ht(269),[223,108],ht(195),[1,192]],12e3:[nr,ht(268),[3,127,248],ht(268),[6,255,240],ht(268),[13,255,224],ht(268),[27,253,128],ht(259),[56]],11025:[nr,ht(268),[3,127,248],ht(268),[6,255,240],ht(268),[13,255,224],ht(268),[27,255,192],ht(268),[55,175,128],ht(108),[112]],8e3:[nr,ht(268),[3,121,16],ht(47),[7]]};Sr=nn(S)}return Sr},uo=9e4,xc,Ni,An,_l,Ng,wc,Bg;xc=function(S){return S*uo},Ni=function(S,w){return S*w},An=function(S){return S/uo},_l=function(S,w){return S/w},Ng=function(S,w){return xc(_l(S,w))},wc=function(S,w){return Ni(An(S),w)},Bg=function(S,w,E){return An(E?S:S-w)};var Ft={ONE_SECOND_IN_TS:uo,secondsToVideoTs:xc,secondsToAudioTs:Ni,videoTsToSeconds:An,audioTsToSeconds:_l,audioTsToVideoTs:Ng,videoTsToAudioTs:wc,metadataTsToSeconds:Bg},nd=lo,bl=Ft,Cc=function(S){var w,E,A=0;for(w=0;w<S.length;w++)E=S[w],A+=E.data.byteLength;return A},Sl=function(S,w,E,A){var P,k=0,V=0,z=0,G=0,W,Y,ee;if(w.length&&(P=bl.audioTsToVideoTs(S.baseMediaDecodeTime,S.samplerate),k=Math.ceil(bl.ONE_SECOND_IN_TS/(S.samplerate/1024)),E&&A&&(V=P-Math.max(E,A),z=Math.floor(V/k),G=z*k),!(z<1||G>bl.ONE_SECOND_IN_TS/2))){for(W=nd()[S.samplerate],W||(W=w[0].data),Y=0;Y<z;Y++)ee=w[0],w.splice(0,0,{data:W,dts:ee.dts-k,pts:ee.pts-k});return S.baseMediaDecodeTime-=Math.floor(bl.videoTsToAudioTs(G,S.samplerate)),G}},ob=function(S,w,E){return w.minSegmentDts>=E?S:(w.minSegmentDts=1/0,S.filter(function(A){return A.dts>=E?(w.minSegmentDts=Math.min(w.minSegmentDts,A.dts),w.minSegmentPts=w.minSegmentDts,!0):!1}))},Tl=function(S){var w,E,A=[];for(w=0;w<S.length;w++)E=S[w],A.push({size:E.data.byteLength,duration:1024});return A},Ss=function(S){var w,E,A=0,P=new Uint8Array(Cc(S));for(w=0;w<S.length;w++)E=S[w],P.set(E.data,A),A+=E.data.byteLength;return P},xl={prefixWithSilence:Sl,trimAdtsFramesByEarliestDts:ob,generateSampleTable:Tl,concatenateFrameData:Ss},an=Ft.ONE_SECOND_IN_TS,Ac=function(S,w){typeof w.pts=="number"&&(S.timelineStartInfo.pts===void 0&&(S.timelineStartInfo.pts=w.pts),S.minSegmentPts===void 0?S.minSegmentPts=w.pts:S.minSegmentPts=Math.min(S.minSegmentPts,w.pts),S.maxSegmentPts===void 0?S.maxSegmentPts=w.pts:S.maxSegmentPts=Math.max(S.maxSegmentPts,w.pts)),typeof w.dts=="number"&&(S.timelineStartInfo.dts===void 0&&(S.timelineStartInfo.dts=w.dts),S.minSegmentDts===void 0?S.minSegmentDts=w.dts:S.minSegmentDts=Math.min(S.minSegmentDts,w.dts),S.maxSegmentDts===void 0?S.maxSegmentDts=w.dts:S.maxSegmentDts=Math.max(S.maxSegmentDts,w.dts))},Fg=function(S){delete S.minSegmentDts,delete S.maxSegmentDts,delete S.minSegmentPts,delete S.maxSegmentPts},Ug=function(S,w){var E,A,P=S.minSegmentDts;return w||(P-=S.timelineStartInfo.dts),E=S.timelineStartInfo.baseMediaDecodeTime,E+=P,E=Math.max(0,E),S.type==="audio"&&(A=S.samplerate/an,E*=A,E=Math.floor(E)),E},Ve={clearDtsInfo:Fg,calculateTrackBaseMediaDecodeTime:Ug,collectDtsInfo:Ac},X=4,fe=128,re=function(S){for(var w=0,E={payloadType:-1,payloadSize:0},A=0,P=0;w<S.byteLength&&S[w]!==fe;){for(;S[w]===255;)A+=255,w++;for(A+=S[w++];S[w]===255;)P+=255,w++;if(P+=S[w++],!E.payload&&A===X){var k=String.fromCharCode(S[w+3],S[w+4],S[w+5],S[w+6]);if(k==="GA94"){E.payloadType=A,E.payloadSize=P,E.payload=S.subarray(w,w+P);break}else E.payload=void 0}w+=P,A=0,P=0}return E},ve=function(S){return S.payload[0]!==181||(S.payload[1]<<8|S.payload[2])!==49||String.fromCharCode(S.payload[3],S.payload[4],S.payload[5],S.payload[6])!=="GA94"||S.payload[7]!==3?null:S.payload.subarray(8,S.payload.length-1)},Se=function(S,w){var E=[],A,P,k,V;if(!(w[0]&64))return E;for(P=w[0]&31,A=0;A<P;A++)k=A*3,V={type:w[k+2]&3,pts:S},w[k+2]&4&&(V.ccData=w[k+3]<<8|w[k+4],E.push(V));return E},De=function(S){for(var w=S.byteLength,E=[],A=1,P,k;A<w-2;)S[A]===0&&S[A+1]===0&&S[A+2]===3?(E.push(A+2),A+=2):A++;if(E.length===0)return S;P=w-E.length,k=new Uint8Array(P);var V=0;for(A=0;A<P;V++,A++)V===E[0]&&(V++,E.shift()),k[A]=S[V];return k},st={parseSei:re,parseUserData:ve,parseCaptionPackets:Se,discardEmulationPreventionBytes:De,USER_DATA_REGISTERED_ITU_T_T35:X},Ne=t,xt=st,Ke=function(S){S=S||{},Ke.prototype.init.call(this),this.parse708captions_=typeof S.parse708captions=="boolean"?S.parse708captions:!0,this.captionPackets_=[],this.ccStreams_=[new Wt(0,0),new Wt(0,1),new Wt(1,0),new Wt(1,1)],this.parse708captions_&&(this.cc708Stream_=new dt({captionServices:S.captionServices})),this.reset(),this.ccStreams_.forEach(function(w){w.on("data",this.trigger.bind(this,"data")),w.on("partialdone",this.trigger.bind(this,"partialdone")),w.on("done",this.trigger.bind(this,"done"))},this),this.parse708captions_&&(this.cc708Stream_.on("data",this.trigger.bind(this,"data")),this.cc708Stream_.on("partialdone",this.trigger.bind(this,"partialdone")),this.cc708Stream_.on("done",this.trigger.bind(this,"done")))};Ke.prototype=new Ne,Ke.prototype.push=function(S){var w,E,A;if(S.nalUnitType==="sei_rbsp"&&(w=xt.parseSei(S.escapedRBSP),!!w.payload&&w.payloadType===xt.USER_DATA_REGISTERED_ITU_T_T35&&(E=xt.parseUserData(w),!!E))){if(S.dts<this.latestDts_){this.ignoreNextEqualDts_=!0;return}else if(S.dts===this.latestDts_&&this.ignoreNextEqualDts_){this.numSameDts_--,this.numSameDts_||(this.ignoreNextEqualDts_=!1);return}A=xt.parseCaptionPackets(S.pts,E),this.captionPackets_=this.captionPackets_.concat(A),this.latestDts_!==S.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=S.dts}},Ke.prototype.flushCCStreams=function(S){this.ccStreams_.forEach(function(w){return S==="flush"?w.flush():w.partialFlush()},this)},Ke.prototype.flushStream=function(S){if(!this.captionPackets_.length){this.flushCCStreams(S);return}this.captionPackets_.forEach(function(w,E){w.presortIndex=E}),this.captionPackets_.sort(function(w,E){return w.pts===E.pts?w.presortIndex-E.presortIndex:w.pts-E.pts}),this.captionPackets_.forEach(function(w){w.type<2?this.dispatchCea608Packet(w):this.dispatchCea708Packet(w)},this),this.captionPackets_.length=0,this.flushCCStreams(S)},Ke.prototype.flush=function(){return this.flushStream("flush")},Ke.prototype.partialFlush=function(){return this.flushStream("partialFlush")},Ke.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach(function(S){S.reset()})},Ke.prototype.dispatchCea608Packet=function(S){this.setsTextOrXDSActive(S)?this.activeCea608Channel_[S.type]=null:this.setsChannel1Active(S)?this.activeCea608Channel_[S.type]=0:this.setsChannel2Active(S)&&(this.activeCea608Channel_[S.type]=1),this.activeCea608Channel_[S.type]!==null&&this.ccStreams_[(S.type<<1)+this.activeCea608Channel_[S.type]].push(S)},Ke.prototype.setsChannel1Active=function(S){return(S.ccData&30720)===4096},Ke.prototype.setsChannel2Active=function(S){return(S.ccData&30720)===6144},Ke.prototype.setsTextOrXDSActive=function(S){return(S.ccData&28928)===256||(S.ccData&30974)===4138||(S.ccData&30974)===6186},Ke.prototype.dispatchCea708Packet=function(S){this.parse708captions_&&this.cc708Stream_.push(S)};var Et={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},Zt=function(S){var w=Et[S]||S;return S&4096&&S===w?"":String.fromCharCode(w)},hr=function(S){return 32<=S&&S<=127||160<=S&&S<=255},Er=function(S){this.windowNum=S,this.reset()};Er.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},Er.prototype.getText=function(){return this.rows.join(`
|
||
`)},Er.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},Er.prototype.newLine=function(S){for(this.rows.length>=this.virtualRowCount&&typeof this.beforeRowOverflow=="function"&&this.beforeRowOverflow(S),this.rows.length>0&&(this.rows.push(""),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},Er.prototype.isEmpty=function(){return this.rows.length===0?!0:this.rows.length===1?this.rows[0]==="":!1},Er.prototype.addText=function(S){this.rows[this.rowIdx]+=S},Er.prototype.backspace=function(){if(!this.isEmpty()){var S=this.rows[this.rowIdx];this.rows[this.rowIdx]=S.substr(0,S.length-1)}};var jr=function(S,w,E){this.serviceNum=S,this.text="",this.currentWindow=new Er(-1),this.windows=[],this.stream=E,typeof w=="string"&&this.createTextDecoder(w)};jr.prototype.init=function(S,w){this.startPts=S;for(var E=0;E<8;E++)this.windows[E]=new Er(E),typeof w=="function"&&(this.windows[E].beforeRowOverflow=w)},jr.prototype.setCurrentWindow=function(S){this.currentWindow=this.windows[S]},jr.prototype.createTextDecoder=function(S){if(typeof TextDecoder>"u")this.stream.trigger("log",{level:"warn",message:"The `encoding` option is unsupported without TextDecoder support"});else try{this.textDecoder_=new TextDecoder(S)}catch(w){this.stream.trigger("log",{level:"warn",message:"TextDecoder could not be created with "+S+" encoding. "+w})}};var dt=function(S){S=S||{},dt.prototype.init.call(this);var w=this,E=S.captionServices||{},A={},P;Object.keys(E).forEach(k=>{P=E[k],/^SERVICE/.test(k)&&(A[k]=P.encoding)}),this.serviceEncodings=A,this.current708Packet=null,this.services={},this.push=function(k){k.type===3?(w.new708Packet(),w.add708Bytes(k)):(w.current708Packet===null&&w.new708Packet(),w.add708Bytes(k))}};dt.prototype=new Ne,dt.prototype.new708Packet=function(){this.current708Packet!==null&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},dt.prototype.add708Bytes=function(S){var w=S.ccData,E=w>>>8,A=w&255;this.current708Packet.ptsVals.push(S.pts),this.current708Packet.data.push(E),this.current708Packet.data.push(A)},dt.prototype.push708Packet=function(){var S=this.current708Packet,w=S.data,E=null,A=null,P=0,k=w[P++];for(S.seq=k>>6,S.sizeCode=k&63;P<w.length;P++)k=w[P++],E=k>>5,A=k&31,E===7&&A>0&&(k=w[P++],E=k),this.pushServiceBlock(E,P,A),A>0&&(P+=A-1)},dt.prototype.pushServiceBlock=function(S,w,E){var A,P=w,k=this.current708Packet.data,V=this.services[S];for(V||(V=this.initService(S,P));P<w+E&&P<k.length;P++)A=k[P],hr(A)?P=this.handleText(P,V):A===24?P=this.multiByteCharacter(P,V):A===16?P=this.extendedCommands(P,V):128<=A&&A<=135?P=this.setCurrentWindow(P,V):152<=A&&A<=159?P=this.defineWindow(P,V):A===136?P=this.clearWindows(P,V):A===140?P=this.deleteWindows(P,V):A===137?P=this.displayWindows(P,V):A===138?P=this.hideWindows(P,V):A===139?P=this.toggleWindows(P,V):A===151?P=this.setWindowAttributes(P,V):A===144?P=this.setPenAttributes(P,V):A===145?P=this.setPenColor(P,V):A===146?P=this.setPenLocation(P,V):A===143?V=this.reset(P,V):A===8?V.currentWindow.backspace():A===12?V.currentWindow.clearText():A===13?V.currentWindow.pendingNewLine=!0:A===14?V.currentWindow.clearText():A===141&&P++},dt.prototype.extendedCommands=function(S,w){var E=this.current708Packet.data,A=E[++S];return hr(A)&&(S=this.handleText(S,w,{isExtended:!0})),S},dt.prototype.getPts=function(S){return this.current708Packet.ptsVals[Math.floor(S/2)]},dt.prototype.initService=function(S,w){var A="SERVICE"+S,E=this,A,P;return A in this.serviceEncodings&&(P=this.serviceEncodings[A]),this.services[S]=new jr(S,P,E),this.services[S].init(this.getPts(w),function(k){E.flushDisplayed(k,E.services[S])}),this.services[S]},dt.prototype.handleText=function(S,w,E){var A=E&&E.isExtended,P=E&&E.isMultiByte,k=this.current708Packet.data,V=A?4096:0,z=k[S],G=k[S+1],W=w.currentWindow,Y,ee;function Te(le){return le.map(je=>("0"+(je&255).toString(16)).slice(-2)).join("")}if(P?(ee=[z,G],S++):ee=[z],w.textDecoder_&&!A)Y=w.textDecoder_.decode(new Uint8Array(ee));else if(P){const le=Te(ee);Y=String.fromCharCode(parseInt(le,16))}else Y=Zt(V|z);return W.pendingNewLine&&!W.isEmpty()&&W.newLine(this.getPts(S)),W.pendingNewLine=!1,W.addText(Y),S},dt.prototype.multiByteCharacter=function(S,w){var E=this.current708Packet.data,A=E[S+1],P=E[S+2];return hr(A)&&hr(P)&&(S=this.handleText(++S,w,{isMultiByte:!0})),S},dt.prototype.setCurrentWindow=function(S,w){var E=this.current708Packet.data,A=E[S],P=A&7;return w.setCurrentWindow(P),S},dt.prototype.defineWindow=function(S,w){var E=this.current708Packet.data,A=E[S],P=A&7;w.setCurrentWindow(P);var k=w.currentWindow;return A=E[++S],k.visible=(A&32)>>5,k.rowLock=(A&16)>>4,k.columnLock=(A&8)>>3,k.priority=A&7,A=E[++S],k.relativePositioning=(A&128)>>7,k.anchorVertical=A&127,A=E[++S],k.anchorHorizontal=A,A=E[++S],k.anchorPoint=(A&240)>>4,k.rowCount=A&15,A=E[++S],k.columnCount=A&63,A=E[++S],k.windowStyle=(A&56)>>3,k.penStyle=A&7,k.virtualRowCount=k.rowCount+1,S},dt.prototype.setWindowAttributes=function(S,w){var E=this.current708Packet.data,A=E[S],P=w.currentWindow.winAttr;return A=E[++S],P.fillOpacity=(A&192)>>6,P.fillRed=(A&48)>>4,P.fillGreen=(A&12)>>2,P.fillBlue=A&3,A=E[++S],P.borderType=(A&192)>>6,P.borderRed=(A&48)>>4,P.borderGreen=(A&12)>>2,P.borderBlue=A&3,A=E[++S],P.borderType+=(A&128)>>5,P.wordWrap=(A&64)>>6,P.printDirection=(A&48)>>4,P.scrollDirection=(A&12)>>2,P.justify=A&3,A=E[++S],P.effectSpeed=(A&240)>>4,P.effectDirection=(A&12)>>2,P.displayEffect=A&3,S},dt.prototype.flushDisplayed=function(S,w){for(var E=[],A=0;A<8;A++)w.windows[A].visible&&!w.windows[A].isEmpty()&&E.push(w.windows[A].getText());w.endPts=S,w.text=E.join(`
|
||
|
||
`),this.pushCaption(w),w.startPts=S},dt.prototype.pushCaption=function(S){S.text!==""&&(this.trigger("data",{startPts:S.startPts,endPts:S.endPts,text:S.text,stream:"cc708_"+S.serviceNum}),S.text="",S.startPts=S.endPts)},dt.prototype.displayWindows=function(S,w){var E=this.current708Packet.data,A=E[++S],P=this.getPts(S);this.flushDisplayed(P,w);for(var k=0;k<8;k++)A&1<<k&&(w.windows[k].visible=1);return S},dt.prototype.hideWindows=function(S,w){var E=this.current708Packet.data,A=E[++S],P=this.getPts(S);this.flushDisplayed(P,w);for(var k=0;k<8;k++)A&1<<k&&(w.windows[k].visible=0);return S},dt.prototype.toggleWindows=function(S,w){var E=this.current708Packet.data,A=E[++S],P=this.getPts(S);this.flushDisplayed(P,w);for(var k=0;k<8;k++)A&1<<k&&(w.windows[k].visible^=1);return S},dt.prototype.clearWindows=function(S,w){var E=this.current708Packet.data,A=E[++S],P=this.getPts(S);this.flushDisplayed(P,w);for(var k=0;k<8;k++)A&1<<k&&w.windows[k].clearText();return S},dt.prototype.deleteWindows=function(S,w){var E=this.current708Packet.data,A=E[++S],P=this.getPts(S);this.flushDisplayed(P,w);for(var k=0;k<8;k++)A&1<<k&&w.windows[k].reset();return S},dt.prototype.setPenAttributes=function(S,w){var E=this.current708Packet.data,A=E[S],P=w.currentWindow.penAttr;return A=E[++S],P.textTag=(A&240)>>4,P.offset=(A&12)>>2,P.penSize=A&3,A=E[++S],P.italics=(A&128)>>7,P.underline=(A&64)>>6,P.edgeType=(A&56)>>3,P.fontStyle=A&7,S},dt.prototype.setPenColor=function(S,w){var E=this.current708Packet.data,A=E[S],P=w.currentWindow.penColor;return A=E[++S],P.fgOpacity=(A&192)>>6,P.fgRed=(A&48)>>4,P.fgGreen=(A&12)>>2,P.fgBlue=A&3,A=E[++S],P.bgOpacity=(A&192)>>6,P.bgRed=(A&48)>>4,P.bgGreen=(A&12)>>2,P.bgBlue=A&3,A=E[++S],P.edgeRed=(A&48)>>4,P.edgeGreen=(A&12)>>2,P.edgeBlue=A&3,S},dt.prototype.setPenLocation=function(S,w){var E=this.current708Packet.data,A=E[S],P=w.currentWindow.penLoc;return w.currentWindow.pendingNewLine=!0,A=E[++S],P.row=A&15,A=E[++S],P.column=A&63,S},dt.prototype.reset=function(S,w){var E=this.getPts(S);return this.flushDisplayed(E,w),this.initService(w.serviceNum,S)};var Ir={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},Gt=function(S){return S===null?"":(S=Ir[S]||S,String.fromCharCode(S))},co=14,sn=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],wl=function(){for(var S=[],w=co+1;w--;)S.push({text:"",indent:0,offset:0});return S},Wt=function(S,w){Wt.prototype.init.call(this),this.field_=S||0,this.dataChannel_=w||0,this.name_="CC"+((this.field_<<1|this.dataChannel_)+1),this.setConstants(),this.reset(),this.push=function(E){var A,P,k,V,z;if(A=E.ccData&32639,A===this.lastControlCode_){this.lastControlCode_=null;return}if((A&61440)===4096?this.lastControlCode_=A:A!==this.PADDING_&&(this.lastControlCode_=null),k=A>>>8,V=A&255,A!==this.PADDING_)if(A===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(A===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(E.pts),this.flushDisplayed(E.pts),P=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=P,this.startPts_=E.pts;else if(A===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(E.pts);else if(A===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(E.pts);else if(A===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(E.pts);else if(A===this.CARRIAGE_RETURN_)this.clearFormatting(E.pts),this.flushDisplayed(E.pts),this.shiftRowsUp_(),this.startPts_=E.pts;else if(A===this.BACKSPACE_)this.mode_==="popOn"?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1);else if(A===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(E.pts),this.displayed_=wl();else if(A===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=wl();else if(A===this.RESUME_DIRECT_CAPTIONING_)this.mode_!=="paintOn"&&(this.flushDisplayed(E.pts),this.displayed_=wl()),this.mode_="paintOn",this.startPts_=E.pts;else if(this.isSpecialCharacter(k,V))k=(k&3)<<8,z=Gt(k|V),this[this.mode_](E.pts,z),this.column_++;else if(this.isExtCharacter(k,V))this.mode_==="popOn"?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1),k=(k&3)<<8,z=Gt(k|V),this[this.mode_](E.pts,z),this.column_++;else if(this.isMidRowCode(k,V))this.clearFormatting(E.pts),this[this.mode_](E.pts," "),this.column_++,(V&14)===14&&this.addFormatting(E.pts,["i"]),(V&1)===1&&this.addFormatting(E.pts,["u"]);else if(this.isOffsetControlCode(k,V)){const W=V&3;this.nonDisplayed_[this.row_].offset=W,this.column_+=W}else if(this.isPAC(k,V)){var G=sn.indexOf(A&7968);if(this.mode_==="rollUp"&&(G-this.rollUpRows_+1<0&&(G=this.rollUpRows_-1),this.setRollUp(E.pts,G)),G!==this.row_&&G>=0&&G<=14&&(this.clearFormatting(E.pts),this.row_=G),V&1&&this.formatting_.indexOf("u")===-1&&this.addFormatting(E.pts,["u"]),(A&16)===16){const W=(A&14)>>1;this.column_=W*4,this.nonDisplayed_[this.row_].indent+=W}this.isColorPAC(V)&&(V&14)===14&&this.addFormatting(E.pts,["i"])}else this.isNormalChar(k)&&(V===0&&(V=null),z=Gt(k),z+=Gt(V),this[this.mode_](E.pts,z),this.column_+=z.length)}};Wt.prototype=new Ne,Wt.prototype.flushDisplayed=function(S){const w=A=>{this.trigger("log",{level:"warn",message:"Skipping a malformed 608 caption at index "+A+"."})},E=[];this.displayed_.forEach((A,P)=>{if(A&&A.text&&A.text.length){try{A.text=A.text.trim()}catch{w(P)}A.text.length&&E.push({text:A.text,line:P+1,position:10+Math.min(70,A.indent*10)+A.offset*2.5})}else A==null&&w(P)}),E.length&&this.trigger("data",{startPts:this.startPts_,endPts:S,content:E,stream:this.name_})},Wt.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=wl(),this.nonDisplayed_=wl(),this.lastControlCode_=null,this.column_=0,this.row_=co,this.rollUpRows_=2,this.formatting_=[]},Wt.prototype.setConstants=function(){this.dataChannel_===0?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):this.dataChannel_===1&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=this.CONTROL_|32,this.END_OF_CAPTION_=this.CONTROL_|47,this.ROLL_UP_2_ROWS_=this.CONTROL_|37,this.ROLL_UP_3_ROWS_=this.CONTROL_|38,this.ROLL_UP_4_ROWS_=this.CONTROL_|39,this.CARRIAGE_RETURN_=this.CONTROL_|45,this.RESUME_DIRECT_CAPTIONING_=this.CONTROL_|41,this.BACKSPACE_=this.CONTROL_|33,this.ERASE_DISPLAYED_MEMORY_=this.CONTROL_|44,this.ERASE_NON_DISPLAYED_MEMORY_=this.CONTROL_|46},Wt.prototype.isSpecialCharacter=function(S,w){return S===this.EXT_&&w>=48&&w<=63},Wt.prototype.isExtCharacter=function(S,w){return(S===this.EXT_+1||S===this.EXT_+2)&&w>=32&&w<=63},Wt.prototype.isMidRowCode=function(S,w){return S===this.EXT_&&w>=32&&w<=47},Wt.prototype.isOffsetControlCode=function(S,w){return S===this.OFFSET_&&w>=33&&w<=35},Wt.prototype.isPAC=function(S,w){return S>=this.BASE_&&S<this.BASE_+8&&w>=64&&w<=127},Wt.prototype.isColorPAC=function(S){return S>=64&&S<=79||S>=96&&S<=127},Wt.prototype.isNormalChar=function(S){return S>=32&&S<=127},Wt.prototype.setRollUp=function(S,w){if(this.mode_!=="rollUp"&&(this.row_=co,this.mode_="rollUp",this.flushDisplayed(S),this.nonDisplayed_=wl(),this.displayed_=wl()),w!==void 0&&w!==this.row_)for(var E=0;E<this.rollUpRows_;E++)this.displayed_[w-E]=this.displayed_[this.row_-E],this.displayed_[this.row_-E]={text:"",indent:0,offset:0};w===void 0&&(w=this.row_),this.topRow_=w-this.rollUpRows_+1},Wt.prototype.addFormatting=function(S,w){this.formatting_=this.formatting_.concat(w);var E=w.reduce(function(A,P){return A+"<"+P+">"},"");this[this.mode_](S,E)},Wt.prototype.clearFormatting=function(S){if(this.formatting_.length){var w=this.formatting_.reverse().reduce(function(E,A){return E+"</"+A+">"},"");this.formatting_=[],this[this.mode_](S,w)}},Wt.prototype.popOn=function(S,w){var E=this.nonDisplayed_[this.row_].text;E+=w,this.nonDisplayed_[this.row_].text=E},Wt.prototype.rollUp=function(S,w){var E=this.displayed_[this.row_].text;E+=w,this.displayed_[this.row_].text=E},Wt.prototype.shiftRowsUp_=function(){var S;for(S=0;S<this.topRow_;S++)this.displayed_[S]={text:"",indent:0,offset:0};for(S=this.row_+1;S<co+1;S++)this.displayed_[S]={text:"",indent:0,offset:0};for(S=this.topRow_;S<this.row_;S++)this.displayed_[S]=this.displayed_[S+1];this.displayed_[this.row_]={text:"",indent:0,offset:0}},Wt.prototype.paintOn=function(S,w){var E=this.displayed_[this.row_].text;E+=w,this.displayed_[this.row_].text=E};var PI={CaptionStream:Ke,Cea608Stream:Wt,Cea708Stream:dt},Vg={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},nY=t,aY=8589934592,sY=4294967296,MI="shared",lb=function(S,w){var E=1;for(S>w&&(E=-1);Math.abs(w-S)>sY;)S+=E*aY;return S},ub=function(S){var w,E;ub.prototype.init.call(this),this.type_=S||MI,this.push=function(A){if(A.type==="metadata"){this.trigger("data",A);return}this.type_!==MI&&A.type!==this.type_||(E===void 0&&(E=A.dts),A.dts=lb(A.dts,E),A.pts=lb(A.pts,E),w=A.dts,this.trigger("data",A))},this.flush=function(){E=w,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){E=void 0,w=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};ub.prototype=new nY;var LI={TimestampRolloverStream:ub,handleRollover:lb},oY=(S,w,E)=>{if(!S)return-1;for(var A=E;A<S.length;A++)if(S[A]===w)return A;return-1},lY={typedArrayIndexOf:oY},zg=lY.typedArrayIndexOf,Gg={Iso88591:0,Utf16:1,Utf16be:2,Utf8:3},kI=function(S,w,E){var A,P="";for(A=w;A<E;A++)P+="%"+("00"+S[A].toString(16)).slice(-2);return P},ad=function(S,w,E){return decodeURIComponent(kI(S,w,E))},sd=function(S,w,E){return unescape(kI(S,w,E))},od=function(S){return S[0]<<21|S[1]<<14|S[2]<<7|S[3]},ld={APIC:function(S){var w=1,E,A,P="-->";S.data[0]===Gg.Utf8&&(E=zg(S.data,0,w),!(E<0)&&(S.mimeType=sd(S.data,w,E),w=E+1,S.pictureType=S.data[w],w++,A=zg(S.data,0,w),!(A<0)&&(S.description=ad(S.data,w,A),w=A+1,S.mimeType===P?S.url=sd(S.data,w,S.data.length):S.pictureData=S.data.subarray(w,S.data.length))))},"T*":function(S){S.data[0]===Gg.Utf8&&(S.value=ad(S.data,1,S.data.length).replace(/\0*$/,""),S.values=S.value.split("\0"))},TXXX:function(S){var w;S.data[0]===Gg.Utf8&&(w=zg(S.data,0,1),w!==-1&&(S.description=ad(S.data,1,w),S.value=ad(S.data,w+1,S.data.length).replace(/\0*$/,""),S.data=S.value))},"W*":function(S){S.url=sd(S.data,0,S.data.length).replace(/\0.*$/,"")},WXXX:function(S){var w;S.data[0]===Gg.Utf8&&(w=zg(S.data,0,1),w!==-1&&(S.description=ad(S.data,1,w),S.url=sd(S.data,w+1,S.data.length).replace(/\0.*$/,"")))},PRIV:function(S){var w;for(w=0;w<S.data.length;w++)if(S.data[w]===0){S.owner=sd(S.data,0,w);break}S.privateData=S.data.subarray(w+1),S.data=S.privateData}},uY=function(S){var w,E,A=10,P=0,k=[];if(!(S.length<10||S[0]!==73||S[1]!==68||S[2]!==51)){P=od(S.subarray(6,10)),P+=10;var V=S[5]&64;V&&(A+=4,A+=od(S.subarray(10,14)),P-=od(S.subarray(16,20)));do{if(w=od(S.subarray(A+4,A+8)),w<1)break;E=String.fromCharCode(S[A],S[A+1],S[A+2],S[A+3]);var z={id:E,data:S.subarray(A+10,A+w+10)};z.key=z.id,ld[z.id]?ld[z.id](z):z.id[0]==="T"?ld["T*"](z):z.id[0]==="W"&&ld["W*"](z),k.push(z),A+=10,A+=w}while(A<P);return k}},RI={parseId3Frames:uY,parseSyncSafeInteger:od,frameParsers:ld},cY=t,hY=Vg,ho=RI,Hg;Hg=function(S){var w={descriptor:S&&S.descriptor},E=0,A=[],P=0,k;if(Hg.prototype.init.call(this),this.dispatchType=hY.METADATA_STREAM_TYPE.toString(16),w.descriptor)for(k=0;k<w.descriptor.length;k++)this.dispatchType+=("00"+w.descriptor[k].toString(16)).slice(-2);this.push=function(V){var z,G,W,Y,ee,Te;if(V.type==="timed-metadata"){if(V.dataAlignmentIndicator&&(P=0,A.length=0),A.length===0&&(V.data.length<10||V.data[0]!==73||V.data[1]!==68||V.data[2]!==51)){this.trigger("log",{level:"warn",message:"Skipping unrecognized metadata packet"});return}if(A.push(V),P+=V.data.byteLength,A.length===1&&(E=ho.parseSyncSafeInteger(V.data.subarray(6,10)),E+=10),!(P<E)){for(z={data:new Uint8Array(E),frames:[],pts:A[0].pts,dts:A[0].dts},ee=0;ee<E;)z.data.set(A[0].data.subarray(0,E-ee),ee),ee+=A[0].data.byteLength,P-=A[0].data.byteLength,A.shift();G=10,z.data[5]&64&&(G+=4,G+=ho.parseSyncSafeInteger(z.data.subarray(10,14)),E-=ho.parseSyncSafeInteger(z.data.subarray(16,20)));do{if(W=ho.parseSyncSafeInteger(z.data.subarray(G+4,G+8)),W<1){this.trigger("log",{level:"warn",message:"Malformed ID3 frame encountered. Skipping remaining metadata parsing."});break}if(Te=String.fromCharCode(z.data[G],z.data[G+1],z.data[G+2],z.data[G+3]),Y={id:Te,data:z.data.subarray(G+10,G+W+10)},Y.key=Y.id,ho.frameParsers[Y.id]?ho.frameParsers[Y.id](Y):Y.id[0]==="T"?ho.frameParsers["T*"](Y):Y.id[0]==="W"&&ho.frameParsers["W*"](Y),Y.owner==="com.apple.streaming.transportStreamTimestamp"){var le=Y.data,je=(le[3]&1)<<30|le[4]<<22|le[5]<<14|le[6]<<6|le[7]>>>2;je*=4,je+=le[7]&3,Y.timeStamp=je,z.pts===void 0&&z.dts===void 0&&(z.pts=Y.timeStamp,z.dts=Y.timeStamp),this.trigger("timestamp",Y)}z.frames.push(Y),G+=10,G+=W}while(G<E);this.trigger("data",z)}}}},Hg.prototype=new cY;var fY=Hg,cb=t,hb=PI,sa=Vg,dY=LI.TimestampRolloverStream,$g,ud,Wg,Dc=188,fb=71;$g=function(){var S=new Uint8Array(Dc),w=0;$g.prototype.init.call(this),this.push=function(E){var A=0,P=Dc,k;for(w?(k=new Uint8Array(E.byteLength+w),k.set(S.subarray(0,w)),k.set(E,w),w=0):k=E;P<k.byteLength;){if(k[A]===fb&&k[P]===fb){this.trigger("data",k.subarray(A,P)),A+=Dc,P+=Dc;continue}A++,P++}A<k.byteLength&&(S.set(k.subarray(A),0),w=k.byteLength-A)},this.flush=function(){w===Dc&&S[0]===fb&&(this.trigger("data",S),w=0),this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.reset=function(){w=0,this.trigger("reset")}},$g.prototype=new cb,ud=function(){var S,w,E,A;ud.prototype.init.call(this),A=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,S=function(P,k){var V=0;k.payloadUnitStartIndicator&&(V+=P[V]+1),k.type==="pat"?w(P.subarray(V),k):E(P.subarray(V),k)},w=function(P,k){k.section_number=P[7],k.last_section_number=P[8],A.pmtPid=(P[10]&31)<<8|P[11],k.pmtPid=A.pmtPid},E=function(P,k){var V,z,G,W;if(P[5]&1){for(A.programMapTable={video:null,audio:null,"timed-metadata":{}},V=(P[1]&15)<<8|P[2],z=3+V-4,G=(P[10]&15)<<8|P[11],W=12+G;W<z;){var Y=P[W],ee=(P[W+1]&31)<<8|P[W+2];Y===sa.H264_STREAM_TYPE&&A.programMapTable.video===null?A.programMapTable.video=ee:Y===sa.ADTS_STREAM_TYPE&&A.programMapTable.audio===null?A.programMapTable.audio=ee:Y===sa.METADATA_STREAM_TYPE&&(A.programMapTable["timed-metadata"][ee]=Y),W+=((P[W+3]&15)<<8|P[W+4])+5}k.programMapTable=A.programMapTable}},this.push=function(P){var k={},V=4;if(k.payloadUnitStartIndicator=!!(P[1]&64),k.pid=P[1]&31,k.pid<<=8,k.pid|=P[2],(P[3]&48)>>>4>1&&(V+=P[V]+1),k.pid===0)k.type="pat",S(P.subarray(V),k),this.trigger("data",k);else if(k.pid===this.pmtPid)for(k.type="pmt",S(P.subarray(V),k),this.trigger("data",k);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else this.programMapTable===void 0?this.packetsWaitingForPmt.push([P,V,k]):this.processPes_(P,V,k)},this.processPes_=function(P,k,V){V.pid===this.programMapTable.video?V.streamType=sa.H264_STREAM_TYPE:V.pid===this.programMapTable.audio?V.streamType=sa.ADTS_STREAM_TYPE:V.streamType=this.programMapTable["timed-metadata"][V.pid],V.type="pes",V.data=P.subarray(k),this.trigger("data",V)}},ud.prototype=new cb,ud.STREAM_TYPES={h264:27,adts:15},Wg=function(){var S=this,w=!1,E={data:[],size:0},A={data:[],size:0},P={data:[],size:0},k,V=function(G,W){var Y;const ee=G[0]<<16|G[1]<<8|G[2];W.data=new Uint8Array,ee===1&&(W.packetLength=6+(G[4]<<8|G[5]),W.dataAlignmentIndicator=(G[6]&4)!==0,Y=G[7],Y&192&&(W.pts=(G[9]&14)<<27|(G[10]&255)<<20|(G[11]&254)<<12|(G[12]&255)<<5|(G[13]&254)>>>3,W.pts*=4,W.pts+=(G[13]&6)>>>1,W.dts=W.pts,Y&64&&(W.dts=(G[14]&14)<<27|(G[15]&255)<<20|(G[16]&254)<<12|(G[17]&255)<<5|(G[18]&254)>>>3,W.dts*=4,W.dts+=(G[18]&6)>>>1)),W.data=G.subarray(9+G[8]))},z=function(G,W,Y){var ee=new Uint8Array(G.size),Te={type:W},le=0,je=0,tt=!1,Pr;if(!(!G.data.length||G.size<9)){for(Te.trackId=G.data[0].pid,le=0;le<G.data.length;le++)Pr=G.data[le],ee.set(Pr.data,je),je+=Pr.data.byteLength;V(ee,Te),tt=W==="video"||Te.packetLength<=G.size,(Y||tt)&&(G.size=0,G.data.length=0),tt&&S.trigger("data",Te)}};Wg.prototype.init.call(this),this.push=function(G){({pat:function(){},pes:function(){var W,Y;switch(G.streamType){case sa.H264_STREAM_TYPE:W=E,Y="video";break;case sa.ADTS_STREAM_TYPE:W=A,Y="audio";break;case sa.METADATA_STREAM_TYPE:W=P,Y="timed-metadata";break;default:return}G.payloadUnitStartIndicator&&z(W,Y,!0),W.data.push(G),W.size+=G.data.byteLength},pmt:function(){var W={type:"metadata",tracks:[]};k=G.programMapTable,k.video!==null&&W.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+k.video,codec:"avc",type:"video"}),k.audio!==null&&W.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+k.audio,codec:"adts",type:"audio"}),w=!0,S.trigger("data",W)}})[G.type]()},this.reset=function(){E.size=0,E.data.length=0,A.size=0,A.data.length=0,this.trigger("reset")},this.flushStreams_=function(){z(E,"video"),z(A,"audio"),z(P,"timed-metadata")},this.flush=function(){if(!w&&k){var G={type:"metadata",tracks:[]};k.video!==null&&G.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+k.video,codec:"avc",type:"video"}),k.audio!==null&&G.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+k.audio,codec:"adts",type:"audio"}),S.trigger("data",G)}w=!1,this.flushStreams_(),this.trigger("done")}},Wg.prototype=new cb;var OI={PAT_PID:0,MP2T_PACKET_LENGTH:Dc,TransportPacketStream:$g,TransportParseStream:ud,ElementaryStream:Wg,TimestampRolloverStream:dY,CaptionStream:hb.CaptionStream,Cea608Stream:hb.Cea608Stream,Cea708Stream:hb.Cea708Stream,MetadataStream:fY};for(var db in sa)sa.hasOwnProperty(db)&&(OI[db]=sa[db]);var pY=OI,vY=t,gY=Ft.ONE_SECOND_IN_TS,qg,NI=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];qg=function(S){var w,E=0;qg.prototype.init.call(this),this.skipWarn_=function(A,P){this.trigger("log",{level:"warn",message:`adts skiping bytes ${A} to ${P} in frame ${E} outside syncword`})},this.push=function(A){var P=0,k,V,z,G,W;if(S||(E=0),A.type==="audio"){w&&w.length?(z=w,w=new Uint8Array(z.byteLength+A.data.byteLength),w.set(z),w.set(A.data,z.byteLength)):w=A.data;for(var Y;P+7<w.length;){if(w[P]!==255||(w[P+1]&246)!==240){typeof Y!="number"&&(Y=P),P++;continue}if(typeof Y=="number"&&(this.skipWarn_(Y,P),Y=null),V=(~w[P+1]&1)*2,k=(w[P+3]&3)<<11|w[P+4]<<3|(w[P+5]&224)>>5,G=((w[P+6]&3)+1)*1024,W=G*gY/NI[(w[P+2]&60)>>>2],w.byteLength-P<k)break;this.trigger("data",{pts:A.pts+E*W,dts:A.dts+E*W,sampleCount:G,audioobjecttype:(w[P+2]>>>6&3)+1,channelcount:(w[P+2]&1)<<2|(w[P+3]&192)>>>6,samplerate:NI[(w[P+2]&60)>>>2],samplingfrequencyindex:(w[P+2]&60)>>>2,samplesize:16,data:w.subarray(P+7+V,P+k)}),E++,P+=k}typeof Y=="number"&&(this.skipWarn_(Y,P),Y=null),w=w.subarray(P)}},this.flush=function(){E=0,this.trigger("done")},this.reset=function(){w=void 0,this.trigger("reset")},this.endTimeline=function(){w=void 0,this.trigger("endedtimeline")}},qg.prototype=new vY;var mY=qg,BI;BI=function(S){var w=S.byteLength,E=0,A=0;this.length=function(){return 8*w},this.bitsAvailable=function(){return 8*w+A},this.loadWord=function(){var P=S.byteLength-w,k=new Uint8Array(4),V=Math.min(4,w);if(V===0)throw new Error("no bytes available");k.set(S.subarray(P,P+V)),E=new DataView(k.buffer).getUint32(0),A=V*8,w-=V},this.skipBits=function(P){var k;A>P?(E<<=P,A-=P):(P-=A,k=Math.floor(P/8),P-=k*8,w-=k,this.loadWord(),E<<=P,A-=P)},this.readBits=function(P){var k=Math.min(A,P),V=E>>>32-k;return A-=k,A>0?E<<=k:w>0&&this.loadWord(),k=P-k,k>0?V<<k|this.readBits(k):V},this.skipLeadingZeros=function(){var P;for(P=0;P<A;++P)if(E&2147483648>>>P)return E<<=P,A-=P,P;return this.loadWord(),P+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var P=this.skipLeadingZeros();return this.readBits(P+1)-1},this.readExpGolomb=function(){var P=this.readUnsignedExpGolomb();return 1&P?1+P>>>1:-1*(P>>>1)},this.readBoolean=function(){return this.readBits(1)===1},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};var yY=BI,FI=t,_Y=yY,jg,cd,UI;cd=function(){var S=0,w,E;cd.prototype.init.call(this),this.push=function(A){var P;E?(P=new Uint8Array(E.byteLength+A.data.byteLength),P.set(E),P.set(A.data,E.byteLength),E=P):E=A.data;for(var k=E.byteLength;S<k-3;S++)if(E[S+2]===1){w=S+5;break}for(;w<k;)switch(E[w]){case 0:if(E[w-1]!==0){w+=2;break}else if(E[w-2]!==0){w++;break}S+3!==w-2&&this.trigger("data",E.subarray(S+3,w-2));do w++;while(E[w]!==1&&w<k);S=w-2,w+=3;break;case 1:if(E[w-1]!==0||E[w-2]!==0){w+=3;break}this.trigger("data",E.subarray(S+3,w-2)),S=w-2,w+=3;break;default:w+=3;break}E=E.subarray(S),w-=S,S=0},this.reset=function(){E=null,S=0,this.trigger("reset")},this.flush=function(){E&&E.byteLength>3&&this.trigger("data",E.subarray(S+3)),E=null,S=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}},cd.prototype=new FI,UI={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},jg=function(){var S=new cd,w,E,A,P,k,V,z;jg.prototype.init.call(this),w=this,this.push=function(G){G.type==="video"&&(E=G.trackId,A=G.pts,P=G.dts,S.push(G))},S.on("data",function(G){var W={trackId:E,pts:A,dts:P,data:G,nalUnitTypeCode:G[0]&31};switch(W.nalUnitTypeCode){case 5:W.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:W.nalUnitType="sei_rbsp",W.escapedRBSP=k(G.subarray(1));break;case 7:W.nalUnitType="seq_parameter_set_rbsp",W.escapedRBSP=k(G.subarray(1)),W.config=V(W.escapedRBSP);break;case 8:W.nalUnitType="pic_parameter_set_rbsp";break;case 9:W.nalUnitType="access_unit_delimiter_rbsp";break}w.trigger("data",W)}),S.on("done",function(){w.trigger("done")}),S.on("partialdone",function(){w.trigger("partialdone")}),S.on("reset",function(){w.trigger("reset")}),S.on("endedtimeline",function(){w.trigger("endedtimeline")}),this.flush=function(){S.flush()},this.partialFlush=function(){S.partialFlush()},this.reset=function(){S.reset()},this.endTimeline=function(){S.endTimeline()},z=function(G,W){var Y=8,ee=8,Te,le;for(Te=0;Te<G;Te++)ee!==0&&(le=W.readExpGolomb(),ee=(Y+le+256)%256),Y=ee===0?Y:ee},k=function(G){for(var W=G.byteLength,Y=[],ee=1,Te,le;ee<W-2;)G[ee]===0&&G[ee+1]===0&&G[ee+2]===3?(Y.push(ee+2),ee+=2):ee++;if(Y.length===0)return G;Te=W-Y.length,le=new Uint8Array(Te);var je=0;for(ee=0;ee<Te;je++,ee++)je===Y[0]&&(je++,Y.shift()),le[ee]=G[je];return le},V=function(G){var W=0,Y=0,ee=0,Te=0,le,je,tt,Pr,Dn,Dl,dP,pP,vP,wb,gP,dr=[1,1],mP,El;if(le=new _Y(G),je=le.readUnsignedByte(),Pr=le.readUnsignedByte(),tt=le.readUnsignedByte(),le.skipUnsignedExpGolomb(),UI[je]&&(Dn=le.readUnsignedExpGolomb(),Dn===3&&le.skipBits(1),le.skipUnsignedExpGolomb(),le.skipUnsignedExpGolomb(),le.skipBits(1),le.readBoolean()))for(gP=Dn!==3?8:12,El=0;El<gP;El++)le.readBoolean()&&(El<6?z(16,le):z(64,le));if(le.skipUnsignedExpGolomb(),Dl=le.readUnsignedExpGolomb(),Dl===0)le.readUnsignedExpGolomb();else if(Dl===1)for(le.skipBits(1),le.skipExpGolomb(),le.skipExpGolomb(),dP=le.readUnsignedExpGolomb(),El=0;El<dP;El++)le.skipExpGolomb();if(le.skipUnsignedExpGolomb(),le.skipBits(1),pP=le.readUnsignedExpGolomb(),vP=le.readUnsignedExpGolomb(),wb=le.readBits(1),wb===0&&le.skipBits(1),le.skipBits(1),le.readBoolean()&&(W=le.readUnsignedExpGolomb(),Y=le.readUnsignedExpGolomb(),ee=le.readUnsignedExpGolomb(),Te=le.readUnsignedExpGolomb()),le.readBoolean()&&le.readBoolean()){switch(mP=le.readUnsignedByte(),mP){case 1:dr=[1,1];break;case 2:dr=[12,11];break;case 3:dr=[10,11];break;case 4:dr=[16,11];break;case 5:dr=[40,33];break;case 6:dr=[24,11];break;case 7:dr=[20,11];break;case 8:dr=[32,11];break;case 9:dr=[80,33];break;case 10:dr=[18,11];break;case 11:dr=[15,11];break;case 12:dr=[64,33];break;case 13:dr=[160,99];break;case 14:dr=[4,3];break;case 15:dr=[3,2];break;case 16:dr=[2,1];break;case 255:{dr=[le.readUnsignedByte()<<8|le.readUnsignedByte(),le.readUnsignedByte()<<8|le.readUnsignedByte()];break}}dr&&dr[0]/dr[1]}return{profileIdc:je,levelIdc:tt,profileCompatibility:Pr,width:(pP+1)*16-W*2-Y*2,height:(2-wb)*(vP+1)*16-ee*2-Te*2,sarRatio:dr}}},jg.prototype=new FI;var bY={H264Stream:jg,NalByteStream:cd},SY=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],VI=function(S,w){var E=S[w+6]<<21|S[w+7]<<14|S[w+8]<<7|S[w+9],A=S[w+5],P=(A&16)>>4;return E=E>=0?E:0,P?E+20:E+10},zI=function(S,w){return S.length-w<10||S[w]!==73||S[w+1]!==68||S[w+2]!==51?w:(w+=VI(S,w),zI(S,w))},TY=function(S){var w=zI(S,0);return S.length>=w+2&&(S[w]&255)===255&&(S[w+1]&240)===240&&(S[w+1]&22)===16},GI=function(S){return S[0]<<21|S[1]<<14|S[2]<<7|S[3]},xY=function(S,w,E){var A,P="";for(A=w;A<E;A++)P+="%"+("00"+S[A].toString(16)).slice(-2);return P},wY=function(S,w,E){return unescape(xY(S,w,E))},CY=function(S,w){var E=(S[w+5]&224)>>5,A=S[w+4]<<3,P=S[w+3]&6144;return P|A|E},AY=function(S,w){return S[w]===73&&S[w+1]===68&&S[w+2]===51?"timed-metadata":S[w]&!0&&(S[w+1]&240)===240?"audio":null},DY=function(S){for(var w=0;w+5<S.length;){if(S[w]!==255||(S[w+1]&246)!==240){w++;continue}return SY[(S[w+2]&60)>>>2]}return null},EY=function(S){var w,E,A,P;w=10,S[5]&64&&(w+=4,w+=GI(S.subarray(10,14)));do{if(E=GI(S.subarray(w+4,w+8)),E<1)return null;if(P=String.fromCharCode(S[w],S[w+1],S[w+2],S[w+3]),P==="PRIV"){A=S.subarray(w+10,w+E+10);for(var k=0;k<A.byteLength;k++)if(A[k]===0){var V=wY(A,0,k);if(V==="com.apple.streaming.transportStreamTimestamp"){var z=A.subarray(k+1),G=(z[3]&1)<<30|z[4]<<22|z[5]<<14|z[6]<<6|z[7]>>>2;return G*=4,G+=z[7]&3,G}break}}w+=10,w+=E}while(w<S.byteLength);return null},pb={isLikelyAacData:TY,parseId3TagSize:VI,parseAdtsSize:CY,parseType:AY,parseSampleRate:DY,parseAacTimestamp:EY},IY=t,HI=pb,Xg;Xg=function(){var S=new Uint8Array,w=0;Xg.prototype.init.call(this),this.setTimestamp=function(E){w=E},this.push=function(E){var A=0,P=0,k,V,z,G;for(S.length?(G=S.length,S=new Uint8Array(E.byteLength+G),S.set(S.subarray(0,G)),S.set(E,G)):S=E;S.length-P>=3;){if(S[P]===73&&S[P+1]===68&&S[P+2]===51){if(S.length-P<10||(A=HI.parseId3TagSize(S,P),P+A>S.length))break;V={type:"timed-metadata",data:S.subarray(P,P+A)},this.trigger("data",V),P+=A;continue}else if((S[P]&255)===255&&(S[P+1]&240)===240){if(S.length-P<7||(A=HI.parseAdtsSize(S,P),P+A>S.length))break;z={type:"audio",data:S.subarray(P,P+A),pts:w,dts:w},this.trigger("data",z),P+=A;continue}P++}k=S.length-P,k>0?S=S.subarray(P):S=new Uint8Array},this.reset=function(){S=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){S=new Uint8Array,this.trigger("endedtimeline")}},Xg.prototype=new IY;var PY=Xg,MY=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],LY=MY,kY=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],RY=kY,Yg=t,hd=Ue,fd=At,Kg=xl,oa=Ve,Ts=pY,Zg=Ft,$I=mY,OY=bY.H264Stream,NY=PY,BY=pb.isLikelyAacData,FY=Ft.ONE_SECOND_IN_TS,vb=LY,gb=RY,dd,Ec,Qg,Cl,UY=function(S,w){w.stream=S,this.trigger("log",w)},WI=function(S,w){for(var E=Object.keys(w),A=0;A<E.length;A++){var P=E[A];P==="headOfPipeline"||!w[P].on||w[P].on("log",UY.bind(S,P))}},qI=function(S,w){var E;if(S.length!==w.length)return!1;for(E=0;E<S.length;E++)if(S[E]!==w[E])return!1;return!0},mb=function(S,w,E,A,P,k){var V=E-w,z=A-w,G=P-E;return{start:{dts:S,pts:S+V},end:{dts:S+z,pts:S+G},prependedContentDuration:k,baseMediaDecodeTime:S}};Ec=function(S,w){var E=[],A,P=0,k=0,V=1/0;w=w||{},A=w.firstSequenceNumber||0,Ec.prototype.init.call(this),this.push=function(z){oa.collectDtsInfo(S,z),S&&vb.forEach(function(G){S[G]=z[G]}),E.push(z)},this.setEarliestDts=function(z){P=z},this.setVideoBaseMediaDecodeTime=function(z){V=z},this.setAudioAppendStart=function(z){k=z},this.flush=function(){var z,G,W,Y,ee,Te,le;if(E.length===0){this.trigger("done","AudioSegmentStream");return}z=Kg.trimAdtsFramesByEarliestDts(E,S,P),S.baseMediaDecodeTime=oa.calculateTrackBaseMediaDecodeTime(S,w.keepOriginalTimestamps),le=Kg.prefixWithSilence(S,z,k,V),S.samples=Kg.generateSampleTable(z),W=hd.mdat(Kg.concatenateFrameData(z)),E=[],G=hd.moof(A,[S]),Y=new Uint8Array(G.byteLength+W.byteLength),A++,Y.set(G),Y.set(W,G.byteLength),oa.clearDtsInfo(S),ee=Math.ceil(FY*1024/S.samplerate),z.length&&(Te=z.length*ee,this.trigger("segmentTimingInfo",mb(Zg.audioTsToVideoTs(S.baseMediaDecodeTime,S.samplerate),z[0].dts,z[0].pts,z[0].dts+Te,z[0].pts+Te,le||0)),this.trigger("timingInfo",{start:z[0].pts,end:z[0].pts+Te})),this.trigger("data",{track:S,boxes:Y}),this.trigger("done","AudioSegmentStream")},this.reset=function(){oa.clearDtsInfo(S),E=[],this.trigger("reset")}},Ec.prototype=new Yg,dd=function(S,w){var E,A=[],P=[],k,V;w=w||{},E=w.firstSequenceNumber||0,dd.prototype.init.call(this),delete S.minPTS,this.gopCache_=[],this.push=function(z){oa.collectDtsInfo(S,z),z.nalUnitType==="seq_parameter_set_rbsp"&&!k&&(k=z.config,S.sps=[z.data],gb.forEach(function(G){S[G]=k[G]},this)),z.nalUnitType==="pic_parameter_set_rbsp"&&!V&&(V=z.data,S.pps=[z.data]),A.push(z)},this.flush=function(){for(var z,G,W,Y,ee,Te,le=0,je,tt;A.length&&A[0].nalUnitType!=="access_unit_delimiter_rbsp";)A.shift();if(A.length===0){this.resetStream_(),this.trigger("done","VideoSegmentStream");return}if(z=fd.groupNalsIntoFrames(A),W=fd.groupFramesIntoGops(z),W[0][0].keyFrame||(G=this.getGopForFusion_(A[0],S),G?(le=G.duration,W.unshift(G),W.byteLength+=G.byteLength,W.nalCount+=G.nalCount,W.pts=G.pts,W.dts=G.dts,W.duration+=G.duration):W=fd.extendFirstKeyFrame(W)),P.length){var Pr;if(w.alignGopsAtEnd?Pr=this.alignGopsAtEnd_(W):Pr=this.alignGopsAtStart_(W),!Pr){this.gopCache_.unshift({gop:W.pop(),pps:S.pps,sps:S.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),A=[],this.resetStream_(),this.trigger("done","VideoSegmentStream");return}oa.clearDtsInfo(S),W=Pr}oa.collectDtsInfo(S,W),S.samples=fd.generateSampleTable(W),ee=hd.mdat(fd.concatenateNalData(W)),S.baseMediaDecodeTime=oa.calculateTrackBaseMediaDecodeTime(S,w.keepOriginalTimestamps),this.trigger("processedGopsInfo",W.map(function(Dn){return{pts:Dn.pts,dts:Dn.dts,byteLength:Dn.byteLength}})),je=W[0],tt=W[W.length-1],this.trigger("segmentTimingInfo",mb(S.baseMediaDecodeTime,je.dts,je.pts,tt.dts+tt.duration,tt.pts+tt.duration,le)),this.trigger("timingInfo",{start:W[0].pts,end:W[W.length-1].pts+W[W.length-1].duration}),this.gopCache_.unshift({gop:W.pop(),pps:S.pps,sps:S.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),A=[],this.trigger("baseMediaDecodeTime",S.baseMediaDecodeTime),this.trigger("timelineStartInfo",S.timelineStartInfo),Y=hd.moof(E,[S]),Te=new Uint8Array(Y.byteLength+ee.byteLength),E++,Te.set(Y),Te.set(ee,Y.byteLength),this.trigger("data",{track:S,boxes:Te}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),A=[],this.gopCache_.length=0,P.length=0,this.trigger("reset")},this.resetStream_=function(){oa.clearDtsInfo(S),k=void 0,V=void 0},this.getGopForFusion_=function(z){var G=45e3,W=1e4,Y=1/0,ee,Te,le,je,tt;for(tt=0;tt<this.gopCache_.length;tt++)je=this.gopCache_[tt],le=je.gop,!(!(S.pps&&qI(S.pps[0],je.pps[0]))||!(S.sps&&qI(S.sps[0],je.sps[0])))&&(le.dts<S.timelineStartInfo.dts||(ee=z.dts-le.dts-le.duration,ee>=-W&&ee<=G&&(!Te||Y>ee)&&(Te=je,Y=ee)));return Te?Te.gop:null},this.alignGopsAtStart_=function(z){var G,W,Y,ee,Te,le,je,tt;for(Te=z.byteLength,le=z.nalCount,je=z.duration,G=W=0;G<P.length&&W<z.length&&(Y=P[G],ee=z[W],Y.pts!==ee.pts);){if(ee.pts>Y.pts){G++;continue}W++,Te-=ee.byteLength,le-=ee.nalCount,je-=ee.duration}return W===0?z:W===z.length?null:(tt=z.slice(W),tt.byteLength=Te,tt.duration=je,tt.nalCount=le,tt.pts=tt[0].pts,tt.dts=tt[0].dts,tt)},this.alignGopsAtEnd_=function(z){var G,W,Y,ee,Te,le;for(G=P.length-1,W=z.length-1,Te=null,le=!1;G>=0&&W>=0;){if(Y=P[G],ee=z[W],Y.pts===ee.pts){le=!0;break}if(Y.pts>ee.pts){G--;continue}G===P.length-1&&(Te=W),W--}if(!le&&Te===null)return null;var je;if(le?je=W:je=Te,je===0)return z;var tt=z.slice(je),Pr=tt.reduce(function(Dn,Dl){return Dn.byteLength+=Dl.byteLength,Dn.duration+=Dl.duration,Dn.nalCount+=Dl.nalCount,Dn},{byteLength:0,duration:0,nalCount:0});return tt.byteLength=Pr.byteLength,tt.duration=Pr.duration,tt.nalCount=Pr.nalCount,tt.pts=tt[0].pts,tt.dts=tt[0].dts,tt},this.alignGopsWith=function(z){P=z}},dd.prototype=new Yg,Cl=function(S,w){this.numberOfTracks=0,this.metadataStream=w,S=S||{},typeof S.remux<"u"?this.remuxTracks=!!S.remux:this.remuxTracks=!0,typeof S.keepOriginalTimestamps=="boolean"?this.keepOriginalTimestamps=S.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,Cl.prototype.init.call(this),this.push=function(E){if(E.content||E.text)return this.pendingCaptions.push(E);if(E.frames)return this.pendingMetadata.push(E);this.pendingTracks.push(E.track),this.pendingBytes+=E.boxes.byteLength,E.track.type==="video"&&(this.videoTrack=E.track,this.pendingBoxes.push(E.boxes)),E.track.type==="audio"&&(this.audioTrack=E.track,this.pendingBoxes.unshift(E.boxes))}},Cl.prototype=new Yg,Cl.prototype.flush=function(S){var w=0,E={captions:[],captionStreams:{},metadata:[],info:{}},A,P,k,V=0,z;if(this.pendingTracks.length<this.numberOfTracks){if(S!=="VideoSegmentStream"&&S!=="AudioSegmentStream")return;if(this.remuxTracks)return;if(this.pendingTracks.length===0){this.emittedTracks++,this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0);return}}if(this.videoTrack?(V=this.videoTrack.timelineStartInfo.pts,gb.forEach(function(G){E.info[G]=this.videoTrack[G]},this)):this.audioTrack&&(V=this.audioTrack.timelineStartInfo.pts,vb.forEach(function(G){E.info[G]=this.audioTrack[G]},this)),this.videoTrack||this.audioTrack){for(this.pendingTracks.length===1?E.type=this.pendingTracks[0].type:E.type="combined",this.emittedTracks+=this.pendingTracks.length,k=hd.initSegment(this.pendingTracks),E.initSegment=new Uint8Array(k.byteLength),E.initSegment.set(k),E.data=new Uint8Array(this.pendingBytes),z=0;z<this.pendingBoxes.length;z++)E.data.set(this.pendingBoxes[z],w),w+=this.pendingBoxes[z].byteLength;for(z=0;z<this.pendingCaptions.length;z++)A=this.pendingCaptions[z],A.startTime=Zg.metadataTsToSeconds(A.startPts,V,this.keepOriginalTimestamps),A.endTime=Zg.metadataTsToSeconds(A.endPts,V,this.keepOriginalTimestamps),E.captionStreams[A.stream]=!0,E.captions.push(A);for(z=0;z<this.pendingMetadata.length;z++)P=this.pendingMetadata[z],P.cueTime=Zg.metadataTsToSeconds(P.pts,V,this.keepOriginalTimestamps),E.metadata.push(P);for(E.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger("data",E),z=0;z<E.captions.length;z++)A=E.captions[z],this.trigger("caption",A);for(z=0;z<E.metadata.length;z++)P=E.metadata[z],this.trigger("id3Frame",P)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},Cl.prototype.setRemux=function(S){this.remuxTracks=S},Qg=function(S){var w=this,E=!0,A,P;Qg.prototype.init.call(this),S=S||{},this.baseMediaDecodeTime=S.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var k={};this.transmuxPipeline_=k,k.type="aac",k.metadataStream=new Ts.MetadataStream,k.aacStream=new NY,k.audioTimestampRolloverStream=new Ts.TimestampRolloverStream("audio"),k.timedMetadataTimestampRolloverStream=new Ts.TimestampRolloverStream("timed-metadata"),k.adtsStream=new $I,k.coalesceStream=new Cl(S,k.metadataStream),k.headOfPipeline=k.aacStream,k.aacStream.pipe(k.audioTimestampRolloverStream).pipe(k.adtsStream),k.aacStream.pipe(k.timedMetadataTimestampRolloverStream).pipe(k.metadataStream).pipe(k.coalesceStream),k.metadataStream.on("timestamp",function(V){k.aacStream.setTimestamp(V.timeStamp)}),k.aacStream.on("data",function(V){V.type!=="timed-metadata"&&V.type!=="audio"||k.audioSegmentStream||(P=P||{timelineStartInfo:{baseMediaDecodeTime:w.baseMediaDecodeTime},codec:"adts",type:"audio"},k.coalesceStream.numberOfTracks++,k.audioSegmentStream=new Ec(P,S),k.audioSegmentStream.on("log",w.getLogTrigger_("audioSegmentStream")),k.audioSegmentStream.on("timingInfo",w.trigger.bind(w,"audioTimingInfo")),k.adtsStream.pipe(k.audioSegmentStream).pipe(k.coalesceStream),w.trigger("trackinfo",{hasAudio:!!P,hasVideo:!!A}))}),k.coalesceStream.on("data",this.trigger.bind(this,"data")),k.coalesceStream.on("done",this.trigger.bind(this,"done")),WI(this,k)},this.setupTsPipeline=function(){var k={};this.transmuxPipeline_=k,k.type="ts",k.metadataStream=new Ts.MetadataStream,k.packetStream=new Ts.TransportPacketStream,k.parseStream=new Ts.TransportParseStream,k.elementaryStream=new Ts.ElementaryStream,k.timestampRolloverStream=new Ts.TimestampRolloverStream,k.adtsStream=new $I,k.h264Stream=new OY,k.captionStream=new Ts.CaptionStream(S),k.coalesceStream=new Cl(S,k.metadataStream),k.headOfPipeline=k.packetStream,k.packetStream.pipe(k.parseStream).pipe(k.elementaryStream).pipe(k.timestampRolloverStream),k.timestampRolloverStream.pipe(k.h264Stream),k.timestampRolloverStream.pipe(k.adtsStream),k.timestampRolloverStream.pipe(k.metadataStream).pipe(k.coalesceStream),k.h264Stream.pipe(k.captionStream).pipe(k.coalesceStream),k.elementaryStream.on("data",function(V){var z;if(V.type==="metadata"){for(z=V.tracks.length;z--;)!A&&V.tracks[z].type==="video"?(A=V.tracks[z],A.timelineStartInfo.baseMediaDecodeTime=w.baseMediaDecodeTime):!P&&V.tracks[z].type==="audio"&&(P=V.tracks[z],P.timelineStartInfo.baseMediaDecodeTime=w.baseMediaDecodeTime);A&&!k.videoSegmentStream&&(k.coalesceStream.numberOfTracks++,k.videoSegmentStream=new dd(A,S),k.videoSegmentStream.on("log",w.getLogTrigger_("videoSegmentStream")),k.videoSegmentStream.on("timelineStartInfo",function(G){P&&!S.keepOriginalTimestamps&&(P.timelineStartInfo=G,k.audioSegmentStream.setEarliestDts(G.dts-w.baseMediaDecodeTime))}),k.videoSegmentStream.on("processedGopsInfo",w.trigger.bind(w,"gopInfo")),k.videoSegmentStream.on("segmentTimingInfo",w.trigger.bind(w,"videoSegmentTimingInfo")),k.videoSegmentStream.on("baseMediaDecodeTime",function(G){P&&k.audioSegmentStream.setVideoBaseMediaDecodeTime(G)}),k.videoSegmentStream.on("timingInfo",w.trigger.bind(w,"videoTimingInfo")),k.h264Stream.pipe(k.videoSegmentStream).pipe(k.coalesceStream)),P&&!k.audioSegmentStream&&(k.coalesceStream.numberOfTracks++,k.audioSegmentStream=new Ec(P,S),k.audioSegmentStream.on("log",w.getLogTrigger_("audioSegmentStream")),k.audioSegmentStream.on("timingInfo",w.trigger.bind(w,"audioTimingInfo")),k.audioSegmentStream.on("segmentTimingInfo",w.trigger.bind(w,"audioSegmentTimingInfo")),k.adtsStream.pipe(k.audioSegmentStream).pipe(k.coalesceStream)),w.trigger("trackinfo",{hasAudio:!!P,hasVideo:!!A})}}),k.coalesceStream.on("data",this.trigger.bind(this,"data")),k.coalesceStream.on("id3Frame",function(V){V.dispatchType=k.metadataStream.dispatchType,w.trigger("id3Frame",V)}),k.coalesceStream.on("caption",this.trigger.bind(this,"caption")),k.coalesceStream.on("done",this.trigger.bind(this,"done")),WI(this,k)},this.setBaseMediaDecodeTime=function(k){var V=this.transmuxPipeline_;S.keepOriginalTimestamps||(this.baseMediaDecodeTime=k),P&&(P.timelineStartInfo.dts=void 0,P.timelineStartInfo.pts=void 0,oa.clearDtsInfo(P),V.audioTimestampRolloverStream&&V.audioTimestampRolloverStream.discontinuity()),A&&(V.videoSegmentStream&&(V.videoSegmentStream.gopCache_=[]),A.timelineStartInfo.dts=void 0,A.timelineStartInfo.pts=void 0,oa.clearDtsInfo(A),V.captionStream.reset()),V.timestampRolloverStream&&V.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(k){P&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(k)},this.setRemux=function(k){var V=this.transmuxPipeline_;S.remux=k,V&&V.coalesceStream&&V.coalesceStream.setRemux(k)},this.alignGopsWith=function(k){A&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(k)},this.getLogTrigger_=function(k){var V=this;return function(z){z.stream=k,V.trigger("log",z)}},this.push=function(k){if(E){var V=BY(k);V&&this.transmuxPipeline_.type!=="aac"?this.setupAacPipeline():!V&&this.transmuxPipeline_.type!=="ts"&&this.setupTsPipeline(),E=!1}this.transmuxPipeline_.headOfPipeline.push(k)},this.flush=function(){E=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}},Qg.prototype=new Yg;var VY={Transmuxer:Qg,VideoSegmentStream:dd,AudioSegmentStream:Ec,AUDIO_PROPERTIES:vb,VIDEO_PROPERTIES:gb,generateSegmentTimingInfo:mb},zY=function(S){return S>>>0},GY=function(S){return("00"+S.toString(16)).slice(-2)},Jg={toUnsigned:zY,toHexString:GY},HY=function(S){var w="";return w+=String.fromCharCode(S[0]),w+=String.fromCharCode(S[1]),w+=String.fromCharCode(S[2]),w+=String.fromCharCode(S[3]),w},jI=HY,$Y=Jg.toUnsigned,WY=jI,XI=function(S,w){var E=[],A,P,k,V,z;if(!w.length)return null;for(A=0;A<S.byteLength;)P=$Y(S[A]<<24|S[A+1]<<16|S[A+2]<<8|S[A+3]),k=WY(S.subarray(A+4,A+8)),V=P>1?A+P:S.byteLength,k===w[0]&&(w.length===1?E.push(S.subarray(A+8,V)):(z=XI(S.subarray(A+8,V),w.slice(1)),z.length&&(E=E.concat(z)))),A=V;return E},YI=XI,qY=Jg.toUnsigned,jY=a.getUint64,XY=function(S){var w={version:S[0],flags:new Uint8Array(S.subarray(1,4))};return w.version===1?w.baseMediaDecodeTime=jY(S.subarray(4)):w.baseMediaDecodeTime=qY(S[4]<<24|S[5]<<16|S[6]<<8|S[7]),w},KI=XY,YY=function(S){return{isLeading:(S[0]&12)>>>2,dependsOn:S[0]&3,isDependedOn:(S[1]&192)>>>6,hasRedundancy:(S[1]&48)>>>4,paddingValue:(S[1]&14)>>>1,isNonSyncSample:S[1]&1,degradationPriority:S[2]<<8|S[3]}},KY=YY,ZI=KY,ZY=function(S){var w={version:S[0],flags:new Uint8Array(S.subarray(1,4)),samples:[]},E=new DataView(S.buffer,S.byteOffset,S.byteLength),A=w.flags[2]&1,P=w.flags[2]&4,k=w.flags[1]&1,V=w.flags[1]&2,z=w.flags[1]&4,G=w.flags[1]&8,W=E.getUint32(4),Y=8,ee;for(A&&(w.dataOffset=E.getInt32(Y),Y+=4),P&&W&&(ee={flags:ZI(S.subarray(Y,Y+4))},Y+=4,k&&(ee.duration=E.getUint32(Y),Y+=4),V&&(ee.size=E.getUint32(Y),Y+=4),G&&(w.version===1?ee.compositionTimeOffset=E.getInt32(Y):ee.compositionTimeOffset=E.getUint32(Y),Y+=4),w.samples.push(ee),W--);W--;)ee={},k&&(ee.duration=E.getUint32(Y),Y+=4),V&&(ee.size=E.getUint32(Y),Y+=4),z&&(ee.flags=ZI(S.subarray(Y,Y+4)),Y+=4),G&&(w.version===1?ee.compositionTimeOffset=E.getInt32(Y):ee.compositionTimeOffset=E.getUint32(Y),Y+=4),w.samples.push(ee);return w},QI=ZY,QY=function(S){var w=new DataView(S.buffer,S.byteOffset,S.byteLength),E={version:S[0],flags:new Uint8Array(S.subarray(1,4)),trackId:w.getUint32(4)},A=E.flags[2]&1,P=E.flags[2]&2,k=E.flags[2]&8,V=E.flags[2]&16,z=E.flags[2]&32,G=E.flags[0]&65536,W=E.flags[0]&131072,Y;return Y=8,A&&(Y+=4,E.baseDataOffset=w.getUint32(12),Y+=4),P&&(E.sampleDescriptionIndex=w.getUint32(Y),Y+=4),k&&(E.defaultSampleDuration=w.getUint32(Y),Y+=4),V&&(E.defaultSampleSize=w.getUint32(Y),Y+=4),z&&(E.defaultSampleFlags=w.getUint32(Y)),G&&(E.durationIsEmpty=!0),!A&&W&&(E.baseDataOffsetIsMoof=!0),E},JI=QY,pd;typeof window<"u"?pd=window:typeof r<"u"?pd=r:typeof self<"u"?pd=self:pd={};var eP=pd,JY=st.discardEmulationPreventionBytes,eK=PI.CaptionStream,vd=YI,tK=KI,rK=QI,iK=JI,tP=eP,nK=function(S,w){for(var E=S,A=0;A<w.length;A++){var P=w[A];if(E<P.size)return P;E-=P.size}return null},aK=function(S,w,E){var A=new DataView(S.buffer,S.byteOffset,S.byteLength),P={logs:[],seiNals:[]},k,V,z,G;for(V=0;V+4<S.length;V+=z)if(z=A.getUint32(V),V+=4,!(z<=0))switch(S[V]&31){case 6:var W=S.subarray(V+1,V+1+z),Y=nK(V,w);if(k={nalUnitType:"sei_rbsp",size:z,data:W,escapedRBSP:JY(W),trackId:E},Y)k.pts=Y.pts,k.dts=Y.dts,G=Y;else if(G)k.pts=G.pts,k.dts=G.dts;else{P.logs.push({level:"warn",message:"We've encountered a nal unit without data at "+V+" for trackId "+E+". See mux.js#223."});break}P.seiNals.push(k);break}return P},sK=function(S,w,E){var A=w,P=E.defaultSampleDuration||0,k=E.defaultSampleSize||0,V=E.trackId,z=[];return S.forEach(function(G){var W=rK(G),Y=W.samples;Y.forEach(function(ee){ee.duration===void 0&&(ee.duration=P),ee.size===void 0&&(ee.size=k),ee.trackId=V,ee.dts=A,ee.compositionTimeOffset===void 0&&(ee.compositionTimeOffset=0),typeof A=="bigint"?(ee.pts=A+tP.BigInt(ee.compositionTimeOffset),A+=tP.BigInt(ee.duration)):(ee.pts=A+ee.compositionTimeOffset,A+=ee.duration)}),z=z.concat(Y)}),z},oK=function(S,w){var E=vd(S,["moof","traf"]),A=vd(S,["mdat"]),P={},k=[];return A.forEach(function(V,z){var G=E[z];k.push({mdat:V,traf:G})}),k.forEach(function(V){var z=V.mdat,G=V.traf,W=vd(G,["tfhd"]),Y=iK(W[0]),ee=Y.trackId,Te=vd(G,["tfdt"]),le=Te.length>0?tK(Te[0]).baseMediaDecodeTime:0,je=vd(G,["trun"]),tt,Pr;w===ee&&je.length>0&&(tt=sK(je,le,Y),Pr=aK(z,tt,ee),P[ee]||(P[ee]={seiNals:[],logs:[]}),P[ee].seiNals=P[ee].seiNals.concat(Pr.seiNals),P[ee].logs=P[ee].logs.concat(Pr.logs))}),P},lK=function(S,w,E){var A;if(w===null)return null;A=oK(S,w);var P=A[w]||{};return{seiNals:P.seiNals,logs:P.logs,timescale:E}},uK=function(){var S=!1,w,E,A,P,k,V;this.isInitialized=function(){return S},this.init=function(z){w=new eK,S=!0,V=z?z.isPartial:!1,w.on("data",function(G){G.startTime=G.startPts/P,G.endTime=G.endPts/P,k.captions.push(G),k.captionStreams[G.stream]=!0}),w.on("log",function(G){k.logs.push(G)})},this.isNewInit=function(z,G){return z&&z.length===0||G&&typeof G=="object"&&Object.keys(G).length===0?!1:A!==z[0]||P!==G[A]},this.parse=function(z,G,W){var Y;if(this.isInitialized()){if(!G||!W)return null;if(this.isNewInit(G,W))A=G[0],P=W[A];else if(A===null||!P)return E.push(z),null}else return null;for(;E.length>0;){var ee=E.shift();this.parse(ee,G,W)}return Y=lK(z,A,P),Y&&Y.logs&&(k.logs=k.logs.concat(Y.logs)),Y===null||!Y.seiNals?k.logs.length?{logs:k.logs,captions:[],captionStreams:[]}:null:(this.pushNals(Y.seiNals),this.flushStream(),k)},this.pushNals=function(z){if(!this.isInitialized()||!z||z.length===0)return null;z.forEach(function(G){w.push(G)})},this.flushStream=function(){if(!this.isInitialized())return null;V?w.partialFlush():w.flush()},this.clearParsedCaptions=function(){k.captions=[],k.captionStreams={},k.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;w.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){E=[],A=null,P=null,k?this.clearParsedCaptions():k={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()},cK=uK,hK=function(S){for(var w=0,E=String.fromCharCode(S[w]),A="";E!=="\0";)A+=E,w++,E=String.fromCharCode(S[w]);return A+=E,A},fK={uint8ToCString:hK},em=fK.uint8ToCString,dK=a.getUint64,pK=function(S){var w=4,E=S[0],A,P,k,V,z,G,W,Y;if(E===0){A=em(S.subarray(w)),w+=A.length,P=em(S.subarray(w)),w+=P.length;var ee=new DataView(S.buffer);k=ee.getUint32(w),w+=4,z=ee.getUint32(w),w+=4,G=ee.getUint32(w),w+=4,W=ee.getUint32(w),w+=4}else if(E===1){var ee=new DataView(S.buffer);k=ee.getUint32(w),w+=4,V=dK(S.subarray(w)),w+=8,G=ee.getUint32(w),w+=4,W=ee.getUint32(w),w+=4,A=em(S.subarray(w)),w+=A.length,P=em(S.subarray(w)),w+=P.length}Y=new Uint8Array(S.subarray(w,S.byteLength));var Te={scheme_id_uri:A,value:P,timescale:k||1,presentation_time:V,presentation_time_delta:z,event_duration:G,id:W,message_data:Y};return gK(E,Te)?Te:void 0},vK=function(S,w,E,A){return S||S===0?S/w:A+E/w},gK=function(S,w){var E=w.scheme_id_uri!=="\0",A=S===0&&rP(w.presentation_time_delta)&&E,P=S===1&&rP(w.presentation_time)&&E;return!(S>1)&&A||P},rP=function(S){return S!==void 0||S!==null},mK={parseEmsgBox:pK,scaleTime:vK},tm=Jg.toUnsigned,gd=Jg.toHexString,fr=YI,Ic=jI,yb=mK,yK=JI,_K=QI,bK=KI,SK=a.getUint64,iP,nP,aP,sP,oP,_b,lP,bb=eP,TK=RI.parseId3Frames;iP=function(S){var w={},E=fr(S,["moov","trak"]);return E.reduce(function(A,P){var k,V,z,G,W;return k=fr(P,["tkhd"])[0],!k||(V=k[0],z=V===0?12:20,G=tm(k[z]<<24|k[z+1]<<16|k[z+2]<<8|k[z+3]),W=fr(P,["mdia","mdhd"])[0],!W)?null:(V=W[0],z=V===0?12:20,A[G]=tm(W[z]<<24|W[z+1]<<16|W[z+2]<<8|W[z+3]),A)},w)},nP=function(S,w){var E;E=fr(w,["moof","traf"]);var A=E.reduce(function(P,k){var V=fr(k,["tfhd"])[0],z=tm(V[4]<<24|V[5]<<16|V[6]<<8|V[7]),G=S[z]||9e4,W=fr(k,["tfdt"])[0],Y=new DataView(W.buffer,W.byteOffset,W.byteLength),ee;W[0]===1?ee=SK(W.subarray(4,12)):ee=Y.getUint32(4);let Te;return typeof ee=="bigint"?Te=ee/bb.BigInt(G):typeof ee=="number"&&!isNaN(ee)&&(Te=ee/G),Te<Number.MAX_SAFE_INTEGER&&(Te=Number(Te)),Te<P&&(P=Te),P},1/0);return typeof A=="bigint"||isFinite(A)?A:0},aP=function(S,w){var E=fr(w,["moof","traf"]),A=0,P=0,k;if(E&&E.length){var V=fr(E[0],["tfhd"])[0],z=fr(E[0],["trun"])[0],G=fr(E[0],["tfdt"])[0];if(V){var W=yK(V);k=W.trackId}if(G){var Y=bK(G);A=Y.baseMediaDecodeTime}if(z){var ee=_K(z);ee.samples&&ee.samples.length&&(P=ee.samples[0].compositionTimeOffset||0)}}var Te=S[k]||9e4;typeof A=="bigint"&&(P=bb.BigInt(P),Te=bb.BigInt(Te));var le=(A+P)/Te;return typeof le=="bigint"&&le<Number.MAX_SAFE_INTEGER&&(le=Number(le)),le},sP=function(S){var w=fr(S,["moov","trak"]),E=[];return w.forEach(function(A){var P=fr(A,["mdia","hdlr"]),k=fr(A,["tkhd"]);P.forEach(function(V,z){var G=Ic(V.subarray(8,12)),W=k[z],Y,ee,Te;G==="vide"&&(Y=new DataView(W.buffer,W.byteOffset,W.byteLength),ee=Y.getUint8(0),Te=ee===0?Y.getUint32(12):Y.getUint32(20),E.push(Te))})}),E},_b=function(S){var w=S[0],E=w===0?12:20;return tm(S[E]<<24|S[E+1]<<16|S[E+2]<<8|S[E+3])},oP=function(S){var w=fr(S,["moov","trak"]),E=[];return w.forEach(function(A){var P={},k=fr(A,["tkhd"])[0],V,z;k&&(V=new DataView(k.buffer,k.byteOffset,k.byteLength),z=V.getUint8(0),P.id=z===0?V.getUint32(12):V.getUint32(20));var G=fr(A,["mdia","hdlr"])[0];if(G){var W=Ic(G.subarray(8,12));W==="vide"?P.type="video":W==="soun"?P.type="audio":P.type=W}var Y=fr(A,["mdia","minf","stbl","stsd"])[0];if(Y){var ee=Y.subarray(8);P.codec=Ic(ee.subarray(4,8));var Te=fr(ee,[P.codec])[0],le,je;Te&&(/^[asm]vc[1-9]$/i.test(P.codec)?(le=Te.subarray(78),je=Ic(le.subarray(4,8)),je==="avcC"&&le.length>11?(P.codec+=".",P.codec+=gd(le[9]),P.codec+=gd(le[10]),P.codec+=gd(le[11])):P.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(P.codec)?(le=Te.subarray(28),je=Ic(le.subarray(4,8)),je==="esds"&&le.length>20&&le[19]!==0?(P.codec+="."+gd(le[19]),P.codec+="."+gd(le[20]>>>2&63).replace(/^0/,"")):P.codec="mp4a.40.2"):P.codec=P.codec.toLowerCase())}var tt=fr(A,["mdia","mdhd"])[0];tt&&(P.timescale=_b(tt)),E.push(P)}),E},lP=function(S,w=0){var E=fr(S,["emsg"]);return E.map(A=>{var P=yb.parseEmsgBox(new Uint8Array(A)),k=TK(P.message_data);return{cueTime:yb.scaleTime(P.presentation_time,P.timescale,P.presentation_time_delta,w),duration:yb.scaleTime(P.event_duration,P.timescale),frames:k}})};var Sb={findBox:fr,parseType:Ic,timescale:iP,startTime:nP,compositionStartTime:aP,videoTrackIds:sP,tracks:oP,getTimescaleFromMediaHeader:_b,getEmsgID3:lP},Tb=Vg,uP=function(S){var w=S[1]&31;return w<<=8,w|=S[2],w},rm=function(S){return!!(S[1]&64)},im=function(S){var w=0;return(S[3]&48)>>>4>1&&(w+=S[4]+1),w},xK=function(S,w){var E=uP(S);return E===0?"pat":E===w?"pmt":w?"pes":null},wK=function(S){var w=rm(S),E=4+im(S);return w&&(E+=S[E]+1),(S[E+10]&31)<<8|S[E+11]},CK=function(S){var w={},E=rm(S),A=4+im(S);if(E&&(A+=S[A]+1),!!(S[A+5]&1)){var P,k,V;P=(S[A+1]&15)<<8|S[A+2],k=3+P-4,V=(S[A+10]&15)<<8|S[A+11];for(var z=12+V;z<k;){var G=A+z;w[(S[G+1]&31)<<8|S[G+2]]=S[G],z+=((S[G+3]&15)<<8|S[G+4])+5}return w}},AK=function(S,w){var E=uP(S),A=w[E];switch(A){case Tb.H264_STREAM_TYPE:return"video";case Tb.ADTS_STREAM_TYPE:return"audio";case Tb.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},DK=function(S){var w=rm(S);if(!w)return null;var E=4+im(S);if(E>=S.byteLength)return null;var A=null,P;return P=S[E+7],P&192&&(A={},A.pts=(S[E+9]&14)<<27|(S[E+10]&255)<<20|(S[E+11]&254)<<12|(S[E+12]&255)<<5|(S[E+13]&254)>>>3,A.pts*=4,A.pts+=(S[E+13]&6)>>>1,A.dts=A.pts,P&64&&(A.dts=(S[E+14]&14)<<27|(S[E+15]&255)<<20|(S[E+16]&254)<<12|(S[E+17]&255)<<5|(S[E+18]&254)>>>3,A.dts*=4,A.dts+=(S[E+18]&6)>>>1)),A},xb=function(S){switch(S){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}},EK=function(S){for(var w=4+im(S),E=S.subarray(w),A=0,P=0,k=!1,V;P<E.byteLength-3;P++)if(E[P+2]===1){A=P+5;break}for(;A<E.byteLength;)switch(E[A]){case 0:if(E[A-1]!==0){A+=2;break}else if(E[A-2]!==0){A++;break}P+3!==A-2&&(V=xb(E[P+3]&31),V==="slice_layer_without_partitioning_rbsp_idr"&&(k=!0));do A++;while(E[A]!==1&&A<E.length);P=A-2,A+=3;break;case 1:if(E[A-1]!==0||E[A-2]!==0){A+=3;break}V=xb(E[P+3]&31),V==="slice_layer_without_partitioning_rbsp_idr"&&(k=!0),P=A-2,A+=3;break;default:A+=3;break}return E=E.subarray(P),A-=P,P=0,E&&E.byteLength>3&&(V=xb(E[P+3]&31),V==="slice_layer_without_partitioning_rbsp_idr"&&(k=!0)),k},IK={parseType:xK,parsePat:wK,parsePmt:CK,parsePayloadUnitStartIndicator:rm,parsePesType:AK,parsePesTime:DK,videoPacketContainsKeyFrame:EK},cP=Vg,Pc=LI.handleRollover,kt={};kt.ts=IK,kt.aac=pb;var Al=Ft.ONE_SECOND_IN_TS,yi=188,ka=71,PK=function(S,w){for(var E=0,A=yi,P,k;A<S.byteLength;){if(S[E]===ka&&S[A]===ka){switch(P=S.subarray(E,A),k=kt.ts.parseType(P,w.pid),k){case"pat":w.pid=kt.ts.parsePat(P);break;case"pmt":var V=kt.ts.parsePmt(P);w.table=w.table||{},Object.keys(V).forEach(function(z){w.table[z]=V[z]});break}E+=yi,A+=yi;continue}E++,A++}},hP=function(S,w,E){for(var A=0,P=yi,k,V,z,G,W,Y=!1;P<=S.byteLength;){if(S[A]===ka&&(S[P]===ka||P===S.byteLength)){switch(k=S.subarray(A,P),V=kt.ts.parseType(k,w.pid),V){case"pes":z=kt.ts.parsePesType(k,w.table),G=kt.ts.parsePayloadUnitStartIndicator(k),z==="audio"&&G&&(W=kt.ts.parsePesTime(k),W&&(W.type="audio",E.audio.push(W),Y=!0));break}if(Y)break;A+=yi,P+=yi;continue}A++,P++}for(P=S.byteLength,A=P-yi,Y=!1;A>=0;){if(S[A]===ka&&(S[P]===ka||P===S.byteLength)){switch(k=S.subarray(A,P),V=kt.ts.parseType(k,w.pid),V){case"pes":z=kt.ts.parsePesType(k,w.table),G=kt.ts.parsePayloadUnitStartIndicator(k),z==="audio"&&G&&(W=kt.ts.parsePesTime(k),W&&(W.type="audio",E.audio.push(W),Y=!0));break}if(Y)break;A-=yi,P-=yi;continue}A--,P--}},MK=function(S,w,E){for(var A=0,P=yi,k,V,z,G,W,Y,ee,Te,le=!1,je={data:[],size:0};P<S.byteLength;){if(S[A]===ka&&S[P]===ka){switch(k=S.subarray(A,P),V=kt.ts.parseType(k,w.pid),V){case"pes":if(z=kt.ts.parsePesType(k,w.table),G=kt.ts.parsePayloadUnitStartIndicator(k),z==="video"&&(G&&!le&&(W=kt.ts.parsePesTime(k),W&&(W.type="video",E.video.push(W),le=!0)),!E.firstKeyFrame)){if(G&&je.size!==0){for(Y=new Uint8Array(je.size),ee=0;je.data.length;)Te=je.data.shift(),Y.set(Te,ee),ee+=Te.byteLength;if(kt.ts.videoPacketContainsKeyFrame(Y)){var tt=kt.ts.parsePesTime(Y);tt?(E.firstKeyFrame=tt,E.firstKeyFrame.type="video"):console.warn("Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.")}je.size=0}je.data.push(k),je.size+=k.byteLength}break}if(le&&E.firstKeyFrame)break;A+=yi,P+=yi;continue}A++,P++}for(P=S.byteLength,A=P-yi,le=!1;A>=0;){if(S[A]===ka&&S[P]===ka){switch(k=S.subarray(A,P),V=kt.ts.parseType(k,w.pid),V){case"pes":z=kt.ts.parsePesType(k,w.table),G=kt.ts.parsePayloadUnitStartIndicator(k),z==="video"&&G&&(W=kt.ts.parsePesTime(k),W&&(W.type="video",E.video.push(W),le=!0));break}if(le)break;A-=yi,P-=yi;continue}A--,P--}},LK=function(S,w){if(S.audio&&S.audio.length){var E=w;(typeof E>"u"||isNaN(E))&&(E=S.audio[0].dts),S.audio.forEach(function(k){k.dts=Pc(k.dts,E),k.pts=Pc(k.pts,E),k.dtsTime=k.dts/Al,k.ptsTime=k.pts/Al})}if(S.video&&S.video.length){var A=w;if((typeof A>"u"||isNaN(A))&&(A=S.video[0].dts),S.video.forEach(function(k){k.dts=Pc(k.dts,A),k.pts=Pc(k.pts,A),k.dtsTime=k.dts/Al,k.ptsTime=k.pts/Al}),S.firstKeyFrame){var P=S.firstKeyFrame;P.dts=Pc(P.dts,A),P.pts=Pc(P.pts,A),P.dtsTime=P.dts/Al,P.ptsTime=P.pts/Al}}},kK=function(S){for(var w=!1,E=0,A=null,P=null,k=0,V=0,z;S.length-V>=3;){var G=kt.aac.parseType(S,V);switch(G){case"timed-metadata":if(S.length-V<10){w=!0;break}if(k=kt.aac.parseId3TagSize(S,V),k>S.length){w=!0;break}P===null&&(z=S.subarray(V,V+k),P=kt.aac.parseAacTimestamp(z)),V+=k;break;case"audio":if(S.length-V<7){w=!0;break}if(k=kt.aac.parseAdtsSize(S,V),k>S.length){w=!0;break}A===null&&(z=S.subarray(V,V+k),A=kt.aac.parseSampleRate(z)),E++,V+=k;break;default:V++;break}if(w)return null}if(A===null||P===null)return null;var W=Al/A,Y={audio:[{type:"audio",dts:P,pts:P},{type:"audio",dts:P+E*1024*W,pts:P+E*1024*W}]};return Y},RK=function(S){var w={pid:null,table:null},E={};PK(S,w);for(var A in w.table)if(w.table.hasOwnProperty(A)){var P=w.table[A];switch(P){case cP.H264_STREAM_TYPE:E.video=[],MK(S,w,E),E.video.length===0&&delete E.video;break;case cP.ADTS_STREAM_TYPE:E.audio=[],hP(S,w,E),E.audio.length===0&&delete E.audio;break}}return E},OK=function(S,w){var E=kt.aac.isLikelyAacData(S),A;return E?A=kK(S):A=RK(S),!A||!A.audio&&!A.video?null:(LK(A,w),A)},NK={inspect:OK,parseAudioPes_:hP};const BK=function(S,w){w.on("data",function(E){const A=E.initSegment;E.initSegment={data:A.buffer,byteOffset:A.byteOffset,byteLength:A.byteLength};const P=E.data;E.data=P.buffer,S.postMessage({action:"data",segment:E,byteOffset:P.byteOffset,byteLength:P.byteLength},[E.data])}),w.on("done",function(E){S.postMessage({action:"done"})}),w.on("gopInfo",function(E){S.postMessage({action:"gopInfo",gopInfo:E})}),w.on("videoSegmentTimingInfo",function(E){const A={start:{decode:Ft.videoTsToSeconds(E.start.dts),presentation:Ft.videoTsToSeconds(E.start.pts)},end:{decode:Ft.videoTsToSeconds(E.end.dts),presentation:Ft.videoTsToSeconds(E.end.pts)},baseMediaDecodeTime:Ft.videoTsToSeconds(E.baseMediaDecodeTime)};E.prependedContentDuration&&(A.prependedContentDuration=Ft.videoTsToSeconds(E.prependedContentDuration)),S.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:A})}),w.on("audioSegmentTimingInfo",function(E){const A={start:{decode:Ft.videoTsToSeconds(E.start.dts),presentation:Ft.videoTsToSeconds(E.start.pts)},end:{decode:Ft.videoTsToSeconds(E.end.dts),presentation:Ft.videoTsToSeconds(E.end.pts)},baseMediaDecodeTime:Ft.videoTsToSeconds(E.baseMediaDecodeTime)};E.prependedContentDuration&&(A.prependedContentDuration=Ft.videoTsToSeconds(E.prependedContentDuration)),S.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:A})}),w.on("id3Frame",function(E){S.postMessage({action:"id3Frame",id3Frame:E})}),w.on("caption",function(E){S.postMessage({action:"caption",caption:E})}),w.on("trackinfo",function(E){S.postMessage({action:"trackinfo",trackInfo:E})}),w.on("audioTimingInfo",function(E){S.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:Ft.videoTsToSeconds(E.start),end:Ft.videoTsToSeconds(E.end)}})}),w.on("videoTimingInfo",function(E){S.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:Ft.videoTsToSeconds(E.start),end:Ft.videoTsToSeconds(E.end)}})}),w.on("log",function(E){S.postMessage({action:"log",log:E})})};class fP{constructor(w,E){this.options=E||{},this.self=w,this.init()}init(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new VY.Transmuxer(this.options),BK(this.self,this.transmuxer)}pushMp4Captions(w){this.captionParser||(this.captionParser=new cK,this.captionParser.init());const E=new Uint8Array(w.data,w.byteOffset,w.byteLength),A=this.captionParser.parse(E,w.trackIds,w.timescales);this.self.postMessage({action:"mp4Captions",captions:A&&A.captions||[],logs:A&&A.logs||[],data:E.buffer},[E.buffer])}probeMp4StartTime({timescales:w,data:E}){const A=Sb.startTime(w,E);this.self.postMessage({action:"probeMp4StartTime",startTime:A,data:E},[E.buffer])}probeMp4Tracks({data:w}){const E=Sb.tracks(w);this.self.postMessage({action:"probeMp4Tracks",tracks:E,data:w},[w.buffer])}probeEmsgID3({data:w,offset:E}){const A=Sb.getEmsgID3(w,E);this.self.postMessage({action:"probeEmsgID3",id3Frames:A,emsgData:w},[w.buffer])}probeTs({data:w,baseStartTime:E}){const A=typeof E=="number"&&!isNaN(E)?E*Ft.ONE_SECOND_IN_TS:void 0,P=NK.inspect(w,A);let k=null;P&&(k={hasVideo:P.video&&P.video.length===2||!1,hasAudio:P.audio&&P.audio.length===2||!1},k.hasVideo&&(k.videoStart=P.video[0].ptsTime),k.hasAudio&&(k.audioStart=P.audio[0].ptsTime)),this.self.postMessage({action:"probeTs",result:k,data:w},[w.buffer])}clearAllMp4Captions(){this.captionParser&&this.captionParser.clearAllCaptions()}clearParsedMp4Captions(){this.captionParser&&this.captionParser.clearParsedCaptions()}push(w){const E=new Uint8Array(w.data,w.byteOffset,w.byteLength);this.transmuxer.push(E)}reset(){this.transmuxer.reset()}setTimestampOffset(w){const E=w.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(Ft.secondsToVideoTs(E)))}setAudioAppendStart(w){this.transmuxer.setAudioAppendStart(Math.ceil(Ft.secondsToVideoTs(w.appendStart)))}setRemux(w){this.transmuxer.setRemux(w.remux)}flush(w){this.transmuxer.flush(),self.postMessage({action:"done",type:"transmuxed"})}endTimeline(){this.transmuxer.endTimeline(),self.postMessage({action:"endedtimeline",type:"transmuxed"})}alignGopsWith(w){this.transmuxer.alignGopsWith(w.gopsToAlignWith.slice())}}self.onmessage=function(S){if(S.data.action==="init"&&S.data.options){this.messageHandlers=new fP(self,S.data.options);return}this.messageHandlers||(this.messageHandlers=new fP(self)),S.data&&S.data.action&&S.data.action!=="init"&&this.messageHandlers[S.data.action]&&this.messageHandlers[S.data.action](S.data)}}));var Fie=oU(Bie);const Uie=(r,e,t)=>{const{type:i,initSegment:n,captions:a,captionStreams:s,metadata:o,videoFrameDtsTime:l,videoFramePtsTime:u}=r.data.segment;e.buffer.push({captions:a,captionStreams:s,metadata:o});const c=r.data.segment.boxes||{data:r.data.segment.data},h={type:i,data:new Uint8Array(c.data,c.data.byteOffset,c.data.byteLength),initSegment:new Uint8Array(n.data,n.byteOffset,n.byteLength)};typeof l<"u"&&(h.videoFrameDtsTime=l),typeof u<"u"&&(h.videoFramePtsTime=u),t(h)},Vie=({transmuxedData:r,callback:e})=>{r.buffer=[],e(r)},zie=(r,e)=>{e.gopInfo=r.data.gopInfo},cU=r=>{const{transmuxer:e,bytes:t,audioAppendStart:i,gopsToAlignWith:n,remux:a,onData:s,onTrackInfo:o,onAudioTimingInfo:l,onVideoTimingInfo:u,onVideoSegmentTimingInfo:c,onAudioSegmentTimingInfo:h,onId3:d,onCaptions:f,onDone:p,onEndedTimeline:v,onTransmuxerLog:g,isEndOfTimeline:m,segment:y,triggerSegmentEventFn:_}=r,b={buffer:[]};let T=m;const x=D=>{e.currentTransmux===r&&(D.data.action==="data"&&Uie(D,b,s),D.data.action==="trackinfo"&&o(D.data.trackInfo),D.data.action==="gopInfo"&&zie(D,b),D.data.action==="audioTimingInfo"&&l(D.data.audioTimingInfo),D.data.action==="videoTimingInfo"&&u(D.data.videoTimingInfo),D.data.action==="videoSegmentTimingInfo"&&c(D.data.videoSegmentTimingInfo),D.data.action==="audioSegmentTimingInfo"&&h(D.data.audioSegmentTimingInfo),D.data.action==="id3Frame"&&d([D.data.id3Frame],D.data.id3Frame.dispatchType),D.data.action==="caption"&&f(D.data.caption),D.data.action==="endedtimeline"&&(T=!1,v()),D.data.action==="log"&&g(D.data.log),D.data.type==="transmuxed"&&(T||(e.onmessage=null,Vie({transmuxedData:b,callback:p}),hU(e))))},C=()=>{const D={message:"Received an error message from the transmuxer worker",metadata:{errorType:K.Error.StreamingFailedToTransmuxSegment,segmentInfo:fu({segment:y})}};p(null,D)};if(e.onmessage=x,e.onerror=C,i&&e.postMessage({action:"setAudioAppendStart",appendStart:i}),Array.isArray(n)&&e.postMessage({action:"alignGopsWith",gopsToAlignWith:n}),typeof a<"u"&&e.postMessage({action:"setRemux",remux:a}),t.byteLength){const D=t instanceof ArrayBuffer?t:t.buffer,I=t instanceof ArrayBuffer?0:t.byteOffset;_({type:"segmenttransmuxingstart",segment:y}),e.postMessage({action:"push",data:D,byteOffset:I,byteLength:t.byteLength},[D])}m&&e.postMessage({action:"endTimeline"}),e.postMessage({action:"flush"})},hU=r=>{r.currentTransmux=null,r.transmuxQueue.length&&(r.currentTransmux=r.transmuxQueue.shift(),typeof r.currentTransmux=="function"?r.currentTransmux():cU(r.currentTransmux))},qM=(r,e)=>{r.postMessage({action:e}),hU(r)},fU=(r,e)=>{if(!e.currentTransmux){e.currentTransmux=r,qM(e,r);return}e.transmuxQueue.push(qM.bind(null,e,r))},Gie=r=>{fU("reset",r)},Hie=r=>{fU("endTimeline",r)},dU=r=>{if(!r.transmuxer.currentTransmux){r.transmuxer.currentTransmux=r,cU(r);return}r.transmuxer.transmuxQueue.push(r)},$ie=r=>{const e=new Fie;e.currentTransmux=null,e.transmuxQueue=[];const t=e.terminate;return e.terminate=()=>(e.currentTransmux=null,e.transmuxQueue.length=0,t.call(e)),e.postMessage({action:"init",options:r}),e};var Yb={reset:Gie,endTimeline:Hie,transmux:dU,createTransmuxer:$ie};const kp=function(r){const e=r.transmuxer,t=r.endAction||r.action,i=r.callback,n=or({},r,{endAction:null,transmuxer:null,callback:null}),a=s=>{s.data.action===t&&(e.removeEventListener("message",a),s.data.data&&(s.data.data=new Uint8Array(s.data.data,r.byteOffset||0,r.byteLength||s.data.data.byteLength),r.data&&(r.data=s.data.data)),i(s.data))};if(e.addEventListener("message",a),r.data){const s=r.data instanceof ArrayBuffer;n.byteOffset=s?0:r.data.byteOffset,n.byteLength=r.data.byteLength;const o=[s?r.data:r.data.buffer];e.postMessage(n,o)}else e.postMessage(n)},Qa={FAILURE:2,TIMEOUT:-101,ABORTED:-102},gw=r=>{r.forEach(e=>{e.abort()})},Wie=r=>({bandwidth:r.bandwidth,bytesReceived:r.bytesReceived||0,roundTripTime:r.roundTripTime||0}),qie=r=>{const e=r.target,i={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-e.requestTime||0};return i.bytesReceived=r.loaded,i.bandwidth=Math.floor(i.bytesReceived/i.roundTripTime*8*1e3),i},BA=(r,e)=>{const{requestType:t}=e,i=Nu({requestType:t,request:e,error:r});return e.timedout?{status:e.status,message:"HLS request timed-out at URL: "+e.uri,code:Qa.TIMEOUT,xhr:e,metadata:i}:e.aborted?{status:e.status,message:"HLS request aborted at URL: "+e.uri,code:Qa.ABORTED,xhr:e,metadata:i}:r?{status:e.status,message:"HLS request errored at URL: "+e.uri,code:Qa.FAILURE,xhr:e,metadata:i}:e.responseType==="arraybuffer"&&e.response.byteLength===0?{status:e.status,message:"Empty HLS response at URL: "+e.uri,code:Qa.FAILURE,xhr:e,metadata:i}:null},jM=(r,e,t,i)=>(n,a)=>{const s=a.response,o=BA(n,a);if(o)return t(o,r);if(s.byteLength!==16)return t({status:a.status,message:"Invalid HLS key at URL: "+a.uri,code:Qa.FAILURE,xhr:a},r);const l=new DataView(s),u=new Uint32Array([l.getUint32(0),l.getUint32(4),l.getUint32(8),l.getUint32(12)]);for(let h=0;h<e.length;h++)e[h].bytes=u;const c={uri:a.uri};return i({type:"segmentkeyloadcomplete",segment:r,keyInfo:c}),t(null,r)},pU=(r,e)=>{const t=rA(r.map.bytes);if(t!=="mp4"){const i=r.map.resolvedUri||r.map.uri,n=t||"unknown";return e({internal:!0,message:`Found unsupported ${n} container for initialization segment at URL: ${i}`,code:Qa.FAILURE,metadata:{mediaType:n}})}kp({action:"probeMp4Tracks",data:r.map.bytes,transmuxer:r.transmuxer,callback:({tracks:i,data:n})=>(r.map.bytes=n,i.forEach(function(a){r.map.tracks=r.map.tracks||{},!r.map.tracks[a.type]&&(r.map.tracks[a.type]=a,typeof a.id=="number"&&a.timescale&&(r.map.timescales=r.map.timescales||{},r.map.timescales[a.id]=a.timescale))}),e(null))})},jie=({segment:r,finishProcessingFn:e,triggerSegmentEventFn:t})=>(i,n)=>{const a=BA(i,n);if(a)return e(a,r);const s=new Uint8Array(n.response);if(t({type:"segmentloaded",segment:r}),r.map.key)return r.map.encryptedBytes=s,e(null,r);r.map.bytes=s,pU(r,function(o){if(o)return o.xhr=n,o.status=n.status,e(o,r);e(null,r)})},Xie=({segment:r,finishProcessingFn:e,responseType:t,triggerSegmentEventFn:i})=>(n,a)=>{const s=BA(n,a);if(s)return e(s,r);i({type:"segmentloaded",segment:r});const o=t==="arraybuffer"||!a.responseText?a.response:Oie(a.responseText.substring(r.lastReachedChar||0));return r.stats=Wie(a),r.key?r.encryptedBytes=new Uint8Array(o):r.bytes=new Uint8Array(o),e(null,r)},Yie=({segment:r,bytes:e,trackInfoFn:t,timingInfoFn:i,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:a,id3Fn:s,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:u,dataFn:c,doneFn:h,onTransmuxerLog:d,triggerSegmentEventFn:f})=>{const p=r.map&&r.map.tracks||{},v=!!(p.audio&&p.video);let g=i.bind(null,r,"audio","start");const m=i.bind(null,r,"audio","end");let y=i.bind(null,r,"video","start");const _=i.bind(null,r,"video","end"),b=()=>dU({bytes:e,transmuxer:r.transmuxer,audioAppendStart:r.audioAppendStart,gopsToAlignWith:r.gopsToAlignWith,remux:v,onData:T=>{T.type=T.type==="combined"?"video":T.type,c(r,T)},onTrackInfo:T=>{t&&(v&&(T.isMuxed=!0),t(r,T))},onAudioTimingInfo:T=>{g&&typeof T.start<"u"&&(g(T.start),g=null),m&&typeof T.end<"u"&&m(T.end)},onVideoTimingInfo:T=>{y&&typeof T.start<"u"&&(y(T.start),y=null),_&&typeof T.end<"u"&&_(T.end)},onVideoSegmentTimingInfo:T=>{const x={pts:{start:T.start.presentation,end:T.end.presentation},dts:{start:T.start.decode,end:T.end.decode}};f({type:"segmenttransmuxingtiminginfoavailable",segment:r,timingInfo:x}),n(T)},onAudioSegmentTimingInfo:T=>{const x={pts:{start:T.start.pts,end:T.end.pts},dts:{start:T.start.dts,end:T.end.dts}};f({type:"segmenttransmuxingtiminginfoavailable",segment:r,timingInfo:x}),a(T)},onId3:(T,x)=>{s(r,T,x)},onCaptions:T=>{o(r,[T])},isEndOfTimeline:l,onEndedTimeline:()=>{u()},onTransmuxerLog:d,onDone:(T,x)=>{h&&(T.type=T.type==="combined"?"video":T.type,f({type:"segmenttransmuxingcomplete",segment:r}),h(x,r,T))},segment:r,triggerSegmentEventFn:f});kp({action:"probeTs",transmuxer:r.transmuxer,data:e,baseStartTime:r.baseStartTime,callback:T=>{r.bytes=e=T.data;const x=T.result;x&&(t(r,{hasAudio:x.hasAudio,hasVideo:x.hasVideo,isMuxed:v}),t=null),b()}})},vU=({segment:r,bytes:e,trackInfoFn:t,timingInfoFn:i,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:a,id3Fn:s,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:u,dataFn:c,doneFn:h,onTransmuxerLog:d,triggerSegmentEventFn:f})=>{let p=new Uint8Array(e);if(_te(p)){r.isFmp4=!0;const{tracks:v}=r.map,g={isFmp4:!0,hasVideo:!!v.video,hasAudio:!!v.audio};v.audio&&v.audio.codec&&v.audio.codec!=="enca"&&(g.audioCodec=v.audio.codec),v.video&&v.video.codec&&v.video.codec!=="encv"&&(g.videoCodec=v.video.codec),v.video&&v.audio&&(g.isMuxed=!0),t(r,g);const m=(y,_)=>{c(r,{data:p,type:g.hasAudio&&!g.isMuxed?"audio":"video"}),_&&_.length&&s(r,_),y&&y.length&&o(r,y),h(null,r,{})};kp({action:"probeMp4StartTime",timescales:r.map.timescales,data:p,transmuxer:r.transmuxer,callback:({data:y,startTime:_})=>{e=y.buffer,r.bytes=p=y,g.hasAudio&&!g.isMuxed&&i(r,"audio","start",_),g.hasVideo&&i(r,"video","start",_),kp({action:"probeEmsgID3",data:p,transmuxer:r.transmuxer,offset:_,callback:({emsgData:b,id3Frames:T})=>{if(e=b.buffer,r.bytes=p=b,!v.video||!b.byteLength||!r.transmuxer){m(void 0,T);return}kp({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:r.transmuxer,data:p,timescales:r.map.timescales,trackIds:[v.video.id],callback:x=>{e=x.data.buffer,r.bytes=p=x.data,x.logs.forEach(function(C){d(Pt(C,{stream:"mp4CaptionParser"}))}),m(x.captions,T)}})}})}});return}if(!r.transmuxer){h(null,r,{});return}if(typeof r.container>"u"&&(r.container=rA(p)),r.container!=="ts"&&r.container!=="aac"){t(r,{hasAudio:!1,hasVideo:!1}),h(null,r,{});return}Yie({segment:r,bytes:e,trackInfoFn:t,timingInfoFn:i,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:a,id3Fn:s,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:u,dataFn:c,doneFn:h,onTransmuxerLog:d,triggerSegmentEventFn:f})},gU=function({id:r,key:e,encryptedBytes:t,decryptionWorker:i,segment:n,doneFn:a},s){const o=u=>{if(u.data.source===r){i.removeEventListener("message",o);const c=u.data.decrypted;s(new Uint8Array(c.bytes,c.byteOffset,c.byteLength))}};i.onerror=()=>{const u="An error occurred in the decryption worker",c=fu({segment:n}),h={message:u,metadata:{error:new Error(u),errorType:K.Error.StreamingFailedToDecryptSegment,segmentInfo:c,keyInfo:{uri:n.key.resolvedUri||n.map.key.resolvedUri}}};a(h,n)},i.addEventListener("message",o);let l;e.bytes.slice?l=e.bytes.slice():l=new Uint32Array(Array.prototype.slice.call(e.bytes)),i.postMessage(tU({source:r,encrypted:t,key:l,iv:e.iv}),[t.buffer,l.buffer])},Kie=({decryptionWorker:r,segment:e,trackInfoFn:t,timingInfoFn:i,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:a,id3Fn:s,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:u,dataFn:c,doneFn:h,onTransmuxerLog:d,triggerSegmentEventFn:f})=>{f({type:"segmentdecryptionstart"}),gU({id:e.requestId,key:e.key,encryptedBytes:e.encryptedBytes,decryptionWorker:r,segment:e,doneFn:h},p=>{e.bytes=p,f({type:"segmentdecryptioncomplete",segment:e}),vU({segment:e,bytes:e.bytes,trackInfoFn:t,timingInfoFn:i,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:a,id3Fn:s,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:u,dataFn:c,doneFn:h,onTransmuxerLog:d,triggerSegmentEventFn:f})})},Zie=({activeXhrs:r,decryptionWorker:e,trackInfoFn:t,timingInfoFn:i,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:a,id3Fn:s,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:u,dataFn:c,doneFn:h,onTransmuxerLog:d,triggerSegmentEventFn:f})=>{let p=0,v=!1;return(g,m)=>{if(!v){if(g)return v=!0,gw(r),h(g,m);if(p+=1,p===r.length){const y=function(){if(m.encryptedBytes)return Kie({decryptionWorker:e,segment:m,trackInfoFn:t,timingInfoFn:i,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:a,id3Fn:s,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:u,dataFn:c,doneFn:h,onTransmuxerLog:d,triggerSegmentEventFn:f});vU({segment:m,bytes:m.bytes,trackInfoFn:t,timingInfoFn:i,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:a,id3Fn:s,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:u,dataFn:c,doneFn:h,onTransmuxerLog:d,triggerSegmentEventFn:f})};if(m.endOfAllRequests=Date.now(),m.map&&m.map.encryptedBytes&&!m.map.bytes)return f({type:"segmentdecryptionstart",segment:m}),gU({decryptionWorker:e,id:m.requestId+"-init",encryptedBytes:m.map.encryptedBytes,key:m.map.key,segment:m,doneFn:h},_=>{m.map.bytes=_,f({type:"segmentdecryptioncomplete",segment:m}),pU(m,b=>{if(b)return gw(r),h(b,m);y()})});y()}}}},Qie=({loadendState:r,abortFn:e})=>t=>{t.target.aborted&&e&&!r.calledAbortFn&&(e(),r.calledAbortFn=!0)},Jie=({segment:r,progressFn:e,trackInfoFn:t,timingInfoFn:i,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:a,id3Fn:s,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:u,dataFn:c})=>h=>{if(!h.target.aborted)return r.stats=Pt(r.stats,qie(h)),!r.stats.firstBytesReceivedAt&&r.stats.bytesReceived&&(r.stats.firstBytesReceivedAt=Date.now()),e(h,r)},ene=({xhr:r,xhrOptions:e,decryptionWorker:t,segment:i,abortFn:n,progressFn:a,trackInfoFn:s,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:u,id3Fn:c,captionsFn:h,isEndOfTimeline:d,endedTimelineFn:f,dataFn:p,doneFn:v,onTransmuxerLog:g,triggerSegmentEventFn:m})=>{const y=[],_=Zie({activeXhrs:y,decryptionWorker:t,trackInfoFn:s,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:u,id3Fn:c,captionsFn:h,isEndOfTimeline:d,endedTimelineFn:f,dataFn:p,doneFn:v,onTransmuxerLog:g,triggerSegmentEventFn:m});if(i.key&&!i.key.bytes){const D=[i.key];i.map&&!i.map.bytes&&i.map.key&&i.map.key.resolvedUri===i.key.resolvedUri&&D.push(i.map.key);const I=Pt(e,{uri:i.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),M=jM(i,D,_,m),L={uri:i.key.resolvedUri};m({type:"segmentkeyloadstart",segment:i,keyInfo:L});const N=r(I,M);y.push(N)}if(i.map&&!i.map.bytes){if(i.map.key&&(!i.key||i.key.resolvedUri!==i.map.key.resolvedUri)){const N=Pt(e,{uri:i.map.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),O=jM(i,[i.map.key],_,m),B={uri:i.map.key.resolvedUri};m({type:"segmentkeyloadstart",segment:i,keyInfo:B});const F=r(N,O);y.push(F)}const I=Pt(e,{uri:i.map.resolvedUri,responseType:"arraybuffer",headers:pw(i.map),requestType:"segment-media-initialization"}),M=jie({segment:i,finishProcessingFn:_,triggerSegmentEventFn:m});m({type:"segmentloadstart",segment:i});const L=r(I,M);y.push(L)}const b=Pt(e,{uri:i.part&&i.part.resolvedUri||i.resolvedUri,responseType:"arraybuffer",headers:pw(i),requestType:"segment"}),T=Xie({segment:i,finishProcessingFn:_,responseType:b.responseType,triggerSegmentEventFn:m});m({type:"segmentloadstart",segment:i});const x=r(b,T);x.addEventListener("progress",Jie({segment:i,progressFn:a,trackInfoFn:s,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:u,id3Fn:c,captionsFn:h,isEndOfTimeline:d,endedTimelineFn:f,dataFn:p})),y.push(x);const C={};return y.forEach(D=>{D.addEventListener("loadend",Qie({loadendState:C,abortFn:n}))}),()=>gw(y)},tne=ea("CodecUtils"),rne=function(r){const e=r.attributes||{};if(e.CODECS)return Ga(e.CODECS)},mU=(r,e)=>{const t=e.attributes||{};return r&&r.mediaGroups&&r.mediaGroups.AUDIO&&t.AUDIO&&r.mediaGroups.AUDIO[t.AUDIO]},ine=(r,e)=>{if(!mU(r,e))return!0;const t=e.attributes||{},i=r.mediaGroups.AUDIO[t.AUDIO];for(const n in i)if(!i[n].uri&&!i[n].playlists)return!0;return!1},x0=function(r){const e={};return r.forEach(({mediaType:t,type:i,details:n})=>{e[t]=e[t]||[],e[t].push(C4(`${i}${n}`))}),Object.keys(e).forEach(function(t){if(e[t].length>1){tne(`multiple ${t} codecs found as attributes: ${e[t].join(", ")}. Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs.`),e[t]=null;return}e[t]=e[t][0]}),e},XM=function(r){let e=0;return r.audio&&e++,r.video&&e++,e},Rp=function(r,e){const t=e.attributes||{},i=x0(rne(e)||[]);if(mU(r,e)&&!i.audio&&!ine(r,e)){const n=x0(SJ(r,t.AUDIO)||[]);n.audio&&(i.audio=n.audio)}return i},cm=ea("PlaylistSelector"),YM=function(r){if(!r||!r.playlist)return;const e=r.playlist;return JSON.stringify({id:e.id,bandwidth:r.bandwidth,width:r.width,height:r.height,codecs:e.attributes&&e.attributes.CODECS||""})},w0=function(r,e){if(!r)return"";const t=H.getComputedStyle(r);return t?t[e]:""},kh=function(r,e){const t=r.slice();r.sort(function(i,n){const a=e(i,n);return a===0?t.indexOf(i)-t.indexOf(n):a})},FA=function(r,e){let t,i;return r.attributes.BANDWIDTH&&(t=r.attributes.BANDWIDTH),t=t||H.Number.MAX_VALUE,e.attributes.BANDWIDTH&&(i=e.attributes.BANDWIDTH),i=i||H.Number.MAX_VALUE,t-i},nne=function(r,e){let t,i;return r.attributes.RESOLUTION&&r.attributes.RESOLUTION.width&&(t=r.attributes.RESOLUTION.width),t=t||H.Number.MAX_VALUE,e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(i=e.attributes.RESOLUTION.width),i=i||H.Number.MAX_VALUE,t===i&&r.attributes.BANDWIDTH&&e.attributes.BANDWIDTH?r.attributes.BANDWIDTH-e.attributes.BANDWIDTH:t-i};let yU=function(r,e,t,i,n,a){if(!r)return;const s={bandwidth:e,width:t,height:i,limitRenditionByPlayerDimensions:n};let o=r.playlists;$i.isAudioOnly(r)&&(o=a.getAudioTrackPlaylists_(),s.audioOnly=!0);let l=o.map(T=>{let x;const C=T.attributes&&T.attributes.RESOLUTION&&T.attributes.RESOLUTION.width,D=T.attributes&&T.attributes.RESOLUTION&&T.attributes.RESOLUTION.height;return x=T.attributes&&T.attributes.BANDWIDTH,x=x||H.Number.MAX_VALUE,{bandwidth:x,width:C,height:D,playlist:T}});kh(l,(T,x)=>T.bandwidth-x.bandwidth),l=l.filter(T=>!$i.isIncompatible(T.playlist));let u=l.filter(T=>$i.isEnabled(T.playlist));u.length||(u=l.filter(T=>!$i.isDisabled(T.playlist)));const c=u.filter(T=>T.bandwidth*Vr.BANDWIDTH_VARIANCE<e);let h=c[c.length-1];const d=c.filter(T=>T.bandwidth===h.bandwidth)[0];if(n===!1){const T=d||u[0]||l[0];if(T&&T.playlist){let x="sortedPlaylistReps";return d&&(x="bandwidthBestRep"),u[0]&&(x="enabledPlaylistReps"),cm(`choosing ${YM(T)} using ${x} with options`,s),T.playlist}return cm("could not choose a playlist with options",s),null}const f=c.filter(T=>T.width&&T.height);kh(f,(T,x)=>T.width-x.width);const p=f.filter(T=>T.width===t&&T.height===i);h=p[p.length-1];const v=p.filter(T=>T.bandwidth===h.bandwidth)[0];let g,m,y;v||(g=f.filter(T=>T.width>t||T.height>i),m=g.filter(T=>T.width===g[0].width&&T.height===g[0].height),h=m[m.length-1],y=m.filter(T=>T.bandwidth===h.bandwidth)[0]);let _;if(a.leastPixelDiffSelector){const T=f.map(x=>(x.pixelDiff=Math.abs(x.width-t)+Math.abs(x.height-i),x));kh(T,(x,C)=>x.pixelDiff===C.pixelDiff?C.bandwidth-x.bandwidth:x.pixelDiff-C.pixelDiff),_=T[0]}const b=_||y||v||d||u[0]||l[0];if(b&&b.playlist){let T="sortedPlaylistReps";return _?T="leastPixelDiffRep":y?T="resolutionPlusOneRep":v?T="resolutionBestRep":d?T="bandwidthBestRep":u[0]&&(T="enabledPlaylistReps"),cm(`choosing ${YM(b)} using ${T} with options`,s),b.playlist}return cm("could not choose a playlist with options",s),null};const KM=function(){let r=this.useDevicePixelRatio&&H.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(r=this.customPixelRatio),yU(this.playlists.main,this.systemBandwidth,parseInt(w0(this.tech_.el(),"width"),10)*r,parseInt(w0(this.tech_.el(),"height"),10)*r,this.limitRenditionByPlayerDimensions,this.playlistController_)},ane=function(r){let e=-1,t=-1;if(r<0||r>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){let i=this.useDevicePixelRatio&&H.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(i=this.customPixelRatio),e<0&&(e=this.systemBandwidth,t=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==t&&(e=r*this.systemBandwidth+(1-r)*e,t=this.systemBandwidth),yU(this.playlists.main,e,parseInt(w0(this.tech_.el(),"width"),10)*i,parseInt(w0(this.tech_.el(),"height"),10)*i,this.limitRenditionByPlayerDimensions,this.playlistController_)}},sne=function(r){const{main:e,currentTime:t,bandwidth:i,duration:n,segmentDuration:a,timeUntilRebuffer:s,currentTimeline:o,syncController:l}=r,u=e.playlists.filter(p=>!$i.isIncompatible(p));let c=u.filter($i.isEnabled);c.length||(c=u.filter(p=>!$i.isDisabled(p)));const d=c.filter($i.hasAttribute.bind(null,"BANDWIDTH")).map(p=>{const g=l.getSyncPoint(p,n,o,t)?1:2,y=$i.estimateSegmentRequestTime(a,i,p)*g-s;return{playlist:p,rebufferingImpact:y}}),f=d.filter(p=>p.rebufferingImpact<=0);return kh(f,(p,v)=>FA(v.playlist,p.playlist)),f.length?f[0]:(kh(d,(p,v)=>p.rebufferingImpact-v.rebufferingImpact),d[0]||null)},one=function(){const r=this.playlists.main.playlists.filter($i.isEnabled);return kh(r,(t,i)=>FA(t,i)),r.filter(t=>!!Rp(this.playlists.main,t).video)[0]||null},lne=r=>{let e=0,t;return r.bytes&&(t=new Uint8Array(r.bytes),r.segments.forEach(i=>{t.set(i,e),e+=i.byteLength})),t};function _U(r){try{return new URL(r).pathname.split("/").slice(-2).join("/")}catch{return""}}const une=function(r,e,t){if(!r[t]){e.trigger({type:"usage",name:"vhs-608"});let i=t;/^cc708_/.test(t)&&(i="SERVICE"+t.split("_")[1]);const n=e.textTracks().getTrackById(i);if(n)r[t]=n;else{const a=e.options_.vhs&&e.options_.vhs.captionServices||{};let s=t,o=t,l=!1;const u=a[i];u&&(s=u.label,o=u.language,l=u.default),r[t]=e.addRemoteTextTrack({kind:"captions",id:i,default:l,label:s,language:o},!1).track}}},cne=function({inbandTextTracks:r,captionArray:e,timestampOffset:t}){if(!e)return;const i=H.WebKitDataCue||H.VTTCue;e.forEach(n=>{const a=n.stream;n.content?n.content.forEach(s=>{const o=new i(n.startTime+t,n.endTime+t,s.text);o.line=s.line,o.align="left",o.position=s.position,o.positionAlign="line-left",r[a].addCue(o)}):r[a].addCue(new i(n.startTime+t,n.endTime+t,n.text))})},hne=function(r){Object.defineProperties(r.frame,{id:{get(){return K.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),r.value.key}},value:{get(){return K.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),r.value.data}},privateData:{get(){return K.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),r.value.data}}})},fne=({inbandTextTracks:r,metadataArray:e,timestampOffset:t,videoDuration:i})=>{if(!e)return;const n=H.WebKitDataCue||H.VTTCue,a=r.metadataTrack_;if(!a||(e.forEach(c=>{const h=c.cueTime+t;typeof h!="number"||H.isNaN(h)||h<0||!(h<1/0)||!c.frames||!c.frames.length||c.frames.forEach(d=>{const f=new n(h,h,d.value||d.url||d.data||"");f.frame=d,f.value=d,hne(f),a.addCue(f)})}),!a.cues||!a.cues.length))return;const s=a.cues,o=[];for(let c=0;c<s.length;c++)s[c]&&o.push(s[c]);const l=o.reduce((c,h)=>{const d=c[h.startTime]||[];return d.push(h),c[h.startTime]=d,c},{}),u=Object.keys(l).sort((c,h)=>Number(c)-Number(h));u.forEach((c,h)=>{const d=l[c],f=isFinite(i)?i:c,p=Number(u[h+1])||f;d.forEach(v=>{v.endTime=p})})},dne={id:"ID",class:"CLASS",startDate:"START-DATE",duration:"DURATION",endDate:"END-DATE",endOnNext:"END-ON-NEXT",plannedDuration:"PLANNED-DURATION",scte35Out:"SCTE35-OUT",scte35In:"SCTE35-IN"},pne=new Set(["id","class","startDate","duration","endDate","endOnNext","startTime","endTime","processDateRange"]),vne=({inbandTextTracks:r,dateRanges:e})=>{const t=r.metadataTrack_;if(!t)return;const i=H.WebKitDataCue||H.VTTCue;e.forEach(n=>{for(const a of Object.keys(n)){if(pne.has(a))continue;const s=new i(n.startTime,n.endTime,"");s.id=n.id,s.type="com.apple.quicktime.HLS",s.value={key:dne[a],data:n[a]},(a==="scte35Out"||a==="scte35In")&&(s.value.data=new Uint8Array(s.value.data.match(/[\da-f]{2}/gi)).buffer),t.addCue(s)}n.processDateRange()})},ZM=(r,e,t)=>{r.metadataTrack_||(r.metadataTrack_=t.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,K.browser.IS_ANY_SAFARI||(r.metadataTrack_.inBandMetadataTrackDispatchType=e))},op=function(r,e,t){let i,n;if(t&&t.cues)for(i=t.cues.length;i--;)n=t.cues[i],n.startTime>=r&&n.endTime<=e&&t.removeCue(n)},gne=function(r){const e=r.cues;if(!e)return;const t={};for(let i=e.length-1;i>=0;i--){const n=e[i],a=`${n.startTime}-${n.endTime}-${n.text}`;t[a]?r.removeCue(n):t[a]=n}},mne=(r,e,t)=>{if(typeof e>"u"||e===null||!r.length)return[];const i=Math.ceil((e-t+3)*bu.ONE_SECOND_IN_TS);let n;for(n=0;n<r.length&&!(r[n].pts>i);n++);return r.slice(n)},yne=(r,e,t)=>{if(!e.length)return r;if(t)return e.slice();const i=e[0].pts;let n=0;for(n;n<r.length&&!(r[n].pts>=i);n++);return r.slice(0,n).concat(e)},_ne=(r,e,t,i)=>{const n=Math.ceil((e-i)*bu.ONE_SECOND_IN_TS),a=Math.ceil((t-i)*bu.ONE_SECOND_IN_TS),s=r.slice();let o=r.length;for(;o--&&!(r[o].pts<=a););if(o===-1)return s;let l=o+1;for(;l--&&!(r[l].pts<=n););return l=Math.max(l,0),s.splice(l,o-l+1),s},bne=function(r,e){if(!r&&!e||!r&&e||r&&!e)return!1;if(r===e)return!0;const t=Object.keys(r).sort(),i=Object.keys(e).sort();if(t.length!==i.length)return!1;for(let n=0;n<t.length;n++){const a=t[n];if(a!==i[n]||r[a]!==e[a])return!1}return!0},Sne=function(r,e,t){e=e||[];const i=[];let n=0;for(let a=0;a<e.length;a++){const s=e[a];if(r===s.timeline&&(i.push(a),n+=s.duration,n>t))return a}return i.length===0?0:i[i.length-1]},wd=1,Tne=500,QM=r=>typeof r=="number"&&isFinite(r),hm=1/60,xne=(r,e,t)=>r!=="main"||!e||!t?null:!t.hasAudio&&!t.hasVideo?"Neither audio nor video found in segment.":e.hasVideo&&!t.hasVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!e.hasVideo&&t.hasVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null,wne=(r,e,t)=>{let i=e-Vr.BACK_BUFFER_LENGTH;r.length&&(i=Math.max(i,r.start(0)));const n=e-t;return Math.min(n,i)},Bc=r=>{const{startOfSegment:e,duration:t,segment:i,part:n,playlist:{mediaSequence:a,id:s,segments:o=[]},mediaIndex:l,partIndex:u,timeline:c}=r,h=o.length-1;let d="mediaIndex/partIndex increment";r.getMediaInfoForTime?d=`getMediaInfoForTime (${r.getMediaInfoForTime})`:r.isSyncRequest&&(d="getSyncSegmentCandidate (isSyncRequest)"),r.independent&&(d+=` with independent ${r.independent}`);const f=typeof u=="number",p=r.segment.uri?"segment":"pre-segment",v=f?U8({preloadSegment:i})-1:0;return`${p} [${a+l}/${a+h}]`+(f?` part [${u}/${v}]`:"")+` segment start/end [${i.start} => ${i.end}]`+(f?` part start/end [${n.start} => ${n.end}]`:"")+` startOfSegment [${e}] duration [${t}] timeline [${c}] selected by [${d}] playlist [${s}]`},JM=r=>`${r}TimingInfo`,Cne=({segmentTimeline:r,currentTimeline:e,startOfSegment:t,buffered:i,overrideCheck:n})=>!n&&r===e?null:r<e?t:i.length?i.end(i.length-1):t,mw=({timelineChangeController:r,currentTimeline:e,segmentTimeline:t,loaderType:i,audioDisabled:n})=>{if(e===t)return!1;if(i==="audio"){const a=r.lastTimelineChange({type:"main"});return!a||a.to!==t}if(i==="main"&&n){const a=r.pendingTimelineChange({type:"audio"});return!(a&&a.to===t)}return!1},Ane=r=>{if(!r)return!1;const e=r.pendingTimelineChange({type:"audio"}),t=r.pendingTimelineChange({type:"main"}),i=e&&t,n=i&&e.to!==t.to;return!!(i&&e.from!==-1&&t.from!==-1&&n)},Dne=r=>{r&&(r.pause(),r.resetEverything(),r.load())},Ene=r=>{const e=r.timelineChangeController_.pendingTimelineChange({type:"audio"}),t=r.timelineChangeController_.pendingTimelineChange({type:"main"});return e&&t&&e.to<t.to},mo=r=>{const e=r.pendingSegment_;if(!e)return;if(mw({timelineChangeController:r.timelineChangeController_,currentTimeline:r.currentTimeline_,segmentTimeline:e.timeline,loaderType:r.loaderType_,audioDisabled:r.audioDisabled_})&&Ane(r.timelineChangeController_)){if(Ene(r)){r.timelineChangeController_.trigger("audioTimelineBehind");return}Dne(r)}},Ine=r=>{let e=0;return["video","audio"].forEach(function(t){const i=r[`${t}TimingInfo`];if(!i)return;const{start:n,end:a}=i;let s;typeof n=="bigint"||typeof a=="bigint"?s=H.BigInt(a)-H.BigInt(n):typeof n=="number"&&typeof a=="number"&&(s=a-n),typeof s<"u"&&s>e&&(e=s)}),typeof e=="bigint"&&e<Number.MAX_SAFE_INTEGER&&(e=Number(e)),e},eL=({segmentDuration:r,maxDuration:e})=>r?Math.round(r)>e+Ka:!1,Pne=(r,e)=>{if(e!=="hls")return null;const t=Ine({audioTimingInfo:r.audioTimingInfo,videoTimingInfo:r.videoTimingInfo});if(!t)return null;const i=r.playlist.targetDuration,n=eL({segmentDuration:t,maxDuration:i*2}),a=eL({segmentDuration:t,maxDuration:i}),s=`Segment with index ${r.mediaIndex} from playlist ${r.playlist.id} has a duration of ${t} when the reported duration is ${r.duration} and the target duration is ${i}. For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1`;return n||a?{severity:n?"warn":"info",message:s}:null},fu=({type:r,segment:e})=>{if(!e)return;const t=!!(e.key||e.map&&e.map.ke),i=!!(e.map&&!e.map.bytes),n=e.startOfSegment===void 0?e.start:e.startOfSegment;return{type:r||e.type,uri:e.resolvedUri||e.uri,start:n,duration:e.duration,isEncrypted:t,isMediaInitialization:i}};class yw extends K.EventTarget{constructor(e,t={}){if(super(),!e)throw new TypeError("Initialization settings are required");if(typeof e.currentTime!="function")throw new TypeError("No currentTime getter specified");if(!e.mediaSource)throw new TypeError("No MediaSource specified");this.bandwidth=e.bandwidth,this.throughput={rate:0,count:0},this.roundTrip=NaN,this.resetStats_(),this.mediaIndex=null,this.partIndex=null,this.hasPlayed_=e.hasPlayed,this.currentTime_=e.currentTime,this.seekable_=e.seekable,this.seeking_=e.seeking,this.duration_=e.duration,this.mediaSource_=e.mediaSource,this.vhs_=e.vhs,this.loaderType_=e.loaderType,this.currentMediaInfo_=void 0,this.startingMediaInfo_=void 0,this.segmentMetadataTrack_=e.segmentMetadataTrack,this.goalBufferLength_=e.goalBufferLength,this.sourceType_=e.sourceType,this.sourceUpdater_=e.sourceUpdater,this.inbandTextTracks_=e.inbandTextTracks,this.state_="INIT",this.timelineChangeController_=e.timelineChangeController,this.shouldSaveSegmentTimingInfo_=!0,this.parse708captions_=e.parse708captions,this.useDtsForTimestampOffset_=e.useDtsForTimestampOffset,this.captionServices_=e.captionServices,this.exactManifestTimings=e.exactManifestTimings,this.addMetadataToTextTrack=e.addMetadataToTextTrack,this.checkBufferTimeout_=null,this.error_=void 0,this.currentTimeline_=-1,this.shouldForceTimestampOffsetAfterResync_=!1,this.pendingSegment_=null,this.xhrOptions_=null,this.pendingSegments_=[],this.audioDisabled_=!1,this.isPendingTimestampOffset_=!1,this.gopBuffer_=[],this.timeMapping_=0,this.safeAppend_=!1,this.appendInitSegment_={audio:!0,video:!0},this.playlistOfLastInitSegment_={audio:null,video:null},this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_={id3:[],caption:[]},this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=null,this.activeInitSegmentId_=null,this.initSegments_={},this.cacheEncryptionKeys_=e.cacheEncryptionKeys,this.keyCache_={},this.decrypter_=e.decrypter,this.syncController_=e.syncController,this.syncPoint_={segmentIndex:0,time:0},this.transmuxer_=this.createTransmuxer_(),this.triggerSyncInfoUpdate_=()=>this.trigger("syncinfoupdate"),this.syncController_.on("syncinfoupdate",this.triggerSyncInfoUpdate_),this.mediaSource_.addEventListener("sourceopen",()=>{this.isEndOfStream_()||(this.ended_=!1)}),this.fetchAtBuffer_=!1,this.logger_=ea(`SegmentLoader[${this.loaderType_}]`),Object.defineProperty(this,"state",{get(){return this.state_},set(i){i!==this.state_&&(this.logger_(`${this.state_} -> ${i}`),this.state_=i,this.trigger("statechange"))}}),this.sourceUpdater_.on("ready",()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():mo(this)}),this.sourceUpdater_.on("codecschange",i=>{this.trigger(or({type:"codecschange"},i))}),this.loaderType_==="main"&&this.timelineChangeController_.on("pendingtimelinechange",()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():mo(this)}),this.loaderType_==="audio"&&this.timelineChangeController_.on("timelinechange",i=>{this.trigger(or({type:"timelinechange"},i)),this.hasEnoughInfoToLoad_()?this.processLoadQueue_():mo(this),this.hasEnoughInfoToAppend_()?this.processCallQueue_():mo(this)})}get mediaSequenceSync_(){return this.syncController_.getMediaSequenceSync(this.loaderType_)}createTransmuxer_(){return Yb.createTransmuxer({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})}resetStats_(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0}dispose(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&H.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()}setAudio(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())}abort(){if(this.state!=="WAITING"){this.pendingSegment_&&(this.pendingSegment_=null);return}this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()}abort_(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,H.clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null}checkForAbort_(e){return this.state==="APPENDING"&&!this.pendingSegment_?(this.state="READY",!0):!this.pendingSegment_||this.pendingSegment_.requestId!==e}error(e){return typeof e<"u"&&(this.logger_("error occurred:",e),this.error_=e),this.pendingSegment_=null,this.error_}endOfStream(){this.ended_=!0,this.transmuxer_&&Yb.reset(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")}buffered_(){const e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return Zr();if(this.loaderType_==="main"){const{hasAudio:t,hasVideo:i,isMuxed:n}=e;if(i&&t&&!this.audioDisabled_&&!n)return this.sourceUpdater_.buffered();if(i)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()}initSegmentForMap(e,t=!1){if(!e)return null;const i=T0(e);let n=this.initSegments_[i];return t&&!n&&e.bytes&&(this.initSegments_[i]=n={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),n||e}segmentKey(e,t=!1){if(!e)return null;const i=rU(e);let n=this.keyCache_[i];this.cacheEncryptionKeys_&&t&&!n&&e.bytes&&(this.keyCache_[i]=n={resolvedUri:e.resolvedUri,bytes:e.bytes});const a={resolvedUri:(n||e).resolvedUri};return n&&(a.bytes=n.bytes),a}couldBeginLoading_(){return this.playlist_&&!this.paused()}load(){if(this.monitorBuffer_(),!!this.playlist_){if(this.state==="INIT"&&this.couldBeginLoading_())return this.init_();!this.couldBeginLoading_()||this.state!=="READY"&&this.state!=="INIT"||(this.state="READY")}}init_(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}playlist(e,t={}){if(!e)return;const i=this.playlist_,n=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,this.state==="INIT"&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},this.loaderType_==="main"&&this.syncController_.setDateTimeMappingForStart(e));let a=null;if(i&&(i.id?a=i.id:i.uri&&(a=i.uri)),this.logger_(`playlist update [${a} => ${e.id||e.uri}]`),this.mediaSequenceSync_&&(this.mediaSequenceSync_.update(e,this.currentTime_()),this.logger_(`Playlist update:
|
||
currentTime: ${this.currentTime_()}
|
||
bufferedEnd: ${jb(this.buffered_())}
|
||
`,this.mediaSequenceSync_.diagnostics)),this.trigger("syncinfoupdate"),this.state==="INIT"&&this.couldBeginLoading_())return this.init_();if(!i||i.uri!==e.uri){this.mediaIndex!==null&&(!e.endList&&typeof e.partTargetDuration=="number"?this.resetLoader():this.resyncLoader()),this.currentMediaInfo_=void 0,this.trigger("playlistupdate");return}const s=e.mediaSequence-i.mediaSequence;if(this.logger_(`live window shift [${s}]`),this.mediaIndex!==null)if(this.mediaIndex-=s,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{const o=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!o.parts||!o.parts.length||!o.parts[this.partIndex])){const l=this.mediaIndex;this.logger_(`currently processing part (index ${this.partIndex}) no longer exists.`),this.resetLoader(),this.mediaIndex=l}}n&&(n.mediaIndex-=s,n.mediaIndex<0?(n.mediaIndex=null,n.partIndex=null):(n.mediaIndex>=0&&(n.segment=e.segments[n.mediaIndex]),n.partIndex>=0&&n.segment.parts&&(n.part=n.segment.parts[n.partIndex]))),this.syncController_.saveExpiredSegmentInfo(i,e)}pause(){this.checkBufferTimeout_&&(H.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}paused(){return this.checkBufferTimeout_===null}resetEverything(e){this.ended_=!1,this.activeInitSegmentId_=null,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.transmuxer_.postMessage({action:"reset"}))}resetLoader(){this.fetchAtBuffer_=!1,this.mediaSequenceSync_&&this.mediaSequenceSync_.resetAppendedStatus(),this.resyncLoader()}resyncLoader(){this.transmuxer_&&Yb.reset(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1;const e=this.currentMediaInfo_&&this.currentMediaInfo_.isFmp4;this.sourceType_==="hls"&&!e&&(this.shouldForceTimestampOffsetAfterResync_=!0),this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}remove(e,t,i=()=>{},n=!1){if(t===1/0&&(t=this.duration_()),t<=e){this.logger_("skipping remove because end ${end} is <= start ${start}");return}if(!this.sourceUpdater_||!this.getMediaInfo_()){this.logger_("skipping remove because no source updater or starting media info");return}let a=1;const s=()=>{a--,a===0&&i()};(n||!this.audioDisabled_)&&(a++,this.sourceUpdater_.removeAudio(e,t,s)),(n||this.loaderType_==="main")&&(this.gopBuffer_=_ne(this.gopBuffer_,e,t,this.timeMapping_),a++,this.sourceUpdater_.removeVideo(e,t,s));for(const o in this.inbandTextTracks_)op(e,t,this.inbandTextTracks_[o]);op(e,t,this.segmentMetadataTrack_),s()}monitorBuffer_(){this.checkBufferTimeout_&&H.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=H.setTimeout(this.monitorBufferTick_.bind(this),1)}monitorBufferTick_(){this.state==="READY"&&this.fillBuffer_(),this.checkBufferTimeout_&&H.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=H.setTimeout(this.monitorBufferTick_.bind(this),Tne)}fillBuffer_(){if(this.sourceUpdater_.updating())return;const e=this.chooseNextRequest_();if(!e)return;const t={segmentInfo:fu({type:this.loaderType_,segment:e})};this.trigger({type:"segmentselected",metadata:t}),typeof e.timestampOffset=="number"&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e)}isEndOfStream_(e=this.mediaIndex,t=this.playlist_,i=this.partIndex){if(!t||!this.mediaSource_)return!1;const n=typeof e=="number"&&t.segments[e],a=e+1===t.segments.length,s=!n||!n.parts||i+1===n.parts.length;return t.endList&&this.mediaSource_.readyState==="open"&&a&&s}chooseNextRequest_(){const e=this.buffered_(),t=jb(e)||0,i=kA(e,this.currentTime_()),n=!this.hasPlayed_()&&i>=1,a=i>=this.goalBufferLength_(),s=this.playlist_.segments;if(!s.length||n||a)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_(),this.loaderType_);const o={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:!this.syncPoint_};if(o.isSyncRequest)o.mediaIndex=Sne(this.currentTimeline_,s,t),this.logger_(`choose next request. Can not find sync point. Fallback to media Index: ${o.mediaIndex}`);else if(this.mediaIndex!==null){const d=s[this.mediaIndex],f=typeof this.partIndex=="number"?this.partIndex:-1;o.startOfSegment=d.end?d.end:t,d.parts&&d.parts[f+1]?(o.mediaIndex=this.mediaIndex,o.partIndex=f+1):o.mediaIndex=this.mediaIndex+1}else{let d,f,p;const v=this.fetchAtBuffer_?t:this.currentTime_();if(this.mediaSequenceSync_&&this.logger_(`chooseNextRequest_ request after Quality Switch:
|
||
For TargetTime: ${v}.
|
||
CurrentTime: ${this.currentTime_()}
|
||
BufferedEnd: ${t}
|
||
Fetch At Buffer: ${this.fetchAtBuffer_}
|
||
`,this.mediaSequenceSync_.diagnostics),this.mediaSequenceSync_&&this.mediaSequenceSync_.isReliable){const g=this.getSyncInfoFromMediaSequenceSync_(v);if(!g){const m="No sync info found while using media sequence sync";return this.error({message:m,metadata:{errorType:K.Error.StreamingFailedToSelectNextSegment,error:new Error(m)}}),this.logger_("chooseNextRequest_ - no sync info found using media sequence sync"),null}this.logger_(`chooseNextRequest_ mediaSequence syncInfo (${g.start} --> ${g.end})`),d=g.segmentIndex,f=g.partIndex,p=g.start}else{this.logger_("chooseNextRequest_ - fallback to a regular segment selection algorithm, based on a syncPoint.");const g=$i.getMediaInfoForTime({exactManifestTimings:this.exactManifestTimings,playlist:this.playlist_,currentTime:v,startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time});d=g.segmentIndex,f=g.partIndex,p=g.startTime}o.getMediaInfoForTime=this.fetchAtBuffer_?`bufferedEnd ${v}`:`currentTime ${v}`,o.mediaIndex=d,o.startOfSegment=p,o.partIndex=f,this.logger_(`choose next request. Playlist switched and we have a sync point. Media Index: ${o.mediaIndex} `)}const l=s[o.mediaIndex];let u=l&&typeof o.partIndex=="number"&&l.parts&&l.parts[o.partIndex];if(!l||typeof o.partIndex=="number"&&!u)return null;typeof o.partIndex!="number"&&l.parts&&(o.partIndex=0,u=l.parts[0]);const c=this.vhs_.playlists&&this.vhs_.playlists.main&&this.vhs_.playlists.main.independentSegments||this.playlist_.independentSegments;if(!i&&u&&!c&&!u.independent)if(o.partIndex===0){const d=s[o.mediaIndex-1],f=d.parts&&d.parts.length&&d.parts[d.parts.length-1];f&&f.independent&&(o.mediaIndex-=1,o.partIndex=d.parts.length-1,o.independent="previous segment")}else l.parts[o.partIndex-1].independent&&(o.partIndex-=1,o.independent="previous part");const h=this.mediaSource_&&this.mediaSource_.readyState==="ended";return o.mediaIndex>=s.length-1&&h&&!this.seeking_()?null:(this.shouldForceTimestampOffsetAfterResync_&&(this.shouldForceTimestampOffsetAfterResync_=!1,o.forceTimestampOffset=!0,this.logger_("choose next request. Force timestamp offset after loader resync")),this.generateSegmentInfo_(o))}getSyncInfoFromMediaSequenceSync_(e){if(!this.mediaSequenceSync_)return null;const t=Math.max(e,this.mediaSequenceSync_.start);e!==t&&this.logger_(`getSyncInfoFromMediaSequenceSync_. Pulled target time from ${e} to ${t}`);const i=this.mediaSequenceSync_.getSyncInfoForTime(t);if(!i)return null;if(!i.isAppended)return i;const n=this.mediaSequenceSync_.getSyncInfoForTime(i.end);return n?(n.isAppended&&this.logger_("getSyncInfoFromMediaSequenceSync_: We encounter unexpected scenario where next media sequence sync info is also appended!"),n):null}generateSegmentInfo_(e){const{independent:t,playlist:i,mediaIndex:n,startOfSegment:a,isSyncRequest:s,partIndex:o,forceTimestampOffset:l,getMediaInfoForTime:u}=e,c=i.segments[n],h=typeof o=="number"&&c.parts[o],d={requestId:"segment-loader-"+Math.random(),uri:h&&h.resolvedUri||c.resolvedUri,mediaIndex:n,partIndex:h?o:null,isSyncRequest:s,startOfSegment:a,playlist:i,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:c.timeline,duration:h&&h.duration||c.duration,segment:c,part:h,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:u,independent:t},f=typeof l<"u"?l:this.isPendingTimestampOffset_;d.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:c.timeline,currentTimeline:this.currentTimeline_,startOfSegment:a,buffered:this.buffered_(),overrideCheck:f});const p=jb(this.sourceUpdater_.audioBuffered());return typeof p=="number"&&(d.audioAppendStart=p-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(d.gopsToAlignWith=mne(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),d}timestampOffsetForSegment_(e){return Cne(e)}earlyAbortWhenNeeded_(e){if(this.vhs_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH||Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)return;const t=this.currentTime_(),i=e.bandwidth,n=this.pendingSegment_.duration,a=$i.estimateSegmentRequestTime(n,i,this.playlist_,e.bytesReceived),s=Xre(this.buffered_(),t,this.vhs_.tech_.playbackRate())-1;if(a<=s)return;const o=sne({main:this.vhs_.playlists.main,currentTime:t,bandwidth:i,duration:this.duration_(),segmentDuration:n,timeUntilRebuffer:s,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(!o)return;const u=a-s-o.rebufferingImpact;let c=.5;s<=Ka&&(c=1),!(!o.playlist||o.playlist.uri===this.playlist_.uri||u<c)&&(this.bandwidth=o.playlist.attributes.BANDWIDTH*Vr.BANDWIDTH_VARIANCE+1,this.trigger("earlyabort"))}handleAbort_(e){this.logger_(`Aborting ${Bc(e)}`),this.mediaRequestsAborted+=1}handleProgress_(e,t){this.earlyAbortWhenNeeded_(t.stats),!this.checkForAbort_(t.requestId)&&this.trigger("progress")}handleTrackInfo_(e,t){const{hasAudio:i,hasVideo:n}=t,a={segmentInfo:fu({type:this.loaderType_,segment:e}),trackInfo:{hasAudio:i,hasVideo:n}};this.trigger({type:"segmenttransmuxingtrackinfoavailable",metadata:a}),this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId)&&(this.checkForIllegalMediaSwitch(t)||(t=t||{},bne(this.currentMediaInfo_,t)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=t,this.currentMediaInfo_=t,this.logger_("trackinfo update",t),this.trigger("trackinfo")),!this.checkForAbort_(e.requestId)&&(this.pendingSegment_.trackInfo=t,this.hasEnoughInfoToAppend_()?this.processCallQueue_():mo(this))))}handleTimingInfo_(e,t,i,n){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;const a=this.pendingSegment_,s=JM(t);a[s]=a[s]||{},a[s][i]=n,this.logger_(`timinginfo: ${t} - ${i} - ${n}`),this.hasEnoughInfoToAppend_()?this.processCallQueue_():mo(this)}handleCaptions_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(t.length===0){this.logger_("SegmentLoader received no captions from a caption event");return}if(!this.pendingSegment_.hasAppendedData_){this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,t));return}const n=this.sourceUpdater_.videoTimestampOffset()===null?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),a={};t.forEach(s=>{a[s.stream]=a[s.stream]||{startTime:1/0,captions:[],endTime:0};const o=a[s.stream];o.startTime=Math.min(o.startTime,s.startTime+n),o.endTime=Math.max(o.endTime,s.endTime+n),o.captions.push(s)}),Object.keys(a).forEach(s=>{const{startTime:o,endTime:l,captions:u}=a[s],c=this.inbandTextTracks_;this.logger_(`adding cues from ${o} -> ${l} for ${s}`),une(c,this.vhs_.tech_,s),op(o,l,c[s]),cne({captionArray:u,inbandTextTracks:c,timestampOffset:n})}),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}handleId3_(e,t,i){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(!this.pendingSegment_.hasAppendedData_){this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,i));return}this.addMetadataToTextTrack(i,t,this.duration_())}processMetadataQueue_(){this.metadataQueue_.id3.forEach(e=>e()),this.metadataQueue_.caption.forEach(e=>e()),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]}processCallQueue_(){const e=this.callQueue_;this.callQueue_=[],e.forEach(t=>t())}processLoadQueue_(){const e=this.loadQueue_;this.loadQueue_=[],e.forEach(t=>t())}hasEnoughInfoToLoad_(){if(this.loaderType_!=="audio")return!0;const e=this.pendingSegment_;return e?this.getCurrentMediaInfo_()?!mw({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}):!0:!1}getCurrentMediaInfo_(e=this.pendingSegment_){return e&&e.trackInfo||this.currentMediaInfo_}getMediaInfo_(e=this.pendingSegment_){return this.getCurrentMediaInfo_(e)||this.startingMediaInfo_}getPendingSegmentPlaylist(){return this.pendingSegment_?this.pendingSegment_.playlist:null}hasEnoughInfoToAppend_(){if(!this.sourceUpdater_.ready()||this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;const e=this.pendingSegment_,t=this.getCurrentMediaInfo_();if(!e||!t)return!1;const{hasAudio:i,hasVideo:n,isMuxed:a}=t;return!(n&&!e.videoTimingInfo||i&&!this.audioDisabled_&&!a&&!e.audioTimingInfo||mw({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}handleData_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(this.callQueue_.length||!this.hasEnoughInfoToAppend_()){mo(this),this.callQueue_.push(this.handleData_.bind(this,e,t));return}const i=this.pendingSegment_;if(this.setTimeMapping_(i.timeline),this.updateMediaSecondsLoaded_(i.part||i.segment),this.mediaSource_.readyState!=="closed"){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),i.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),i.isFmp4=e.isFmp4,i.timingInfo=i.timingInfo||{},i.isFmp4)this.trigger("fmp4"),i.timingInfo.start=i[JM(t.type)].start;else{const n=this.getCurrentMediaInfo_(),a=this.loaderType_==="main"&&n&&n.hasVideo;let s;a&&(s=i.videoTimingInfo.start),i.timingInfo.start=this.trueSegmentStart_({currentStart:i.timingInfo.start,playlist:i.playlist,mediaIndex:i.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:a,firstVideoFrameTimeForData:s,videoTimingInfo:i.videoTimingInfo,audioTimingInfo:i.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(i,t.type),this.updateSourceBufferTimestampOffset_(i),i.isSyncRequest){this.updateTimingInfoEnd_(i),this.syncController_.saveSegmentTimingInfo({segmentInfo:i,shouldSaveTimelineMapping:this.loaderType_==="main"});const n=this.chooseNextRequest_();if(n.mediaIndex!==i.mediaIndex||n.partIndex!==i.partIndex){this.logger_("sync segment was incorrect, not appending");return}this.logger_("sync segment was correct, appending")}i.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(i,t)}}updateAppendInitSegmentStatus(e,t){this.loaderType_==="main"&&typeof e.timestampOffset=="number"&&!e.changedTimestampOffset&&(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[t]!==e.playlist&&(this.appendInitSegment_[t]=!0)}getInitSegmentAndUpdateState_({type:e,initSegment:t,map:i,playlist:n}){if(i){const a=T0(i);if(this.activeInitSegmentId_===a)return null;t=this.initSegmentForMap(i,!0).bytes,this.activeInitSegmentId_=a}return t&&this.appendInitSegment_[e]?(this.playlistOfLastInitSegment_[e]=n,this.appendInitSegment_[e]=!1,this.activeInitSegmentId_=null,t):null}handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i},n){const a=this.sourceUpdater_.audioBuffered(),s=this.sourceUpdater_.videoBuffered();a.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: "+Su(a).join(", ")),s.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+Su(s).join(", "));const o=a.length?a.start(0):0,l=a.length?a.end(a.length-1):0,u=s.length?s.start(0):0,c=s.length?s.end(s.length-1):0;if(l-o<=wd&&c-u<=wd){this.logger_(`On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: ${i.byteLength}, audio buffer: ${Su(a).join(", ")}, video buffer: ${Su(s).join(", ")}, `),this.error({message:"Quota exceeded error with append of a single segment of content",excludeUntil:1/0}),this.trigger("error");return}this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:e,type:t,bytes:i}));const d=this.currentTime_()-wd;this.logger_(`On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to ${d}`),this.remove(0,d,()=>{this.logger_(`On QUOTA_EXCEEDED_ERR, retrying append in ${wd}s`),this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=H.setTimeout(()=>{this.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),this.quotaExceededErrorRetryTimeout_=null,this.processCallQueue_()},wd*1e3)},!0)}handleAppendError_({segmentInfo:e,type:t,bytes:i},n){if(n){if(n.code===K8){this.handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i});return}this.logger_("Received non QUOTA_EXCEEDED_ERR on append",n),this.error({message:`${t} append of ${i.length}b failed for segment #${e.mediaIndex} in playlist ${e.playlist.id}`,metadata:{errorType:K.Error.StreamingFailedToAppendSegment}}),this.trigger("appenderror")}}appendToSourceBuffer_({segmentInfo:e,type:t,initSegment:i,data:n,bytes:a}){if(!a){const o=[n];let l=n.byteLength;i&&(o.unshift(i),l+=i.byteLength),a=lne({bytes:l,segments:o})}const s={segmentInfo:fu({type:this.loaderType_,segment:e})};this.trigger({type:"segmentappendstart",metadata:s}),this.sourceUpdater_.appendBuffer({segmentInfo:e,type:t,bytes:a},this.handleAppendError_.bind(this,{segmentInfo:e,type:t,bytes:a}))}handleSegmentTimingInfo_(e,t,i){if(!this.pendingSegment_||t!==this.pendingSegment_.requestId)return;const n=this.pendingSegment_.segment,a=`${e}TimingInfo`;n[a]||(n[a]={}),n[a].transmuxerPrependedSeconds=i.prependedContentDuration||0,n[a].transmuxedPresentationStart=i.start.presentation,n[a].transmuxedDecodeStart=i.start.decode,n[a].transmuxedPresentationEnd=i.end.presentation,n[a].transmuxedDecodeEnd=i.end.decode,n[a].baseMediaDecodeTime=i.baseMediaDecodeTime}appendData_(e,t){const{type:i,data:n}=t;if(!n||!n.byteLength||i==="audio"&&this.audioDisabled_)return;const a=this.getInitSegmentAndUpdateState_({type:i,initSegment:t.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:i,initSegment:a,data:n})}loadSegment_(e){if(this.state="WAITING",this.pendingSegment_=e,this.trimBackBuffer_(e),typeof e.timestampOffset=="number"&&this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),!this.hasEnoughInfoToLoad_()){mo(this),this.loadQueue_.push(()=>{const t=or({},e,{forceTimestampOffset:!0});or(e,this.generateSegmentInfo_(t)),this.isPendingTimestampOffset_=!1,this.updateTransmuxerAndRequestSegment_(e)});return}this.updateTransmuxerAndRequestSegment_(e)}updateTransmuxerAndRequestSegment_(e){this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:"reset"}),this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:e.timestampOffset}));const t=this.createSimplifiedSegmentObj_(e),i=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),n=this.mediaIndex!==null,a=e.timeline!==this.currentTimeline_&&e.timeline>0,s=i||n&&a;this.logger_(`Requesting
|
||
${_U(e.uri)}
|
||
${Bc(e)}`),t.map&&!t.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=ene({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:t,abortFn:this.handleAbort_.bind(this,e),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"video",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"audio",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:s,endedTimelineFn:()=>{this.logger_("received endedtimeline callback")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:({message:o,level:l,stream:u})=>{this.logger_(`${Bc(e)} logged from transmuxer stream ${u} as a ${l}: ${o}`)},triggerSegmentEventFn:({type:o,segment:l,keyInfo:u,trackInfo:c,timingInfo:h})=>{const f={segmentInfo:fu({segment:l})};u&&(f.keyInfo=u),c&&(f.trackInfo=c),h&&(f.timingInfo=h),this.trigger({type:o,metadata:f})}})}trimBackBuffer_(e){const t=wne(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)}createSimplifiedSegmentObj_(e){const t=e.segment,i=e.part,n=e.segment.key||e.segment.map&&e.segment.map.key,a=e.segment.map&&!e.segment.map.bytes,s={resolvedUri:i?i.resolvedUri:t.resolvedUri,byterange:i?i.byterange:t.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part,type:this.loaderType_,start:e.startOfSegment,duration:e.duration,isEncrypted:n,isMediaInitialization:a},o=e.playlist.segments[e.mediaIndex-1];if(o&&o.timeline===t.timeline&&(o.videoTimingInfo?s.baseStartTime=o.videoTimingInfo.transmuxedDecodeEnd:o.audioTimingInfo&&(s.baseStartTime=o.audioTimingInfo.transmuxedDecodeEnd)),t.key){const l=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);s.key=this.segmentKey(t.key),s.key.iv=l}return t.map&&(s.map=this.initSegmentForMap(t.map)),s}saveTransferStats_(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)}saveBandwidthRelatedStats_(e,t){if(this.pendingSegment_.byteLength=t.bytesReceived,e<hm){this.logger_(`Ignoring segment's bandwidth because its duration of ${e} is less than the min to record ${hm}`);return}const i={bandwidthInfo:{from:this.bandwidth,to:t.bandwidth}};this.trigger({type:"bandwidthupdated",metadata:i}),this.bandwidth=t.bandwidth,this.roundTrip=t.roundTripTime}handleTimeout_(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger("bandwidthupdate"),this.trigger("timeout")}segmentRequestFinished_(e,t,i){if(this.callQueue_.length){this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,t,i));return}if(this.saveTransferStats_(t.stats),!this.pendingSegment_||t.requestId!==this.pendingSegment_.requestId)return;if(e){if(this.pendingSegment_=null,this.state="READY",e.code===Qa.ABORTED)return;if(this.pause(),e.code===Qa.TIMEOUT){this.handleTimeout_();return}this.mediaRequestsErrored+=1,this.error(e),this.trigger("error");return}const n=this.pendingSegment_;this.saveBandwidthRelatedStats_(n.duration,t.stats),n.endOfAllRequests=t.endOfAllRequests,i.gopInfo&&(this.gopBuffer_=yne(this.gopBuffer_,i.gopInfo,this.safeAppend_)),this.state="APPENDING",this.trigger("appending"),this.waitForAppendsToComplete_(n)}setTimeMapping_(e){const t=this.syncController_.mappingForTimeline(e);t!==null&&(this.timeMapping_=t)}updateMediaSecondsLoaded_(e){typeof e.start=="number"&&typeof e.end=="number"?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration}shouldUpdateTransmuxerTimestampOffset_(e){return e===null?!1:this.loaderType_==="main"&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset()}trueSegmentStart_({currentStart:e,playlist:t,mediaIndex:i,firstVideoFrameTimeForData:n,currentVideoTimestampOffset:a,useVideoTimingInfo:s,videoTimingInfo:o,audioTimingInfo:l}){if(typeof e<"u")return e;if(!s)return l.start;const u=t.segments[i-1];return i===0||!u||typeof u.start>"u"||u.end!==n+a?n:o.start}waitForAppendsToComplete_(e){const t=this.getCurrentMediaInfo_(e);if(!t){this.error({message:"No starting media returned, likely due to an unsupported media format.",playlistExclusionDuration:1/0}),this.trigger("error");return}const{hasAudio:i,hasVideo:n,isMuxed:a}=t,s=this.loaderType_==="main"&&n,o=!this.audioDisabled_&&i&&!a;if(e.waitingOnAppends=0,!e.hasAppendedData_){!e.timingInfo&&typeof e.timestampOffset=="number"&&(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),this.checkAppendsDone_(e);return}s&&e.waitingOnAppends++,o&&e.waitingOnAppends++,s&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),o&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))}checkAppendsDone_(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,e.waitingOnAppends===0&&this.handleAppendsDone_())}checkForIllegalMediaSwitch(e){const t=xne(this.loaderType_,this.getCurrentMediaInfo_(),e);return t?(this.error({message:t,playlistExclusionDuration:1/0}),this.trigger("error"),!0):!1}updateSourceBufferTimestampOffset_(e){if(e.timestampOffset===null||typeof e.timingInfo.start!="number"||e.changedTimestampOffset||this.loaderType_!=="main")return;let t=!1;e.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e.segment.videoTimingInfo,audioTimingInfo:e.segment.audioTimingInfo,timingInfo:e.timingInfo}),e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),t=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),t=!0),t&&this.trigger("timestampoffset")}getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e,audioTimingInfo:t,timingInfo:i}){return this.useDtsForTimestampOffset_?e&&typeof e.transmuxedDecodeStart=="number"?e.transmuxedDecodeStart:t&&typeof t.transmuxedDecodeStart=="number"?t.transmuxedDecodeStart:i.start:i.start}updateTimingInfoEnd_(e){e.timingInfo=e.timingInfo||{};const t=this.getMediaInfo_(),n=this.loaderType_==="main"&&t&&t.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;n&&(e.timingInfo.end=typeof n.end=="number"?n.end:n.start+e.duration)}handleAppendsDone_(){if(this.pendingSegment_){const l={segmentInfo:fu({type:this.loaderType_,segment:this.pendingSegment_})};this.trigger({type:"appendsdone",metadata:l})}if(!this.pendingSegment_){this.state="READY",this.paused()||this.monitorBuffer_();return}const e=this.pendingSegment_;e.part&&e.part.syncInfo?e.part.syncInfo.markAppended():e.segment.syncInfo&&e.segment.syncInfo.markAppended(),this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:this.loaderType_==="main"});const t=Pne(e,this.sourceType_);if(t&&(t.severity==="warn"?K.log.warn(t.message):this.logger_(t.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state="READY",e.isSyncRequest&&(this.trigger("syncinfoupdate"),!e.hasAppendedData_)){this.logger_(`Throwing away un-appended sync request ${Bc(e)}`);return}this.logger_(`Appended ${Bc(e)}`),this.addSegmentMetadataCue_(e),this.fetchAtBuffer_=!0,this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),this.loaderType_==="main"&&!this.audioDisabled_&&this.timelineChangeController_.lastTimelineChange({type:"audio",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger("syncinfoupdate");const i=e.segment,n=e.part,a=i.end&&this.currentTime_()-i.end>e.playlist.targetDuration*3,s=n&&n.end&&this.currentTime_()-n.end>e.playlist.partTargetDuration*3;if(a||s){this.logger_(`bad ${a?"segment":"part"} ${Bc(e)}`),this.resetEverything();return}this.mediaIndex!==null&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger("appended"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}recordThroughput_(e){if(e.duration<hm){this.logger_(`Ignoring segment's throughput because its duration of ${e.duration} is less than the min to record ${hm}`);return}const t=this.throughput.rate,i=Date.now()-e.endOfAllRequests+1,n=Math.floor(e.byteLength/i*8*1e3);this.throughput.rate+=(n-t)/++this.throughput.count}addSegmentMetadataCue_(e){if(!this.segmentMetadataTrack_)return;const t=e.segment,i=t.start,n=t.end;if(!QM(i)||!QM(n))return;op(i,n,this.segmentMetadataTrack_);const a=H.WebKitDataCue||H.VTTCue,s={custom:t.custom,dateTimeObject:t.dateTimeObject,dateTimeString:t.dateTimeString,programDateTime:t.programDateTime,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.id,start:i,end:n},o=JSON.stringify(s),l=new a(i,n,o);l.value=s,this.segmentMetadataTrack_.addCue(l)}}function Rs(){}const bU=function(r){return typeof r!="string"?r:r.replace(/./,e=>e.toUpperCase())},Mne=["video","audio"],_w=(r,e)=>{const t=e[`${r}Buffer`];return t&&t.updating||e.queuePending[r]},Lne=(r,e)=>{for(let t=0;t<e.length;t++){const i=e[t];if(i.type==="mediaSource")return null;if(i.type===r)return t}return null},Rh=(r,e)=>{if(e.queue.length===0)return;let t=0,i=e.queue[t];if(i.type==="mediaSource"){!e.updating()&&e.mediaSource.readyState!=="closed"&&(e.queue.shift(),i.action(e),i.doneFn&&i.doneFn(),Rh("audio",e),Rh("video",e));return}if(r!=="mediaSource"&&!(!e.ready()||e.mediaSource.readyState==="closed"||_w(r,e))){if(i.type!==r){if(t=Lne(r,e.queue),t===null)return;i=e.queue[t]}if(e.queue.splice(t,1),e.queuePending[r]=i,i.action(r,e),!i.doneFn){e.queuePending[r]=null,Rh(r,e);return}}},SU=(r,e)=>{const t=e[`${r}Buffer`],i=bU(r);t&&(t.removeEventListener("updateend",e[`on${i}UpdateEnd_`]),t.removeEventListener("error",e[`on${i}Error_`]),e.codecs[r]=null,e[`${r}Buffer`]=null)},Wa=(r,e)=>r&&e&&Array.prototype.indexOf.call(r.sourceBuffers,e)!==-1,on={appendBuffer:(r,e,t)=>(i,n)=>{const a=n[`${i}Buffer`];if(Wa(n.mediaSource,a)){n.logger_(`Appending segment ${e.mediaIndex}'s ${r.length} bytes to ${i}Buffer`);try{a.appendBuffer(r)}catch(s){n.logger_(`Error with code ${s.code} `+(s.code===K8?"(QUOTA_EXCEEDED_ERR) ":"")+`when appending segment ${e.mediaIndex} to ${i}Buffer`),n.queuePending[i]=null,t(s)}}},remove:(r,e)=>(t,i)=>{const n=i[`${t}Buffer`];if(Wa(i.mediaSource,n)){i.logger_(`Removing ${r} to ${e} from ${t}Buffer`);try{n.remove(r,e)}catch{i.logger_(`Remove ${r} to ${e} from ${t}Buffer failed`)}}},timestampOffset:r=>(e,t)=>{const i=t[`${e}Buffer`];Wa(t.mediaSource,i)&&(t.logger_(`Setting ${e}timestampOffset to ${r}`),i.timestampOffset=r)},callback:r=>(e,t)=>{r()},endOfStream:r=>e=>{if(e.mediaSource.readyState==="open"){e.logger_(`Calling mediaSource endOfStream(${r||""})`);try{e.mediaSource.endOfStream(r)}catch(t){K.log.warn("Failed to call media source endOfStream",t)}}},duration:r=>e=>{e.logger_(`Setting mediaSource duration to ${r}`);try{e.mediaSource.duration=r}catch(t){K.log.warn("Failed to set media source duration",t)}},abort:()=>(r,e)=>{if(e.mediaSource.readyState!=="open")return;const t=e[`${r}Buffer`];if(Wa(e.mediaSource,t)){e.logger_(`calling abort on ${r}Buffer`);try{t.abort()}catch(i){K.log.warn(`Failed to abort on ${r}Buffer`,i)}}},addSourceBuffer:(r,e)=>t=>{const i=bU(r),n=Yh(e);t.logger_(`Adding ${r}Buffer with codec ${e} to mediaSource`);const a=t.mediaSource.addSourceBuffer(n);a.addEventListener("updateend",t[`on${i}UpdateEnd_`]),a.addEventListener("error",t[`on${i}Error_`]),t.codecs[r]=e,t[`${r}Buffer`]=a},removeSourceBuffer:r=>e=>{const t=e[`${r}Buffer`];if(SU(r,e),!!Wa(e.mediaSource,t)){e.logger_(`Removing ${r}Buffer with codec ${e.codecs[r]} from mediaSource`);try{e.mediaSource.removeSourceBuffer(t)}catch(i){K.log.warn(`Failed to removeSourceBuffer ${r}Buffer`,i)}}},changeType:r=>(e,t)=>{const i=t[`${e}Buffer`],n=Yh(r);if(!Wa(t.mediaSource,i))return;const a=r.substring(0,r.indexOf(".")),s=t.codecs[e];if(s.substring(0,s.indexOf("."))===a)return;const l={codecsChangeInfo:{from:s,to:r}};t.trigger({type:"codecschange",metadata:l}),t.logger_(`changing ${e}Buffer codec from ${s} to ${r}`);try{i.changeType(n),t.codecs[e]=r}catch(u){l.errorType=K.Error.StreamingCodecsChangeError,l.error=u,u.metadata=l,t.error_=u,t.trigger("error"),K.log.warn(`Failed to changeType on ${e}Buffer`,u)}}},ln=({type:r,sourceUpdater:e,action:t,doneFn:i,name:n})=>{e.queue.push({type:r,action:t,doneFn:i,name:n}),Rh(r,e)},tL=(r,e)=>t=>{const i=e[`${r}Buffered`](),n=Wre(i);if(e.logger_(`received "updateend" event for ${r} Source Buffer: `,n),e.queuePending[r]){const a=e.queuePending[r].doneFn;e.queuePending[r]=null,a&&a(e[`${r}Error_`])}Rh(r,e)};class TU extends K.EventTarget{constructor(e){super(),this.mediaSource=e,this.sourceopenListener_=()=>Rh("mediaSource",this),this.mediaSource.addEventListener("sourceopen",this.sourceopenListener_),this.logger_=ea("SourceUpdater"),this.audioTimestampOffset_=0,this.videoTimestampOffset_=0,this.queue=[],this.queuePending={audio:null,video:null},this.delayedAudioAppendQueue_=[],this.videoAppendQueued_=!1,this.codecs={},this.onVideoUpdateEnd_=tL("video",this),this.onAudioUpdateEnd_=tL("audio",this),this.onVideoError_=t=>{this.videoError_=t},this.onAudioError_=t=>{this.audioError_=t},this.createdSourceBuffers_=!1,this.initializedEme_=!1,this.triggeredReady_=!1}initializedEme(){this.initializedEme_=!0,this.triggerReady()}hasCreatedSourceBuffers(){return this.createdSourceBuffers_}hasInitializedAnyEme(){return this.initializedEme_}ready(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()}createSourceBuffers(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger("createdsourcebuffers"),this.triggerReady())}triggerReady(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger("ready"))}addSourceBuffer(e,t){ln({type:"mediaSource",sourceUpdater:this,action:on.addSourceBuffer(e,t),name:"addSourceBuffer"})}abort(e){ln({type:e,sourceUpdater:this,action:on.abort(e),name:"abort"})}removeSourceBuffer(e){if(!this.canRemoveSourceBuffer()){K.log.error("removeSourceBuffer is not supported!");return}ln({type:"mediaSource",sourceUpdater:this,action:on.removeSourceBuffer(e),name:"removeSourceBuffer"})}canRemoveSourceBuffer(){return!K.browser.IS_FIREFOX&&H.MediaSource&&H.MediaSource.prototype&&typeof H.MediaSource.prototype.removeSourceBuffer=="function"}static canChangeType(){return H.SourceBuffer&&H.SourceBuffer.prototype&&typeof H.SourceBuffer.prototype.changeType=="function"}canChangeType(){return this.constructor.canChangeType()}changeType(e,t){if(!this.canChangeType()){K.log.error("changeType is not supported!");return}ln({type:e,sourceUpdater:this,action:on.changeType(t),name:"changeType"})}addOrChangeSourceBuffers(e){if(!e||typeof e!="object"||Object.keys(e).length===0)throw new Error("Cannot addOrChangeSourceBuffers to undefined codecs");Object.keys(e).forEach(t=>{const i=e[t];if(!this.hasCreatedSourceBuffers())return this.addSourceBuffer(t,i);this.canChangeType()&&this.changeType(t,i)})}appendBuffer(e,t){const{segmentInfo:i,type:n,bytes:a}=e;if(this.processedAppend_=!0,n==="audio"&&this.videoBuffer&&!this.videoAppendQueued_){this.delayedAudioAppendQueue_.push([e,t]),this.logger_(`delayed audio append of ${a.length} until video append`);return}const s=t;if(ln({type:n,sourceUpdater:this,action:on.appendBuffer(a,i||{mediaIndex:-1},s),doneFn:t,name:"appendBuffer"}),n==="video"){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;const o=this.delayedAudioAppendQueue_.slice();this.logger_(`queuing delayed audio ${o.length} appendBuffers`),this.delayedAudioAppendQueue_.length=0,o.forEach(l=>{this.appendBuffer.apply(this,l)})}}audioBuffered(){return Wa(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:Zr()}videoBuffered(){return Wa(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:Zr()}buffered(){const e=Wa(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=Wa(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return t&&!e?this.audioBuffered():e&&!t?this.videoBuffered():jre(this.audioBuffered(),this.videoBuffered())}setDuration(e,t=Rs){ln({type:"mediaSource",sourceUpdater:this,action:on.duration(e),name:"duration",doneFn:t})}endOfStream(e=null,t=Rs){typeof e!="string"&&(e=void 0),ln({type:"mediaSource",sourceUpdater:this,action:on.endOfStream(e),name:"endOfStream",doneFn:t})}removeAudio(e,t,i=Rs){if(!this.audioBuffered().length||this.audioBuffered().end(0)===0){i();return}ln({type:"audio",sourceUpdater:this,action:on.remove(e,t),doneFn:i,name:"remove"})}removeVideo(e,t,i=Rs){if(!this.videoBuffered().length||this.videoBuffered().end(0)===0){i();return}ln({type:"video",sourceUpdater:this,action:on.remove(e,t),doneFn:i,name:"remove"})}updating(){return!!(_w("audio",this)||_w("video",this))}audioTimestampOffset(e){return typeof e<"u"&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(ln({type:"audio",sourceUpdater:this,action:on.timestampOffset(e),name:"timestampOffset"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_}videoTimestampOffset(e){return typeof e<"u"&&this.videoBuffer&&this.videoTimestampOffset_!==e&&(ln({type:"video",sourceUpdater:this,action:on.timestampOffset(e),name:"timestampOffset"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_}audioQueueCallback(e){this.audioBuffer&&ln({type:"audio",sourceUpdater:this,action:on.callback(e),name:"callback"})}videoQueueCallback(e){this.videoBuffer&&ln({type:"video",sourceUpdater:this,action:on.callback(e),name:"callback"})}dispose(){this.trigger("dispose"),Mne.forEach(e=>{this.abort(e),this.canRemoveSourceBuffer()?this.removeSourceBuffer(e):this[`${e}QueueCallback`](()=>SU(e,this))}),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()}}const rL=r=>decodeURIComponent(escape(String.fromCharCode.apply(null,r))),kne=r=>{const e=new Uint8Array(r);return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")},iL=new Uint8Array(`
|
||
|
||
`.split("").map(r=>r.charCodeAt(0)));class Rne extends Error{constructor(){super("Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.")}}class One extends yw{constructor(e,t={}){super(e,t),this.mediaSource_=null,this.subtitlesTrack_=null,this.featuresNativeTextTracks_=e.featuresNativeTextTracks,this.loadVttJs=e.loadVttJs,this.shouldSaveSegmentTimingInfo_=!1}createTransmuxer_(){return null}buffered_(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return Zr();const e=this.subtitlesTrack_.cues,t=e[0].startTime,i=e[e.length-1].startTime;return Zr([[t,i]])}initSegmentForMap(e,t=!1){if(!e)return null;const i=T0(e);let n=this.initSegments_[i];if(t&&!n&&e.bytes){const a=iL.byteLength+e.bytes.byteLength,s=new Uint8Array(a);s.set(e.bytes),s.set(iL,e.bytes.byteLength),this.initSegments_[i]=n={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:s}}return n||e}couldBeginLoading_(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}init_(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}track(e){return typeof e>"u"?this.subtitlesTrack_:(this.subtitlesTrack_=e,this.state==="INIT"&&this.couldBeginLoading_()&&this.init_(),this.subtitlesTrack_)}remove(e,t){op(e,t,this.subtitlesTrack_)}fillBuffer_(){const e=this.chooseNextRequest_();if(e){if(this.syncController_.timestampOffsetForTimeline(e.timeline)===null){const t=()=>{this.state="READY",this.paused()||this.monitorBuffer_()};this.syncController_.one("timestampoffset",t),this.state="WAITING_ON_TIMELINE";return}this.loadSegment_(e)}}timestampOffsetForSegment_(){return null}chooseNextRequest_(){return this.skipEmptySegments_(super.chooseNextRequest_())}skipEmptySegments_(e){for(;e&&e.segment.empty;){if(e.mediaIndex+1>=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e}stopForError(e){this.error(e),this.state="READY",this.pause(),this.trigger("error")}segmentRequestFinished_(e,t,i){if(!this.subtitlesTrack_){this.state="READY";return}if(this.saveTransferStats_(t.stats),!this.pendingSegment_){this.state="READY",this.mediaRequestsAborted+=1;return}if(e){e.code===Qa.TIMEOUT&&this.handleTimeout_(),e.code===Qa.ABORTED?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,this.stopForError(e);return}const n=this.pendingSegment_;this.saveBandwidthRelatedStats_(n.duration,t.stats),t.key&&this.segmentKey(t.key,!0),this.state="APPENDING",this.trigger("appending");const a=n.segment;if(a.map&&(a.map.bytes=t.map.bytes),n.bytes=t.bytes,typeof H.WebVTT!="function"&&typeof this.loadVttJs=="function"){this.state="WAITING_ON_VTTJS",this.loadVttJs().then(()=>this.segmentRequestFinished_(e,t,i),()=>this.stopForError({message:"Error loading vtt.js"}));return}a.requested=!0;try{this.parseVTTCues_(n)}catch(s){this.stopForError({message:s.message,metadata:{errorType:K.Error.StreamingVttParserError,error:s}});return}if(this.updateTimeMapping_(n,this.syncController_.timelines[n.timeline],this.playlist_),n.cues.length?n.timingInfo={start:n.cues[0].startTime,end:n.cues[n.cues.length-1].endTime}:n.timingInfo={start:n.startOfSegment,end:n.startOfSegment+n.duration},n.isSyncRequest){this.trigger("syncinfoupdate"),this.pendingSegment_=null,this.state="READY";return}n.byteLength=n.bytes.byteLength,this.mediaSecondsLoaded+=a.duration,n.cues.forEach(s=>{this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_?new H.VTTCue(s.startTime,s.endTime,s.text):s)}),gne(this.subtitlesTrack_),this.handleAppendsDone_()}handleData_(){}updateTimingInfoEnd_(){}parseVTTCues_(e){let t,i=!1;if(typeof H.WebVTT!="function")throw new Rne;typeof H.TextDecoder=="function"?t=new H.TextDecoder("utf8"):(t=H.WebVTT.StringDecoder(),i=!0);const n=new H.WebVTT.Parser(H,H.vttjs,t);if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},n.oncue=e.cues.push.bind(e.cues),n.ontimestampmap=s=>{e.timestampmap=s},n.onparsingerror=s=>{K.log.warn("Error encountered when parsing cues: "+s.message)},e.segment.map){let s=e.segment.map.bytes;i&&(s=rL(s)),n.parse(s)}let a=e.bytes;i&&(a=rL(a)),n.parse(a),n.flush()}updateTimeMapping_(e,t,i){const n=e.segment;if(!t)return;if(!e.cues.length){n.empty=!0;return}const{MPEGTS:a,LOCAL:s}=e.timestampmap,l=a/bu.ONE_SECOND_IN_TS-s+t.mapping;if(e.cues.forEach(u=>{const c=u.endTime-u.startTime,h=this.handleRollover_(u.startTime+l,t.time);u.startTime=Math.max(h,0),u.endTime=Math.max(h+c,0)}),!i.syncInfo){const u=e.cues[0].startTime,c=e.cues[e.cues.length-1].startTime;i.syncInfo={mediaSequence:i.mediaSequence+e.mediaIndex,time:Math.min(u,c-n.duration)}}}handleRollover_(e,t){if(t===null)return e;let i=e*bu.ONE_SECOND_IN_TS;const n=t*bu.ONE_SECOND_IN_TS;let a;for(n<i?a=-8589934592:a=8589934592;Math.abs(i-n)>4294967296;)i+=a;return i/bu.ONE_SECOND_IN_TS}}const Nne=function(r,e){const t=r.cues;for(let i=0;i<t.length;i++){const n=t[i];if(e>=n.adStartTime&&e<=n.adEndTime)return n}return null},Bne=function(r,e,t=0){if(!r.segments)return;let i=t,n;for(let a=0;a<r.segments.length;a++){const s=r.segments[a];if(n||(n=Nne(e,i+s.duration/2)),n){if("cueIn"in s){n.endTime=i,n.adEndTime=i,i+=s.duration,n=null;continue}if(i<n.endTime){i+=s.duration;continue}n.endTime+=s.duration}else if("cueOut"in s&&(n=new H.VTTCue(i,i+s.duration,s.cueOut),n.adStartTime=i,n.adEndTime=i+parseFloat(s.cueOut),e.addCue(n)),"cueOutCont"in s){const[o,l]=s.cueOutCont.split("/").map(parseFloat);n=new H.VTTCue(i,i+s.duration,""),n.adStartTime=i-o,n.adEndTime=n.adStartTime+l,e.addCue(n)}i+=s.duration}};class nL{constructor({start:e,end:t,segmentIndex:i,partIndex:n=null,appended:a=!1}){this.start_=e,this.end_=t,this.segmentIndex_=i,this.partIndex_=n,this.appended_=a}isInRange(e){return e>=this.start&&e<this.end}markAppended(){this.appended_=!0}resetAppendedStatus(){this.appended_=!1}get isAppended(){return this.appended_}get start(){return this.start_}get end(){return this.end_}get segmentIndex(){return this.segmentIndex_}get partIndex(){return this.partIndex_}}class Fne{constructor(e,t=[]){this.segmentSyncInfo_=e,this.partsSyncInfo_=t}get segmentSyncInfo(){return this.segmentSyncInfo_}get partsSyncInfo(){return this.partsSyncInfo_}get hasPartsSyncInfo(){return this.partsSyncInfo_.length>0}resetAppendStatus(){this.segmentSyncInfo_.resetAppendedStatus(),this.partsSyncInfo_.forEach(e=>e.resetAppendedStatus())}}class xU{constructor(){this.storage_=new Map,this.diagnostics_="",this.isReliable_=!1,this.start_=-1/0,this.end_=1/0}get start(){return this.start_}get end(){return this.end_}get diagnostics(){return this.diagnostics_}get isReliable(){return this.isReliable_}resetAppendedStatus(){this.storage_.forEach(e=>e.resetAppendStatus())}update(e,t){const{mediaSequence:i,segments:n}=e;if(this.isReliable_=this.isReliablePlaylist_(i,n),!!this.isReliable_)return this.updateStorage_(n,i,this.calculateBaseTime_(i,t))}getSyncInfoForTime(e){for(const{segmentSyncInfo:t,partsSyncInfo:i}of this.storage_.values())if(i.length){for(const n of i)if(n.isInRange(e))return n}else if(t.isInRange(e))return t;return null}getSyncInfoForMediaSequence(e){return this.storage_.get(e)}updateStorage_(e,t,i){const n=new Map;let a=`
|
||
`,s=i,o=t;this.start_=s,e.forEach((l,u)=>{const c=this.storage_.get(o),h=s,d=h+l.duration,f=!!(c&&c.segmentSyncInfo&&c.segmentSyncInfo.isAppended),p=new nL({start:h,end:d,appended:f,segmentIndex:u});l.syncInfo=p;let v=s;const g=(l.parts||[]).map((m,y)=>{const _=v,b=v+m.duration,T=!!(c&&c.partsSyncInfo&&c.partsSyncInfo[y]&&c.partsSyncInfo[y].isAppended),x=new nL({start:_,end:b,appended:T,segmentIndex:u,partIndex:y});return v=b,a+=`Media Sequence: ${o}.${y} | Range: ${_} --> ${b} | Appended: ${T}
|
||
`,m.syncInfo=x,x});n.set(o,new Fne(p,g)),a+=`${_U(l.resolvedUri)} | Media Sequence: ${o} | Range: ${h} --> ${d} | Appended: ${f}
|
||
`,o++,s=d}),this.end_=s,this.storage_=n,this.diagnostics_=a}calculateBaseTime_(e,t){return this.storage_.size?this.storage_.has(e)?this.storage_.get(e).segmentSyncInfo.start:t:0}isReliablePlaylist_(e,t){return e!=null&&Array.isArray(t)&&t.length}}class aL extends xU{constructor(e){super(),this.parent_=e}calculateBaseTime_(e,t){if(!this.storage_.size){const i=this.parent_.getSyncInfoForMediaSequence(e);return i?i.segmentSyncInfo.start:0}return super.calculateBaseTime_(e,t)}}const Une=86400,Kb=[{name:"VOD",run:(r,e,t,i,n)=>t!==1/0?{time:0,segmentIndex:0,partIndex:null}:null},{name:"MediaSequence",run:(r,e,t,i,n,a)=>{const s=r.getMediaSequenceSync(a);if(!s||!s.isReliable)return null;const o=s.getSyncInfoForTime(n);return o?{time:o.start,partIndex:o.partIndex,segmentIndex:o.segmentIndex}:null}},{name:"ProgramDateTime",run:(r,e,t,i,n)=>{if(!Object.keys(r.timelineToDatetimeMappings).length)return null;let a=null,s=null;const o=uw(e);n=n||0;for(let l=0;l<o.length;l++){const u=e.endList||n===0?l:o.length-(l+1),c=o[u],h=c.segment,d=r.timelineToDatetimeMappings[h.timeline];if(!d||!h.dateTimeObject)continue;let p=h.dateTimeObject.getTime()/1e3+d;if(h.parts&&typeof c.partIndex=="number")for(let g=0;g<c.partIndex;g++)p+=h.parts[g].duration;const v=Math.abs(n-p);if(s!==null&&(v===0||s<v))break;s=v,a={time:p,segmentIndex:c.segmentIndex,partIndex:c.partIndex}}return a}},{name:"Segment",run:(r,e,t,i,n)=>{let a=null,s=null;n=n||0;const o=uw(e);for(let l=0;l<o.length;l++){const u=e.endList||n===0?l:o.length-(l+1),c=o[u],h=c.segment,d=c.part&&c.part.start||h&&h.start;if(h.timeline===i&&typeof d<"u"){const f=Math.abs(n-d);if(s!==null&&s<f)break;(!a||s===null||s>=f)&&(s=f,a={time:d,segmentIndex:c.segmentIndex,partIndex:c.partIndex})}}return a}},{name:"Discontinuity",run:(r,e,t,i,n)=>{let a=null;if(n=n||0,e.discontinuityStarts&&e.discontinuityStarts.length){let s=null;for(let o=0;o<e.discontinuityStarts.length;o++){const l=e.discontinuityStarts[o],u=e.discontinuitySequence+o+1,c=r.discontinuities[u];if(c){const h=Math.abs(n-c.time);if(s!==null&&s<h)break;(!a||s===null||s>=h)&&(s=h,a={time:c.time,segmentIndex:l,partIndex:null})}}}return a}},{name:"Playlist",run:(r,e,t,i,n)=>e.syncInfo?{time:e.syncInfo.time,segmentIndex:e.syncInfo.mediaSequence-e.mediaSequence,partIndex:null}:null}];class Vne extends K.EventTarget{constructor(e={}){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={};const t=new xU,i=new aL(t),n=new aL(t);this.mediaSequenceStorage_={main:t,audio:i,vtt:n},this.logger_=ea("SyncController")}getMediaSequenceSync(e){return this.mediaSequenceStorage_[e]||null}getSyncPoint(e,t,i,n,a){if(t!==1/0)return Kb.find(({name:l})=>l==="VOD").run(this,e,t);const s=this.runStrategies_(e,t,i,n,a);if(!s.length)return null;for(const o of s){const{syncPoint:l,strategy:u}=o,{segmentIndex:c,time:h}=l;if(c<0)continue;const d=e.segments[c],f=h,p=f+d.duration;if(this.logger_(`Strategy: ${u}. Current time: ${n}. selected segment: ${c}. Time: [${f} -> ${p}]}`),n>=f&&n<p)return this.logger_("Found sync point with exact match: ",l),l}return this.selectSyncPoint_(s,{key:"time",value:n})}getExpiredTime(e,t){if(!e||!e.segments)return null;const i=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!i.length)return null;const n=this.selectSyncPoint_(i,{key:"segmentIndex",value:0});return n.segmentIndex>0&&(n.time*=-1),Math.abs(n.time+Lp({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:n.segmentIndex,endIndex:0}))}runStrategies_(e,t,i,n,a){const s=[];for(let o=0;o<Kb.length;o++){const l=Kb[o],u=l.run(this,e,t,i,n,a);u&&(u.strategy=l.name,s.push({strategy:l.name,syncPoint:u}))}return s}selectSyncPoint_(e,t){let i=e[0].syncPoint,n=Math.abs(e[0].syncPoint[t.key]-t.value),a=e[0].strategy;for(let s=1;s<e.length;s++){const o=Math.abs(e[s].syncPoint[t.key]-t.value);o<n&&(n=o,i=e[s].syncPoint,a=e[s].strategy)}return this.logger_(`syncPoint for [${t.key}: ${t.value}] chosen with strategy [${a}]: [time:${i.time}, segmentIndex:${i.segmentIndex}`+(typeof i.partIndex=="number"?`,partIndex:${i.partIndex}`:"")+"]"),i}saveExpiredSegmentInfo(e,t){const i=t.mediaSequence-e.mediaSequence;if(i>Une){K.log.warn(`Not saving expired segment info. Media sequence gap ${i} is too large.`);return}for(let n=i-1;n>=0;n--){const a=e.segments[n];if(a&&typeof a.start<"u"){t.syncInfo={mediaSequence:e.mediaSequence+n,time:a.start},this.logger_(`playlist refresh sync: [time:${t.syncInfo.time}, mediaSequence: ${t.syncInfo.mediaSequence}]`),this.trigger("syncinfoupdate");break}}}setDateTimeMappingForStart(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){const t=e.segments[0],i=t.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[t.timeline]=-i}}saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:t}){const i=this.calculateSegmentTimeMapping_(e,e.timingInfo,t),n=e.segment;i&&(this.saveDiscontinuitySyncInfo_(e),e.playlist.syncInfo||(e.playlist.syncInfo={mediaSequence:e.playlist.mediaSequence+e.mediaIndex,time:n.start}));const a=n.dateTimeObject;n.discontinuity&&t&&a&&(this.timelineToDatetimeMappings[n.timeline]=-(a.getTime()/1e3))}timestampOffsetForTimeline(e){return typeof this.timelines[e]>"u"?null:this.timelines[e].time}mappingForTimeline(e){return typeof this.timelines[e]>"u"?null:this.timelines[e].mapping}calculateSegmentTimeMapping_(e,t,i){const n=e.segment,a=e.part;let s=this.timelines[e.timeline],o,l;if(typeof e.timestampOffset=="number")s={time:e.startOfSegment,mapping:e.startOfSegment-t.start},i&&(this.timelines[e.timeline]=s,this.trigger("timestampoffset"),this.logger_(`time mapping for timeline ${e.timeline}: [time: ${s.time}] [mapping: ${s.mapping}]`)),o=e.startOfSegment,l=t.end+s.mapping;else if(s)o=t.start+s.mapping,l=t.end+s.mapping;else return!1;return a&&(a.start=o,a.end=l),(!n.start||o<n.start)&&(n.start=o),n.end=l,!0}saveDiscontinuitySyncInfo_(e){const t=e.playlist,i=e.segment;if(i.discontinuity)this.discontinuities[i.timeline]={time:i.start,accuracy:0};else if(t.discontinuityStarts&&t.discontinuityStarts.length)for(let n=0;n<t.discontinuityStarts.length;n++){const a=t.discontinuityStarts[n],s=t.discontinuitySequence+n+1,o=a-e.mediaIndex,l=Math.abs(o);if(!this.discontinuities[s]||this.discontinuities[s].accuracy>l){let u;o<0?u=i.start-Lp({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex,endIndex:a}):u=i.end+Lp({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex+1,endIndex:a}),this.discontinuities[s]={time:u,accuracy:l}}}}dispose(){this.trigger("dispose"),this.off()}}class zne extends K.EventTarget{constructor(){super(),this.pendingTimelineChanges_={},this.lastTimelineChanges_={}}clearPendingTimelineChange(e){this.pendingTimelineChanges_[e]=null,this.trigger("pendingtimelinechange")}pendingTimelineChange({type:e,from:t,to:i}){return typeof t=="number"&&typeof i=="number"&&(this.pendingTimelineChanges_[e]={type:e,from:t,to:i},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[e]}lastTimelineChange({type:e,from:t,to:i}){if(typeof t=="number"&&typeof i=="number"){this.lastTimelineChanges_[e]={type:e,from:t,to:i},delete this.pendingTimelineChanges_[e];const n={timelineChangeInfo:{from:t,to:i}};this.trigger({type:"timelinechange",metadata:n})}return this.lastTimelineChanges_[e]}dispose(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()}}const Gne=lU(uU(function(){var r=function(){function v(){this.listeners={}}var g=v.prototype;return g.on=function(y,_){this.listeners[y]||(this.listeners[y]=[]),this.listeners[y].push(_)},g.off=function(y,_){if(!this.listeners[y])return!1;var b=this.listeners[y].indexOf(_);return this.listeners[y]=this.listeners[y].slice(0),this.listeners[y].splice(b,1),b>-1},g.trigger=function(y){var _=this.listeners[y];if(_)if(arguments.length===2)for(var b=_.length,T=0;T<b;++T)_[T].call(this,arguments[1]);else for(var x=Array.prototype.slice.call(arguments,1),C=_.length,D=0;D<C;++D)_[D].apply(this,x)},g.dispose=function(){this.listeners={}},g.pipe=function(y){this.on("data",function(_){y.push(_)})},v}();/*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */function e(v){return v.subarray(0,v.byteLength-v[v.byteLength-1])}/*! @name aes-decrypter @version 4.0.2 @license Apache-2.0 */const t=function(){const v=[[[],[],[],[],[]],[[],[],[],[],[]]],g=v[0],m=v[1],y=g[4],_=m[4];let b,T,x;const C=[],D=[];let I,M,L,N,O,B;for(b=0;b<256;b++)D[(C[b]=b<<1^(b>>7)*283)^b]=b;for(T=x=0;!y[T];T^=I||1,x=D[x]||1)for(N=x^x<<1^x<<2^x<<3^x<<4,N=N>>8^N&255^99,y[T]=N,_[N]=T,L=C[M=C[I=C[T]]],B=L*16843009^M*65537^I*257^T*16843008,O=C[N]*257^N*16843008,b=0;b<4;b++)g[b][T]=O=O<<24^O>>>8,m[b][N]=B=B<<24^B>>>8;for(b=0;b<5;b++)g[b]=g[b].slice(0),m[b]=m[b].slice(0);return v};let i=null;class n{constructor(g){i||(i=t()),this._tables=[[i[0][0].slice(),i[0][1].slice(),i[0][2].slice(),i[0][3].slice(),i[0][4].slice()],[i[1][0].slice(),i[1][1].slice(),i[1][2].slice(),i[1][3].slice(),i[1][4].slice()]];let m,y,_;const b=this._tables[0][4],T=this._tables[1],x=g.length;let C=1;if(x!==4&&x!==6&&x!==8)throw new Error("Invalid aes key size");const D=g.slice(0),I=[];for(this._key=[D,I],m=x;m<4*x+28;m++)_=D[m-1],(m%x===0||x===8&&m%x===4)&&(_=b[_>>>24]<<24^b[_>>16&255]<<16^b[_>>8&255]<<8^b[_&255],m%x===0&&(_=_<<8^_>>>24^C<<24,C=C<<1^(C>>7)*283)),D[m]=D[m-x]^_;for(y=0;m;y++,m--)_=D[y&3?m:m-4],m<=4||y<4?I[y]=_:I[y]=T[0][b[_>>>24]]^T[1][b[_>>16&255]]^T[2][b[_>>8&255]]^T[3][b[_&255]]}decrypt(g,m,y,_,b,T){const x=this._key[1];let C=g^x[0],D=_^x[1],I=y^x[2],M=m^x[3],L,N,O;const B=x.length/4-2;let F,U=4;const $=this._tables[1],q=$[0],Z=$[1],te=$[2],J=$[3],oe=$[4];for(F=0;F<B;F++)L=q[C>>>24]^Z[D>>16&255]^te[I>>8&255]^J[M&255]^x[U],N=q[D>>>24]^Z[I>>16&255]^te[M>>8&255]^J[C&255]^x[U+1],O=q[I>>>24]^Z[M>>16&255]^te[C>>8&255]^J[D&255]^x[U+2],M=q[M>>>24]^Z[C>>16&255]^te[D>>8&255]^J[I&255]^x[U+3],U+=4,C=L,D=N,I=O;for(F=0;F<4;F++)b[(3&-F)+T]=oe[C>>>24]<<24^oe[D>>16&255]<<16^oe[I>>8&255]<<8^oe[M&255]^x[U++],L=C,C=D,D=I,I=M,M=L}}class a extends r{constructor(){super(r),this.jobs=[],this.delay=1,this.timeout_=null}processJob_(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null}push(g){this.jobs.push(g),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}const s=function(v){return v<<24|(v&65280)<<8|(v&16711680)>>8|v>>>24},o=function(v,g,m){const y=new Int32Array(v.buffer,v.byteOffset,v.byteLength>>2),_=new n(Array.prototype.slice.call(g)),b=new Uint8Array(v.byteLength),T=new Int32Array(b.buffer);let x,C,D,I,M,L,N,O,B;for(x=m[0],C=m[1],D=m[2],I=m[3],B=0;B<y.length;B+=4)M=s(y[B]),L=s(y[B+1]),N=s(y[B+2]),O=s(y[B+3]),_.decrypt(M,L,N,O,T,B),T[B]=s(T[B]^x),T[B+1]=s(T[B+1]^C),T[B+2]=s(T[B+2]^D),T[B+3]=s(T[B+3]^I),x=M,C=L,D=N,I=O;return b};class l{constructor(g,m,y,_){const b=l.STEP,T=new Int32Array(g.buffer),x=new Uint8Array(g.byteLength);let C=0;for(this.asyncStream_=new a,this.asyncStream_.push(this.decryptChunk_(T.subarray(C,C+b),m,y,x)),C=b;C<T.length;C+=b)y=new Uint32Array([s(T[C-4]),s(T[C-3]),s(T[C-2]),s(T[C-1])]),this.asyncStream_.push(this.decryptChunk_(T.subarray(C,C+b),m,y,x));this.asyncStream_.push(function(){_(null,e(x))})}static get STEP(){return 32e3}decryptChunk_(g,m,y,_){return function(){const b=o(g,m,y);_.set(b,g.byteOffset)}}}var u=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},c;typeof window<"u"?c=window:typeof u<"u"?c=u:typeof self<"u"?c=self:c={};var h=c,d=function(g){return ArrayBuffer.isView==="function"?ArrayBuffer.isView(g):g&&g.buffer instanceof ArrayBuffer},f=h.BigInt||Number;f("0x1"),f("0x100"),f("0x10000"),f("0x1000000"),f("0x100000000"),f("0x10000000000"),f("0x1000000000000"),f("0x100000000000000"),f("0x10000000000000000"),function(){var v=new Uint16Array([65484]),g=new Uint8Array(v.buffer,v.byteOffset,v.byteLength);return g[0]===255?"big":g[0]===204?"little":"unknown"}();const p=function(v){const g={};return Object.keys(v).forEach(m=>{const y=v[m];d(y)?g[m]={bytes:y.buffer,byteOffset:y.byteOffset,byteLength:y.byteLength}:g[m]=y}),g};self.onmessage=function(v){const g=v.data,m=new Uint8Array(g.encrypted.bytes,g.encrypted.byteOffset,g.encrypted.byteLength),y=new Uint32Array(g.key.bytes,g.key.byteOffset,g.key.byteLength/4),_=new Uint32Array(g.iv.bytes,g.iv.byteOffset,g.iv.byteLength/4);new l(m,y,_,function(b,T){self.postMessage(p({source:g.source,decrypted:T}),[T.buffer])})}}));var Hne=oU(Gne);const $ne=r=>{let e=r.default?"main":"alternative";return r.characteristics&&r.characteristics.indexOf("public.accessibility.describes-video")>=0&&(e="main-desc"),e},wU=(r,e)=>{r.abort(),r.pause(),e&&e.activePlaylistLoader&&(e.activePlaylistLoader.pause(),e.activePlaylistLoader=null)},bw=(r,e)=>{e.activePlaylistLoader=r,r.load()},Wne=(r,e)=>()=>{const{segmentLoaders:{[r]:t,main:i},mediaTypes:{[r]:n}}=e,a=n.activeTrack(),s=n.getActiveGroup(),o=n.activePlaylistLoader,l=n.lastGroup_;if(!(s&&l&&s.id===l.id)&&(n.lastGroup_=s,n.lastTrack_=a,wU(t,n),!(!s||s.isMainPlaylist))){if(!s.playlistLoader){o&&i.resetEverything();return}t.resyncLoader(),bw(s.playlistLoader,n)}},qne=(r,e)=>()=>{const{segmentLoaders:{[r]:t},mediaTypes:{[r]:i}}=e;i.lastGroup_=null,t.abort(),t.pause()},jne=(r,e)=>()=>{const{mainPlaylistLoader:t,segmentLoaders:{[r]:i,main:n},mediaTypes:{[r]:a}}=e,s=a.activeTrack(),o=a.getActiveGroup(),l=a.activePlaylistLoader,u=a.lastTrack_;if(!(u&&s&&u.id===s.id)&&(a.lastGroup_=o,a.lastTrack_=s,wU(i,a),!!o)){if(o.isMainPlaylist){if(!s||!u||s.id===u.id)return;const c=e.vhs.playlistController_,h=c.selectPlaylist();if(c.media()===h)return;a.logger_(`track change. Switching main audio from ${u.id} to ${s.id}`),t.pause(),n.resetEverything(),c.fastQualityChange_(h);return}if(r==="AUDIO"){if(!o.playlistLoader){n.setAudio(!0),n.resetEverything();return}i.setAudio(!0),n.setAudio(!1)}if(l===o.playlistLoader){bw(o.playlistLoader,a);return}i.track&&i.track(s),i.resetEverything(),bw(o.playlistLoader,a)}},C0={AUDIO:(r,e)=>()=>{const{mediaTypes:{[r]:t},excludePlaylist:i}=e,n=t.activeTrack(),a=t.activeGroup(),s=(a.filter(l=>l.default)[0]||a[0]).id,o=t.tracks[s];if(n===o){i({error:{message:"Problem encountered loading the default audio track."}});return}K.log.warn("Problem encountered loading the alternate audio track.Switching back to default.");for(const l in t.tracks)t.tracks[l].enabled=t.tracks[l]===o;t.onTrackChanged()},SUBTITLES:(r,e)=>()=>{const{mediaTypes:{[r]:t}}=e;K.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track.");const i=t.activeTrack();i&&(i.mode="disabled"),t.onTrackChanged()}},sL={AUDIO:(r,e,t)=>{if(!e)return;const{tech:i,requestOptions:n,segmentLoaders:{[r]:a}}=t;e.on("loadedmetadata",()=>{const s=e.media();a.playlist(s,n),(!i.paused()||s.endList&&i.preload()!=="none")&&a.load()}),e.on("loadedplaylist",()=>{a.playlist(e.media(),n),i.paused()||a.load()}),e.on("error",C0[r](r,t))},SUBTITLES:(r,e,t)=>{const{tech:i,requestOptions:n,segmentLoaders:{[r]:a},mediaTypes:{[r]:s}}=t;e.on("loadedmetadata",()=>{const o=e.media();a.playlist(o,n),a.track(s.activeTrack()),(!i.paused()||o.endList&&i.preload()!=="none")&&a.load()}),e.on("loadedplaylist",()=>{a.playlist(e.media(),n),i.paused()||a.load()}),e.on("error",C0[r](r,t))}},Xne={AUDIO:(r,e)=>{const{vhs:t,sourceType:i,segmentLoaders:{[r]:n},requestOptions:a,main:{mediaGroups:s},mediaTypes:{[r]:{groups:o,tracks:l,logger_:u}},mainPlaylistLoader:c}=e,h=hg(c.main);(!s[r]||Object.keys(s[r]).length===0)&&(s[r]={main:{default:{default:!0}}},h&&(s[r].main.default.playlists=c.main.playlists));for(const d in s[r]){o[d]||(o[d]=[]);for(const f in s[r][d]){let p=s[r][d][f],v;if(h?(u(`AUDIO group '${d}' label '${f}' is a main playlist`),p.isMainPlaylist=!0,v=null):i==="vhs-json"&&p.playlists?v=new bh(p.playlists[0],t,a):p.resolvedUri?v=new bh(p.resolvedUri,t,a):p.playlists&&i==="dash"?v=new vw(p.playlists[0],t,a,c):v=null,p=Pt({id:f,playlistLoader:v},p),sL[r](r,p.playlistLoader,e),o[d].push(p),typeof l[f]>"u"){const g=new K.AudioTrack({id:f,kind:$ne(p),enabled:!1,language:p.language,default:p.default,label:f});l[f]=g}}}n.on("error",C0[r](r,e))},SUBTITLES:(r,e)=>{const{tech:t,vhs:i,sourceType:n,segmentLoaders:{[r]:a},requestOptions:s,main:{mediaGroups:o},mediaTypes:{[r]:{groups:l,tracks:u}},mainPlaylistLoader:c}=e;for(const h in o[r]){l[h]||(l[h]=[]);for(const d in o[r][h]){if(!i.options_.useForcedSubtitles&&o[r][h][d].forced)continue;let f=o[r][h][d],p;if(n==="hls")p=new bh(f.resolvedUri,i,s);else if(n==="dash"){if(!f.playlists.filter(g=>g.excludeUntil!==1/0).length)return;p=new vw(f.playlists[0],i,s,c)}else n==="vhs-json"&&(p=new bh(f.playlists?f.playlists[0]:f.resolvedUri,i,s));if(f=Pt({id:d,playlistLoader:p},f),sL[r](r,f.playlistLoader,e),l[h].push(f),typeof u[d]>"u"){const v=t.addRemoteTextTrack({id:d,kind:"subtitles",default:f.default&&f.autoselect,language:f.language,label:d},!1).track;u[d]=v}}}a.on("error",C0[r](r,e))},"CLOSED-CAPTIONS":(r,e)=>{const{tech:t,main:{mediaGroups:i},mediaTypes:{[r]:{groups:n,tracks:a}}}=e;for(const s in i[r]){n[s]||(n[s]=[]);for(const o in i[r][s]){const l=i[r][s][o];if(!/^(?:CC|SERVICE)/.test(l.instreamId))continue;const u=t.options_.vhs&&t.options_.vhs.captionServices||{};let c={label:o,language:l.language,instreamId:l.instreamId,default:l.default&&l.autoselect};if(u[c.instreamId]&&(c=Pt(c,u[c.instreamId])),c.default===void 0&&delete c.default,n[s].push(Pt({id:o},l)),typeof a[o]>"u"){const h=t.addRemoteTextTrack({id:c.instreamId,kind:"captions",default:c.default,language:c.language,label:c.label},!1).track;a[o]=h}}}}},CU=(r,e)=>{for(let t=0;t<r.length;t++)if(NA(e,r[t])||r[t].playlists&&CU(r[t].playlists,e))return!0;return!1},Yne=(r,e)=>t=>{const{mainPlaylistLoader:i,mediaTypes:{[r]:{groups:n}}}=e,a=i.media();if(!a)return null;let s=null;a.attributes[r]&&(s=n[a.attributes[r]]);const o=Object.keys(n);if(!s)if(r==="AUDIO"&&o.length>1&&hg(e.main))for(let l=0;l<o.length;l++){const u=n[o[l]];if(CU(u,a)){s=u;break}}else n.main?s=n.main:o.length===1&&(s=n[o[0]]);return typeof t>"u"?s:t===null||!s?null:s.filter(l=>l.id===t.id)[0]||null},Kne={AUDIO:(r,e)=>()=>{const{mediaTypes:{[r]:{tracks:t}}}=e;for(const i in t)if(t[i].enabled)return t[i];return null},SUBTITLES:(r,e)=>()=>{const{mediaTypes:{[r]:{tracks:t}}}=e;for(const i in t)if(t[i].mode==="showing"||t[i].mode==="hidden")return t[i];return null}},Zne=(r,{mediaTypes:e})=>()=>{const t=e[r].activeTrack();return t?e[r].activeGroup(t):null},Qne=r=>{["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(u=>{Xne[u](u,r)});const{mediaTypes:e,mainPlaylistLoader:t,tech:i,vhs:n,segmentLoaders:{["AUDIO"]:a,main:s}}=r;["AUDIO","SUBTITLES"].forEach(u=>{e[u].activeGroup=Yne(u,r),e[u].activeTrack=Kne[u](u,r),e[u].onGroupChanged=Wne(u,r),e[u].onGroupChanging=qne(u,r),e[u].onTrackChanged=jne(u,r),e[u].getActiveGroup=Zne(u,r)});const o=e.AUDIO.activeGroup();if(o){const u=(o.filter(h=>h.default)[0]||o[0]).id;e.AUDIO.tracks[u].enabled=!0,e.AUDIO.onGroupChanged(),e.AUDIO.onTrackChanged(),e.AUDIO.getActiveGroup().playlistLoader?(s.setAudio(!1),a.setAudio(!0)):s.setAudio(!0)}t.on("mediachange",()=>{["AUDIO","SUBTITLES"].forEach(u=>e[u].onGroupChanged())}),t.on("mediachanging",()=>{["AUDIO","SUBTITLES"].forEach(u=>e[u].onGroupChanging())});const l=()=>{e.AUDIO.onTrackChanged(),i.trigger({type:"usage",name:"vhs-audio-change"})};i.audioTracks().addEventListener("change",l),i.remoteTextTracks().addEventListener("change",e.SUBTITLES.onTrackChanged),n.on("dispose",()=>{i.audioTracks().removeEventListener("change",l),i.remoteTextTracks().removeEventListener("change",e.SUBTITLES.onTrackChanged)}),i.clearTracks("audio");for(const u in e.AUDIO.tracks)i.audioTracks().addTrack(e.AUDIO.tracks[u])},Jne=()=>{const r={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(e=>{r[e]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Rs,activeTrack:Rs,getActiveGroup:Rs,onGroupChanged:Rs,onTrackChanged:Rs,lastTrack_:null,logger_:ea(`MediaGroups[${e}]`)}}),r};class oL{constructor(){this.priority_=[],this.pathwayClones_=new Map}set version(e){e===1&&(this.version_=e)}set ttl(e){this.ttl_=e||300}set reloadUri(e){e&&(this.reloadUri_=zi(this.reloadUri_,e))}set priority(e){e&&e.length&&(this.priority_=e)}set pathwayClones(e){e&&e.length&&(this.pathwayClones_=new Map(e.map(t=>[t.ID,t])))}get version(){return this.version_}get ttl(){return this.ttl_}get reloadUri(){return this.reloadUri_}get priority(){return this.priority_}get pathwayClones(){return this.pathwayClones_}}class eae extends K.EventTarget{constructor(e,t){super(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=!1,this.availablePathways_=new Set,this.steeringManifest=new oL,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.currentPathwayClones=new Map,this.nextPathwayClones=new Map,this.excludedSteeringManifestURLs=new Set,this.logger_=ea("Content Steering"),this.xhr_=e,this.getBandwidth_=t}assignTagProperties(e,t){this.manifestType_=t.serverUri?"HLS":"DASH";const i=t.serverUri||t.serverURL;if(!i){this.logger_(`steering manifest URL is ${i}, cannot request steering manifest.`),this.trigger("error");return}if(i.startsWith("data:")){this.decodeDataUriManifest_(i.substring(i.indexOf(",")+1));return}this.steeringManifest.reloadUri=zi(e,i),this.defaultPathway=t.pathwayId||t.defaultServiceLocation,this.queryBeforeStart=t.queryBeforeStart,this.proxyServerUrl_=t.proxyServerURL,this.defaultPathway&&!this.queryBeforeStart&&this.trigger("content-steering")}requestSteeringManifest(e){const t=this.steeringManifest.reloadUri;if(!t)return;const i=e?t:this.getRequestURI(t);if(!i){this.logger_("No valid content steering manifest URIs. Stopping content steering."),this.trigger("error"),this.dispose();return}const n={contentSteeringInfo:{uri:i}};this.trigger({type:"contentsteeringloadstart",metadata:n}),this.request_=this.xhr_({uri:i,requestType:"content-steering-manifest"},(a,s)=>{if(a){if(s.status===410){this.logger_(`manifest request 410 ${a}.`),this.logger_(`There will be no more content steering requests to ${i} this session.`),this.excludedSteeringManifestURLs.add(i);return}if(s.status===429){const u=s.responseHeaders["retry-after"];this.logger_(`manifest request 429 ${a}.`),this.logger_(`content steering will retry in ${u} seconds.`),this.startTTLTimeout_(parseInt(u,10));return}this.logger_(`manifest failed to load ${a}.`),this.startTTLTimeout_();return}this.trigger({type:"contentsteeringloadcomplete",metadata:n});let o;try{o=JSON.parse(this.request_.responseText)}catch(u){const c={errorType:K.Error.StreamingContentSteeringParserError,error:u};this.trigger({type:"error",metadata:c})}this.assignSteeringProperties_(o);const l={contentSteeringInfo:n.contentSteeringInfo,contentSteeringManifest:{version:this.steeringManifest.version,reloadUri:this.steeringManifest.reloadUri,priority:this.steeringManifest.priority}};this.trigger({type:"contentsteeringparsed",metadata:l}),this.startTTLTimeout_()})}setProxyServerUrl_(e){const t=new H.URL(e),i=new H.URL(this.proxyServerUrl_);return i.searchParams.set("url",encodeURI(t.toString())),this.setSteeringParams_(i.toString())}decodeDataUriManifest_(e){const t=JSON.parse(H.atob(e));this.assignSteeringProperties_(t)}setSteeringParams_(e){const t=new H.URL(e),i=this.getPathway(),n=this.getBandwidth_();if(i){const a=`_${this.manifestType_}_pathway`;t.searchParams.set(a,i)}if(n){const a=`_${this.manifestType_}_throughput`;t.searchParams.set(a,n)}return t.toString()}assignSteeringProperties_(e){if(this.steeringManifest.version=e.VERSION,!this.steeringManifest.version){this.logger_(`manifest version is ${e.VERSION}, which is not supported.`),this.trigger("error");return}this.steeringManifest.ttl=e.TTL,this.steeringManifest.reloadUri=e["RELOAD-URI"],this.steeringManifest.priority=e["PATHWAY-PRIORITY"]||e["SERVICE-LOCATION-PRIORITY"],this.steeringManifest.pathwayClones=e["PATHWAY-CLONES"],this.nextPathwayClones=this.steeringManifest.pathwayClones,this.availablePathways_.size||(this.logger_("There are no available pathways for content steering. Ending content steering."),this.trigger("error"),this.dispose());const i=(n=>{for(const a of n)if(this.availablePathways_.has(a))return a;return[...this.availablePathways_][0]})(this.steeringManifest.priority);this.currentPathway!==i&&(this.currentPathway=i,this.trigger("content-steering"))}getPathway(){return this.currentPathway||this.defaultPathway}getRequestURI(e){if(!e)return null;const t=n=>this.excludedSteeringManifestURLs.has(n);if(this.proxyServerUrl_){const n=this.setProxyServerUrl_(e);if(!t(n))return n}const i=this.setSteeringParams_(e);return t(i)?null:i}startTTLTimeout_(e=this.steeringManifest.ttl){const t=e*1e3;this.ttlTimeout_=H.setTimeout(()=>{this.requestSteeringManifest()},t)}clearTTLTimeout_(){H.clearTimeout(this.ttlTimeout_),this.ttlTimeout_=null}abort(){this.request_&&this.request_.abort(),this.request_=null}dispose(){this.off("content-steering"),this.off("error"),this.abort(),this.clearTTLTimeout_(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=null,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.excludedSteeringManifestURLs=new Set,this.availablePathways_=new Set,this.steeringManifest=new oL}addAvailablePathway(e){e&&this.availablePathways_.add(e)}clearAvailablePathways(){this.availablePathways_.clear()}excludePathway(e){return this.availablePathways_.delete(e)}didDASHTagChange(e,t){return!t&&this.steeringManifest.reloadUri||t&&(zi(e,t.serverURL)!==this.steeringManifest.reloadUri||t.defaultServiceLocation!==this.defaultPathway||t.queryBeforeStart!==this.queryBeforeStart||t.proxyServerURL!==this.proxyServerUrl_)}getAvailablePathways(){return this.availablePathways_}}const tae=10;let xs;const rae=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred","mediaAppends"],iae=function(r){return this.audioSegmentLoader_[r]+this.mainSegmentLoader_[r]},nae=function({currentPlaylist:r,buffered:e,currentTime:t,nextPlaylist:i,bufferLowWaterLine:n,bufferHighWaterLine:a,duration:s,bufferBasedABR:o,log:l}){if(!i)return K.log.warn("We received no playlist to switch to. Please check your stream."),!1;const u=`allowing switch ${r&&r.id||"null"} -> ${i.id}`;if(!r)return l(`${u} as current playlist is not set`),!0;if(i.id===r.id)return!1;const c=!!_h(e,t).length;if(!r.endList)return!c&&typeof r.partTargetDuration=="number"?(l(`not ${u} as current playlist is live llhls, but currentTime isn't in buffered.`),!1):(l(`${u} as current playlist is live`),!0);const h=kA(e,t),d=o?Vr.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:Vr.MAX_BUFFER_LOW_WATER_LINE;if(s<d)return l(`${u} as duration < max low water line (${s} < ${d})`),!0;const f=i.attributes.BANDWIDTH,p=r.attributes.BANDWIDTH;if(f<p&&(!o||h<a)){let v=`${u} as next bandwidth < current bandwidth (${f} < ${p})`;return o&&(v+=` and forwardBuffer < bufferHighWaterLine (${h} < ${a})`),l(v),!0}if((!o||f>p)&&h>=n){let v=`${u} as forwardBuffer >= bufferLowWaterLine (${h} >= ${n})`;return o&&(v+=` and next bandwidth > current bandwidth (${f} > ${p})`),l(v),!0}return l(`not ${u} as no switching criteria met`),!1};class aae extends K.EventTarget{constructor(e){super();const{src:t,withCredentials:i,tech:n,bandwidth:a,externVhs:s,useCueTags:o,playlistExclusionDuration:l,enableLowInitialPlaylist:u,sourceType:c,cacheEncryptionKeys:h,bufferBasedABR:d,leastPixelDiffSelector:f,captionServices:p,experimentalUseMMS:v}=e;if(!t)throw new Error("A non-empty playlist URL or JSON manifest string is required");let{maxPlaylistRetries:g}=e;(g===null||typeof g>"u")&&(g=1/0),xs=s,this.bufferBasedABR=!!d,this.leastPixelDiffSelector=!!f,this.withCredentials=i,this.tech_=n,this.vhs_=n.vhs,this.player_=e.player_,this.sourceType_=c,this.useCueTags_=o,this.playlistExclusionDuration=l,this.maxPlaylistRetries=g,this.enableLowInitialPlaylist=u,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack("metadata","ad-cues"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=""),this.requestOptions_={withCredentials:i,maxPlaylistRetries:g,timeout:null},this.on("error",this.pauseLoading),this.mediaTypes_=Jne(),v&&H.ManagedMediaSource?(this.tech_.el_.disableRemotePlayback=!0,this.mediaSource=new H.ManagedMediaSource,K.log("Using ManagedMediaSource")):H.MediaSource&&(this.mediaSource=new H.MediaSource),this.handleDurationChange_=this.handleDurationChange_.bind(this),this.handleSourceOpen_=this.handleSourceOpen_.bind(this),this.handleSourceEnded_=this.handleSourceEnded_.bind(this),this.mediaSource.addEventListener("durationchange",this.handleDurationChange_),this.mediaSource.addEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.addEventListener("sourceended",this.handleSourceEnded_),this.seekable_=Zr(),this.hasPlayed_=!1,this.syncController_=new Vne(e),this.segmentMetadataTrack_=n.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,this.decrypter_=new Hne,this.sourceUpdater_=new TU(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new zne,this.keyStatusMap_=new Map;const m={vhs:this.vhs_,parse708captions:e.parse708captions,useDtsForTimestampOffset:e.useDtsForTimestampOffset,captionServices:p,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:()=>this.seekable(),seeking:()=>this.tech_.seeking(),duration:()=>this.duration(),hasPlayed:()=>this.hasPlayed_,goalBufferLength:()=>this.goalBufferLength(),bandwidth:a,syncController:this.syncController_,decrypter:this.decrypter_,sourceType:this.sourceType_,inbandTextTracks:this.inbandTextTracks_,cacheEncryptionKeys:h,sourceUpdater:this.sourceUpdater_,timelineChangeController:this.timelineChangeController_,exactManifestTimings:e.exactManifestTimings,addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)};this.mainPlaylistLoader_=this.sourceType_==="dash"?new vw(t,this.vhs_,Pt(this.requestOptions_,{addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)})):new bh(t,this.vhs_,Pt(this.requestOptions_,{addDateRangesToTextTrack:this.addDateRangesToTextTrack_.bind(this)})),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new yw(Pt(m,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:"main"}),e),this.audioSegmentLoader_=new yw(Pt(m,{loaderType:"audio"}),e),this.subtitleSegmentLoader_=new One(Pt(m,{loaderType:"vtt",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks,loadVttJs:()=>new Promise((b,T)=>{function x(){n.off("vttjserror",C),b()}function C(){n.off("vttjsloaded",x),T()}n.one("vttjsloaded",x),n.one("vttjserror",C),n.addWebVttScript_()})}),e);const y=()=>this.mainSegmentLoader_.bandwidth;this.contentSteeringController_=new eae(this.vhs_.xhr,y),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one("loadedplaylist",()=>this.startABRTimer_()),this.tech_.on("pause",()=>this.stopABRTimer_()),this.tech_.on("play",()=>this.startABRTimer_())),rae.forEach(b=>{this[b+"_"]=iae.bind(this,b)}),this.logger_=ea("pc"),this.triggeredFmp4Usage=!1,this.tech_.preload()==="none"?(this.loadOnPlay_=()=>{this.loadOnPlay_=null,this.mainPlaylistLoader_.load()},this.tech_.one("play",this.loadOnPlay_)):this.mainPlaylistLoader_.load(),this.timeToLoadedData__=-1,this.mainAppendsToLoadedData__=-1,this.audioAppendsToLoadedData__=-1;const _=this.tech_.preload()==="none"?"play":"loadstart";this.tech_.one(_,()=>{const b=Date.now();this.tech_.one("loadeddata",()=>{this.timeToLoadedData__=Date.now()-b,this.mainAppendsToLoadedData__=this.mainSegmentLoader_.mediaAppends,this.audioAppendsToLoadedData__=this.audioSegmentLoader_.mediaAppends})})}mainAppendsToLoadedData_(){return this.mainAppendsToLoadedData__}audioAppendsToLoadedData_(){return this.audioAppendsToLoadedData__}appendsToLoadedData_(){const e=this.mainAppendsToLoadedData_(),t=this.audioAppendsToLoadedData_();return e===-1||t===-1?-1:e+t}timeToLoadedData_(){return this.timeToLoadedData__}checkABR_(e="abr"){const t=this.selectPlaylist();t&&this.shouldSwitchToMedia_(t)&&this.switchMedia_(t,e)}switchMedia_(e,t,i){const n=this.media(),a=n&&(n.id||n.uri),s=e&&(e.id||e.uri);if(a&&a!==s){this.logger_(`switch media ${a} -> ${s} from ${t}`);const o={renditionInfo:{id:s,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS},cause:t};this.trigger({type:"renditionselected",metadata:o}),this.tech_.trigger({type:"usage",name:`vhs-rendition-change-${t}`})}this.mainPlaylistLoader_.media(e,i)}switchMediaForDASHContentSteering_(){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(e=>{const t=this.mediaTypes_[e],i=t?t.activeGroup():null,n=this.contentSteeringController_.getPathway();if(i&&n){const s=(i.length?i[0].playlists:i.playlists).filter(o=>o.attributes.serviceLocation===n);s.length&&this.mediaTypes_[e].activePlaylistLoader.media(s[0])}})}startABRTimer_(){this.stopABRTimer_(),this.abrTimer_=H.setInterval(()=>this.checkABR_(),250)}stopABRTimer_(){this.tech_.scrubbing&&this.tech_.scrubbing()||(H.clearInterval(this.abrTimer_),this.abrTimer_=null)}getAudioTrackPlaylists_(){const e=this.main(),t=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return t;const i=e.mediaGroups.AUDIO,n=Object.keys(i);let a;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)a=this.mediaTypes_.AUDIO.activeTrack();else{const o=i.main||n.length&&i[n[0]];for(const l in o)if(o[l].default){a={label:l};break}}if(!a)return t;const s=[];for(const o in i)if(i[o][a.label]){const l=i[o][a.label];if(l.playlists&&l.playlists.length)s.push.apply(s,l.playlists);else if(l.uri)s.push(l);else if(e.playlists.length)for(let u=0;u<e.playlists.length;u++){const c=e.playlists[u];c.attributes&&c.attributes.AUDIO&&c.attributes.AUDIO===o&&s.push(c)}}return s.length?s:t}setupMainPlaylistLoaderListeners_(){this.mainPlaylistLoader_.on("loadedmetadata",()=>{const t=this.mainPlaylistLoader_.media(),i=t.targetDuration*1.5*1e3;cw(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=i,t.endList&&this.tech_.preload()!=="none"&&(this.mainSegmentLoader_.playlist(t,this.requestOptions_),this.mainSegmentLoader_.load()),Qne({sourceType:this.sourceType_,segmentLoaders:{AUDIO:this.audioSegmentLoader_,SUBTITLES:this.subtitleSegmentLoader_,main:this.mainSegmentLoader_},tech:this.tech_,requestOptions:this.requestOptions_,mainPlaylistLoader:this.mainPlaylistLoader_,vhs:this.vhs_,main:this.main(),mediaTypes:this.mediaTypes_,excludePlaylist:this.excludePlaylist.bind(this)}),this.triggerPresenceUsage_(this.main(),t),this.setupFirstPlay(),!this.mediaTypes_.AUDIO.activePlaylistLoader||this.mediaTypes_.AUDIO.activePlaylistLoader.media()?this.trigger("selectedinitialmedia"):this.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",()=>{this.trigger("selectedinitialmedia")})}),this.mainPlaylistLoader_.on("loadedplaylist",()=>{this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_);let t=this.mainPlaylistLoader_.media();if(!t){this.attachContentSteeringListeners_(),this.initContentSteeringController_(),this.excludeUnsupportedVariants_();let i;if(this.enableLowInitialPlaylist&&(i=this.selectInitialPlaylist()),i||(i=this.selectPlaylist()),!i||!this.shouldSwitchToMedia_(i)||(this.initialMedia_=i,this.switchMedia_(this.initialMedia_,"initial"),!(this.sourceType_==="vhs-json"&&this.initialMedia_.segments)))return;t=this.initialMedia_}this.handleUpdatedMediaPlaylist(t)}),this.mainPlaylistLoader_.on("error",()=>{const t=this.mainPlaylistLoader_.error;this.excludePlaylist({playlistToExclude:t.playlist,error:t})}),this.mainPlaylistLoader_.on("mediachanging",()=>{this.mainSegmentLoader_.abort(),this.mainSegmentLoader_.pause()}),this.mainPlaylistLoader_.on("mediachange",()=>{const t=this.mainPlaylistLoader_.media(),i=t.targetDuration*1.5*1e3;cw(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=i,this.sourceType_==="dash"&&this.mainPlaylistLoader_.load(),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(t,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_?this.runFastQualitySwitch_():this.mainSegmentLoader_.load(),this.tech_.trigger({type:"mediachange",bubbles:!0})}),this.mainPlaylistLoader_.on("playlistunchanged",()=>{const t=this.mainPlaylistLoader_.media();if(t.lastExcludeReason_==="playlist-unchanged")return;this.stuckAtPlaylistEnd_(t)&&(this.excludePlaylist({error:{message:"Playlist no longer updating.",reason:"playlist-unchanged"}}),this.tech_.trigger("playliststuck"))}),this.mainPlaylistLoader_.on("renditiondisabled",()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"})}),this.mainPlaylistLoader_.on("renditionenabled",()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"})}),["manifestrequeststart","manifestrequestcomplete","manifestparsestart","manifestparsecomplete","playlistrequeststart","playlistrequestcomplete","playlistparsestart","playlistparsecomplete","renditiondisabled","renditionenabled"].forEach(t=>{this.mainPlaylistLoader_.on(t,i=>{this.player_.trigger(or({},i))})})}handleUpdatedMediaPlaylist(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_&&this.runFastQualitySwitch_(),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())}triggerPresenceUsage_(e,t){const i=e.mediaGroups||{};let n=!0;const a=Object.keys(i.AUDIO);for(const s in i.AUDIO)for(const o in i.AUDIO[s])i.AUDIO[s][o].uri||(n=!1);n&&this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),Object.keys(i.SUBTITLES).length&&this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),xs.Playlist.isAes(t)&&this.tech_.trigger({type:"usage",name:"vhs-aes"}),a.length&&Object.keys(i.AUDIO[a[0]]).length>1&&this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.useCueTags_&&this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"})}shouldSwitchToMedia_(e){const t=this.mainPlaylistLoader_.media()||this.mainPlaylistLoader_.pendingMedia_,i=this.tech_.currentTime(),n=this.bufferLowWaterLine(),a=this.bufferHighWaterLine(),s=this.tech_.buffered();return nae({buffered:s,currentTime:i,currentPlaylist:t,nextPlaylist:e,bufferLowWaterLine:n,bufferHighWaterLine:a,duration:this.duration(),bufferBasedABR:this.bufferBasedABR,log:this.logger_})}setupSegmentLoaderListeners_(){this.mainSegmentLoader_.on("bandwidthupdate",()=>{this.checkABR_("bandwidthupdate"),this.tech_.trigger("bandwidthupdate")}),this.mainSegmentLoader_.on("timeout",()=>{this.bufferBasedABR&&this.mainSegmentLoader_.load()}),this.bufferBasedABR||this.mainSegmentLoader_.on("progress",()=>{this.trigger("progress")}),this.mainSegmentLoader_.on("error",()=>{const i=this.mainSegmentLoader_.error();this.excludePlaylist({playlistToExclude:i.playlist,error:i})}),this.mainSegmentLoader_.on("appenderror",()=>{this.error=this.mainSegmentLoader_.error_,this.trigger("error")}),this.mainSegmentLoader_.on("syncinfoupdate",()=>{this.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on("timestampoffset",()=>{this.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"})}),this.audioSegmentLoader_.on("syncinfoupdate",()=>{this.onSyncInfoUpdate_()}),this.audioSegmentLoader_.on("appenderror",()=>{this.error=this.audioSegmentLoader_.error_,this.trigger("error")}),this.mainSegmentLoader_.on("ended",()=>{this.logger_("main segment loader ended"),this.onEndOfStream()}),this.timelineChangeController_.on("audioTimelineBehind",()=>{const i=this.audioSegmentLoader_.pendingSegment_;if(!i||!i.segment||!i.segment.syncInfo)return;const n=i.segment.syncInfo.end+.01;this.tech_.setCurrentTime(n)}),this.mainSegmentLoader_.on("earlyabort",i=>{this.bufferBasedABR||(this.delegateLoaders_("all",["abort"]),this.excludePlaylist({error:{message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},playlistExclusionDuration:tae}))});const e=()=>{if(!this.sourceUpdater_.hasCreatedSourceBuffers())return this.tryToCreateSourceBuffers_();const i=this.getCodecsOrExclude_();i&&this.sourceUpdater_.addOrChangeSourceBuffers(i)};this.mainSegmentLoader_.on("trackinfo",e),this.audioSegmentLoader_.on("trackinfo",e),this.mainSegmentLoader_.on("fmp4",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("fmp4",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("ended",()=>{this.logger_("audioSegmentLoader ended"),this.onEndOfStream()}),["segmentselected","segmentloadstart","segmentloaded","segmentkeyloadstart","segmentkeyloadcomplete","segmentdecryptionstart","segmentdecryptioncomplete","segmenttransmuxingstart","segmenttransmuxingcomplete","segmenttransmuxingtrackinfoavailable","segmenttransmuxingtiminginfoavailable","segmentappendstart","appendsdone","bandwidthupdated","timelinechange","codecschange"].forEach(i=>{this.mainSegmentLoader_.on(i,n=>{this.player_.trigger(or({},n))}),this.audioSegmentLoader_.on(i,n=>{this.player_.trigger(or({},n))}),this.subtitleSegmentLoader_.on(i,n=>{this.player_.trigger(or({},n))})})}mediaSecondsLoaded_(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}load(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}fastQualityChange_(e=this.selectPlaylist()){if(e&&e===this.mainPlaylistLoader_.media()){this.logger_("skipping fastQualityChange because new media is same as old");return}this.switchMedia_(e,"fast-quality"),this.waitingForFastQualityPlaylistReceived_=!0}runFastQualitySwitch_(){this.waitingForFastQualityPlaylistReceived_=!1,this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(()=>{this.mainSegmentLoader_.load()})}play(){if(this.setupFirstPlay())return;this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();const e=this.tech_.seekable();if(this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0))return this.tech_.setCurrentTime(e.end(e.length-1))}setupFirstPlay(){const e=this.mainPlaylistLoader_.media();if(!e||this.tech_.paused()||this.hasPlayed_)return!1;if(!e.endList||e.start){const t=this.seekable();if(!t.length)return!1;const i=t.end(0);let n=i;if(e.start){const a=e.start.timeOffset;a<0?n=Math.max(i+a,t.start(0)):n=Math.min(i,a)}this.trigger("firstplay"),this.tech_.setCurrentTime(n)}return this.hasPlayed_=!0,this.load(),!0}handleSourceOpen_(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){const e=this.tech_.play();typeof e<"u"&&typeof e.then=="function"&&e.then(null,t=>{})}this.trigger("sourceopen")}handleSourceEnded_(){if(!this.inbandTextTracks_.metadataTrack_)return;const e=this.inbandTextTracks_.metadataTrack_.cues;if(!e||!e.length)return;const t=this.duration();e[e.length-1].endTime=isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t}handleDurationChange_(){this.tech_.trigger("durationchange")}onEndOfStream(){let e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){const t=this.mainSegmentLoader_.getCurrentMediaInfo_();!t||t.hasVideo?e=e&&this.audioSegmentLoader_.ended_:e=this.audioSegmentLoader_.ended_}e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())}stuckAtPlaylistEnd_(e){if(!this.seekable().length)return!1;const i=this.syncController_.getExpiredTime(e,this.duration());if(i===null)return!1;const n=xs.Playlist.playlistEnd(e,i),a=this.tech_.currentTime(),s=this.tech_.buffered();if(!s.length)return n-a<=Za;const o=s.end(s.length-1);return o-a<=Za&&n-o<=Za}excludePlaylist({playlistToExclude:e=this.mainPlaylistLoader_.media(),error:t={},playlistExclusionDuration:i}){if(e=e||this.mainPlaylistLoader_.media(),i=i||t.playlistExclusionDuration||this.playlistExclusionDuration,!e){this.error=t,this.mediaSource.readyState!=="open"?this.trigger("error"):this.sourceUpdater_.endOfStream("network");return}e.playlistErrors_++;const n=this.mainPlaylistLoader_.main.playlists,a=n.filter(c1),s=a.length===1&&a[0]===e;if(n.length===1&&i!==1/0)return K.log.warn(`Problem encountered with playlist ${e.id}. Trying again since it is the only playlist.`),this.tech_.trigger("retryplaylist"),this.mainPlaylistLoader_.load(s);if(s){if(this.main().contentSteering){const p=this.pathwayAttribute_(e),v=this.contentSteeringController_.steeringManifest.ttl*1e3;this.contentSteeringController_.excludePathway(p),this.excludeThenChangePathway_(),setTimeout(()=>{this.contentSteeringController_.addAvailablePathway(p)},v);return}let f=!1;n.forEach(p=>{if(p===e)return;const v=p.excludeUntil;typeof v<"u"&&v!==1/0&&(f=!0,delete p.excludeUntil)}),f&&(K.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}let o;e.playlistErrors_>this.maxPlaylistRetries?o=1/0:o=Date.now()+i*1e3,e.excludeUntil=o,t.reason&&(e.lastExcludeReason_=t.reason),this.tech_.trigger("excludeplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-excluded"});const l=this.selectPlaylist();if(!l){this.error="Playback cannot continue. No available working or supported playlists.",this.trigger("error");return}const u=t.internal?this.logger_:K.log.warn,c=t.message?" "+t.message:"";u(`${t.internal?"Internal problem":"Problem"} encountered with playlist ${e.id}.${c} Switching to playlist ${l.id}.`),l.attributes.AUDIO!==e.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),l.attributes.SUBTITLES!==e.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);const h=l.targetDuration/2*1e3||5*1e3,d=typeof l.lastRequest=="number"&&Date.now()-l.lastRequest<=h;return this.switchMedia_(l,"exclude",s||d)}pauseLoading(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()}delegateLoaders_(e,t){const i=[],n=e==="all";(n||e==="main")&&i.push(this.mainPlaylistLoader_);const a=[];(n||e==="audio")&&a.push("AUDIO"),(n||e==="subtitle")&&(a.push("CLOSED-CAPTIONS"),a.push("SUBTITLES")),a.forEach(s=>{const o=this.mediaTypes_[s]&&this.mediaTypes_[s].activePlaylistLoader;o&&i.push(o)}),["main","audio","subtitle"].forEach(s=>{const o=this[`${s}SegmentLoader_`];o&&(e===s||e==="all")&&i.push(o)}),i.forEach(s=>t.forEach(o=>{typeof s[o]=="function"&&s[o]()}))}setCurrentTime(e){const t=_h(this.tech_.buffered(),e);if(!(this.mainPlaylistLoader_&&this.mainPlaylistLoader_.media())||!this.mainPlaylistLoader_.media().segments)return 0;if(t&&t.length)return e;this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}duration(){if(!this.mainPlaylistLoader_)return 0;const e=this.mainPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:xs.Playlist.duration(e):1/0:0}seekable(){return this.seekable_}onSyncInfoUpdate_(){let e;if(!this.mainPlaylistLoader_)return;let t=this.mainPlaylistLoader_.media();if(!t)return;let i=this.syncController_.getExpiredTime(t,this.duration());if(i===null)return;const n=this.mainPlaylistLoader_.main,a=xs.Playlist.seekable(t,i,xs.Playlist.liveEdgeDelay(n,t));if(a.length===0||this.mediaTypes_.AUDIO.activePlaylistLoader&&(t=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),i=this.syncController_.getExpiredTime(t,this.duration()),i===null||(e=xs.Playlist.seekable(t,i,xs.Playlist.liveEdgeDelay(n,t)),e.length===0)))return;let s,o;if(this.seekable_&&this.seekable_.length&&(s=this.seekable_.end(0),o=this.seekable_.start(0)),e?e.start(0)>a.end(0)||a.start(0)>e.end(0)?this.seekable_=a:this.seekable_=Zr([[e.start(0)>a.start(0)?e.start(0):a.start(0),e.end(0)<a.end(0)?e.end(0):a.end(0)]]):this.seekable_=a,this.seekable_&&this.seekable_.length&&this.seekable_.end(0)===s&&this.seekable_.start(0)===o)return;this.logger_(`seekable updated [${B8(this.seekable_)}]`);const l={seekableRanges:this.seekable_};this.trigger({type:"seekablerangeschanged",metadata:l}),this.tech_.trigger("seekablechanged")}updateDuration(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.updateDuration_=null),this.mediaSource.readyState!=="open"){this.updateDuration_=this.updateDuration.bind(this,e),this.mediaSource.addEventListener("sourceopen",this.updateDuration_);return}if(e){const n=this.seekable();if(!n.length)return;(isNaN(this.mediaSource.duration)||this.mediaSource.duration<n.end(n.length-1))&&this.sourceUpdater_.setDuration(n.end(n.length-1));return}const t=this.tech_.buffered();let i=xs.Playlist.duration(this.mainPlaylistLoader_.media());t.length>0&&(i=Math.max(i,t.end(t.length-1))),this.mediaSource.duration!==i&&this.sourceUpdater_.setDuration(i)}dispose(){this.trigger("dispose"),this.decrypter_.terminate(),this.mainPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.contentSteeringController_.dispose(),this.keyStatusMap_.clear(),this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_),["AUDIO","SUBTITLES"].forEach(e=>{const t=this.mediaTypes_[e].groups;for(const i in t)t[i].forEach(n=>{n.playlistLoader&&n.playlistLoader.dispose()})}),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.mediaSource.removeEventListener("durationchange",this.handleDurationChange_),this.mediaSource.removeEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.removeEventListener("sourceended",this.handleSourceEnded_),this.off()}main(){return this.mainPlaylistLoader_.main}media(){return this.mainPlaylistLoader_.media()||this.initialMedia_}areMediaTypesKnown_(){const e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,t=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),i=e?!!this.audioSegmentLoader_.getCurrentMediaInfo_():!0;return!(!t||!i)}getCodecsOrExclude_(){const e={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},t=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();e.video=e.main;const i=Rp(this.main(),t),n={},a=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(e.main.hasVideo&&(n.video=i.video||e.main.videoCodec||xJ),e.main.isMuxed&&(n.video+=`,${i.audio||e.main.audioCodec||GP}`),(e.main.hasAudio&&!e.main.isMuxed||e.audio.hasAudio||a)&&(n.audio=i.audio||e.main.audioCodec||e.audio.audioCodec||GP,e.audio.isFmp4=e.main.hasAudio&&!e.main.isMuxed?e.main.isFmp4:e.audio.isFmp4),!n.audio&&!n.video){this.excludePlaylist({playlistToExclude:t,error:{message:"Could not determine codecs for playlist."},playlistExclusionDuration:1/0});return}const s=(u,c)=>u?Ep(c):kb(c),o={};let l;if(["video","audio"].forEach(function(u){if(n.hasOwnProperty(u)&&!s(e[u].isFmp4,n[u])){const c=e[u].isFmp4?"browser":"muxer";o[c]=o[c]||[],o[c].push(n[u]),u==="audio"&&(l=c)}}),a&&l&&t.attributes.AUDIO){const u=t.attributes.AUDIO;this.main().playlists.forEach(c=>{(c.attributes&&c.attributes.AUDIO)===u&&c!==t&&(c.excludeUntil=1/0)}),this.logger_(`excluding audio group ${u} as ${l} does not support codec(s): "${n.audio}"`)}if(Object.keys(o).length){const u=Object.keys(o).reduce((c,h)=>(c&&(c+=", "),c+=`${h} does not support codec(s): "${o[h].join(",")}"`,c),"")+".";this.excludePlaylist({playlistToExclude:t,error:{internal:!0,message:u},playlistExclusionDuration:1/0});return}if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){const u=[];if(["video","audio"].forEach(c=>{const h=(Ga(this.sourceUpdater_.codecs[c]||"")[0]||{}).type,d=(Ga(n[c]||"")[0]||{}).type;h&&d&&h.toLowerCase()!==d.toLowerCase()&&u.push(`"${this.sourceUpdater_.codecs[c]}" -> "${n[c]}"`)}),u.length){this.excludePlaylist({playlistToExclude:t,error:{message:`Codec switching not supported: ${u.join(", ")}.`,internal:!0},playlistExclusionDuration:1/0});return}}return n}tryToCreateSourceBuffers_(){if(this.mediaSource.readyState!=="open"||this.sourceUpdater_.hasCreatedSourceBuffers()||!this.areMediaTypesKnown_())return;const e=this.getCodecsOrExclude_();if(!e)return;this.sourceUpdater_.createSourceBuffers(e);const t=[e.video,e.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(t)}excludeUnsupportedVariants_(){const e=this.main().playlists,t=[];Object.keys(e).forEach(i=>{const n=e[i];if(t.indexOf(n.id)!==-1)return;t.push(n.id);const a=Rp(this.main,n),s=[];a.audio&&!kb(a.audio)&&!Ep(a.audio)&&s.push(`audio codec ${a.audio}`),a.video&&!kb(a.video)&&!Ep(a.video)&&s.push(`video codec ${a.video}`),a.text&&a.text==="stpp.ttml.im1t"&&s.push(`text codec ${a.text}`),s.length&&(n.excludeUntil=1/0,this.logger_(`excluding ${n.id} for unsupported: ${s.join(", ")}`))})}excludeIncompatibleVariants_(e){const t=[],i=this.main().playlists,n=x0(Ga(e)),a=XM(n),s=n.video&&Ga(n.video)[0]||null,o=n.audio&&Ga(n.audio)[0]||null;Object.keys(i).forEach(l=>{const u=i[l];if(t.indexOf(u.id)!==-1||u.excludeUntil===1/0)return;t.push(u.id);const c=[],h=Rp(this.mainPlaylistLoader_.main,u),d=XM(h);if(!(!h.audio&&!h.video)){if(d!==a&&c.push(`codec count "${d}" !== "${a}"`),!this.sourceUpdater_.canChangeType()){const f=h.video&&Ga(h.video)[0]||null,p=h.audio&&Ga(h.audio)[0]||null;f&&s&&f.type.toLowerCase()!==s.type.toLowerCase()&&c.push(`video codec "${f.type}" !== "${s.type}"`),p&&o&&p.type.toLowerCase()!==o.type.toLowerCase()&&c.push(`audio codec "${p.type}" !== "${o.type}"`)}c.length&&(u.excludeUntil=1/0,this.logger_(`excluding ${u.id}: ${c.join(" && ")}`))}})}updateAdCues_(e){let t=0;const i=this.seekable();i.length&&(t=i.start(0)),Bne(e,this.cueTagsTrack_,t)}goalBufferLength(){const e=this.tech_.currentTime(),t=Vr.GOAL_BUFFER_LENGTH,i=Vr.GOAL_BUFFER_LENGTH_RATE,n=Math.max(t,Vr.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*i,n)}bufferLowWaterLine(){const e=this.tech_.currentTime(),t=Vr.BUFFER_LOW_WATER_LINE,i=Vr.BUFFER_LOW_WATER_LINE_RATE,n=Math.max(t,Vr.MAX_BUFFER_LOW_WATER_LINE),a=Math.max(t,Vr.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*i,this.bufferBasedABR?a:n)}bufferHighWaterLine(){return Vr.BUFFER_HIGH_WATER_LINE}addDateRangesToTextTrack_(e){ZM(this.inbandTextTracks_,"com.apple.streaming",this.tech_),vne({inbandTextTracks:this.inbandTextTracks_,dateRanges:e})}addMetadataToTextTrack(e,t,i){const n=this.sourceUpdater_.videoBuffer?this.sourceUpdater_.videoTimestampOffset():this.sourceUpdater_.audioTimestampOffset();ZM(this.inbandTextTracks_,e,this.tech_),fne({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:n,videoDuration:i})}pathwayAttribute_(e){return e.attributes["PATHWAY-ID"]||e.attributes.serviceLocation}initContentSteeringController_(){const e=this.main();if(e.contentSteering){for(const t of e.playlists)this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(t));if(this.contentSteeringController_.assignTagProperties(e.uri,e.contentSteering),this.contentSteeringController_.queryBeforeStart){this.contentSteeringController_.requestSteeringManifest(!0);return}this.tech_.one("canplay",()=>{this.contentSteeringController_.requestSteeringManifest()})}}resetContentSteeringController_(){this.contentSteeringController_.clearAvailablePathways(),this.contentSteeringController_.dispose(),this.initContentSteeringController_()}attachContentSteeringListeners_(){this.contentSteeringController_.on("content-steering",this.excludeThenChangePathway_.bind(this)),["contentsteeringloadstart","contentsteeringloadcomplete","contentsteeringparsed"].forEach(t=>{this.contentSteeringController_.on(t,i=>{this.trigger(or({},i))})}),this.sourceType_==="dash"&&this.mainPlaylistLoader_.on("loadedplaylist",()=>{const t=this.main();(this.contentSteeringController_.didDASHTagChange(t.uri,t.contentSteering)||(()=>{const a=this.contentSteeringController_.getAvailablePathways(),s=[];for(const o of t.playlists){const l=o.attributes.serviceLocation;if(l&&(s.push(l),!a.has(l)))return!0}return!!(!s.length&&a.size)})())&&this.resetContentSteeringController_()})}excludeThenChangePathway_(){const e=this.contentSteeringController_.getPathway();if(!e)return;this.handlePathwayClones_();const i=this.main().playlists,n=new Set;let a=!1;Object.keys(i).forEach(s=>{const o=i[s],l=this.pathwayAttribute_(o),u=l&&e!==l;o.excludeUntil===1/0&&o.lastExcludeReason_==="content-steering"&&!u&&(delete o.excludeUntil,delete o.lastExcludeReason_,a=!0);const h=!o.excludeUntil&&o.excludeUntil!==1/0;!n.has(o.id)&&u&&h&&(n.add(o.id),o.excludeUntil=1/0,o.lastExcludeReason_="content-steering",this.logger_(`excluding ${o.id} for ${o.lastExcludeReason_}`))}),this.contentSteeringController_.manifestType_==="DASH"&&Object.keys(this.mediaTypes_).forEach(s=>{const o=this.mediaTypes_[s];if(o.activePlaylistLoader){const l=o.activePlaylistLoader.media_;l&&l.attributes.serviceLocation!==e&&(a=!0)}}),a&&this.changeSegmentPathway_()}handlePathwayClones_(){const t=this.main().playlists,i=this.contentSteeringController_.currentPathwayClones,n=this.contentSteeringController_.nextPathwayClones;if(i&&i.size||n&&n.size){for(const[s,o]of i.entries())n.get(s)||(this.mainPlaylistLoader_.updateOrDeleteClone(o),this.contentSteeringController_.excludePathway(s));for(const[s,o]of n.entries()){const l=i.get(s);if(!l){t.filter(c=>c.attributes["PATHWAY-ID"]===o["BASE-ID"]).forEach(c=>{this.mainPlaylistLoader_.addClonePathway(o,c)}),this.contentSteeringController_.addAvailablePathway(s);continue}this.equalPathwayClones_(l,o)||(this.mainPlaylistLoader_.updateOrDeleteClone(o,!0),this.contentSteeringController_.addAvailablePathway(s))}this.contentSteeringController_.currentPathwayClones=new Map(JSON.parse(JSON.stringify([...n])))}}equalPathwayClones_(e,t){if(e["BASE-ID"]!==t["BASE-ID"]||e.ID!==t.ID||e["URI-REPLACEMENT"].HOST!==t["URI-REPLACEMENT"].HOST)return!1;const i=e["URI-REPLACEMENT"].PARAMS,n=t["URI-REPLACEMENT"].PARAMS;for(const a in i)if(i[a]!==n[a])return!1;for(const a in n)if(i[a]!==n[a])return!1;return!0}changeSegmentPathway_(){const e=this.selectPlaylist();this.pauseLoading(),this.contentSteeringController_.manifestType_==="DASH"&&this.switchMediaForDASHContentSteering_(),this.switchMedia_(e,"content-steering")}excludeNonUsablePlaylistsByKeyId_(){if(!this.mainPlaylistLoader_||!this.mainPlaylistLoader_.main)return;let e=0;const t="non-usable";this.mainPlaylistLoader_.main.playlists.forEach(i=>{const n=this.mainPlaylistLoader_.getKeyIdSet(i);!n||!n.size||n.forEach(a=>{const s="usable",o=this.keyStatusMap_.has(a)&&this.keyStatusMap_.get(a)===s,l=i.lastExcludeReason_===t&&i.excludeUntil===1/0;o?o&&l&&(delete i.excludeUntil,delete i.lastExcludeReason_,this.logger_(`enabling playlist ${i.id} because key ID ${a} is ${s}`)):(i.excludeUntil!==1/0&&i.lastExcludeReason_!==t&&(i.excludeUntil=1/0,i.lastExcludeReason_=t,this.logger_(`excluding playlist ${i.id} because the key ID ${a} doesn't exist in the keyStatusMap or is not ${s}`)),e++)})}),e>=this.mainPlaylistLoader_.main.playlists.length&&this.mainPlaylistLoader_.main.playlists.forEach(i=>{const n=i&&i.attributes&&i.attributes.RESOLUTION&&i.attributes.RESOLUTION.height<720,a=i.excludeUntil===1/0&&i.lastExcludeReason_===t;n&&a&&(delete i.excludeUntil,K.log.warn(`enabling non-HD playlist ${i.id} because all playlists were excluded due to ${t} key IDs`))})}addKeyStatus_(e,t){const a=(typeof e=="string"?e:kne(e)).slice(0,32).toLowerCase();this.logger_(`KeyStatus '${t}' with key ID ${a} added to the keyStatusMap`),this.keyStatusMap_.set(a,t)}updatePlaylistByKeyStatus(e,t){this.addKeyStatus_(e,t),this.waitingForFastQualityPlaylistReceived_||this.excludeNonUsableThenChangePlaylist_(),this.mainPlaylistLoader_.off("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this)),this.mainPlaylistLoader_.on("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this))}excludeNonUsableThenChangePlaylist_(){this.excludeNonUsablePlaylistsByKeyId_(),this.fastQualityChange_()}}const sae=(r,e,t)=>i=>{const n=r.main.playlists[e],a=OA(n),s=c1(n);if(typeof i>"u")return s;i?delete n.disabled:n.disabled=!0;const o={renditionInfo:{id:e,bandwidth:n.attributes.BANDWIDTH,resolution:n.attributes.RESOLUTION,codecs:n.attributes.CODECS},cause:"fast-quality"};return i!==s&&!a&&(t(n),i?r.trigger({type:"renditionenabled",metadata:o}):r.trigger({type:"renditiondisabled",metadata:o})),i};class oae{constructor(e,t,i){const{playlistController_:n}=e,a=n.fastQualityChange_.bind(n);if(t.attributes){const s=t.attributes.RESOLUTION;this.width=s&&s.width,this.height=s&&s.height,this.bandwidth=t.attributes.BANDWIDTH,this.frameRate=t.attributes["FRAME-RATE"]}this.codecs=Rp(n.main(),t),this.playlist=t,this.id=i,this.enabled=sae(e.playlists,t.id,a)}}const lae=function(r){r.representations=()=>{const e=r.playlistController_.main(),t=hg(e)?r.playlistController_.getAudioTrackPlaylists_():e.playlists;return t?t.filter(i=>!OA(i)).map((i,n)=>new oae(r,i,i.id)):[]}},lL=["seeking","seeked","pause","playing","error"];class uae extends K.EventTarget{constructor(e){super(),this.playlistController_=e.playlistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.playedRanges_=[],this.consecutiveUpdates=0,this.lastRecordedTime=null,this.checkCurrentTimeTimeout_=null,this.logger_=ea("PlaybackWatcher"),this.logger_("initialize");const t=()=>this.monitorCurrentTime_(),i=()=>this.monitorCurrentTime_(),n=()=>this.techWaiting_(),a=()=>this.resetTimeUpdate_(),s=this.playlistController_,o=["main","subtitle","audio"],l={};o.forEach(c=>{l[c]={reset:()=>this.resetSegmentDownloads_(c),updateend:()=>this.checkSegmentDownloads_(c)},s[`${c}SegmentLoader_`].on("appendsdone",l[c].updateend),s[`${c}SegmentLoader_`].on("playlistupdate",l[c].reset),this.tech_.on(["seeked","seeking"],l[c].reset)});const u=c=>{["main","audio"].forEach(h=>{s[`${h}SegmentLoader_`][c]("appended",this.seekingAppendCheck_)})};this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),u("off"))},this.clearSeekingAppendCheck_=()=>u("off"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),u("on")},this.tech_.on("seeked",this.clearSeekingAppendCheck_),this.tech_.on("seeking",this.watchForBadSeeking_),this.tech_.on("waiting",n),this.tech_.on(lL,a),this.tech_.on("canplay",i),this.tech_.one("play",t),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_("dispose"),this.tech_.off("waiting",n),this.tech_.off(lL,a),this.tech_.off("canplay",i),this.tech_.off("play",t),this.tech_.off("seeking",this.watchForBadSeeking_),this.tech_.off("seeked",this.clearSeekingAppendCheck_),o.forEach(c=>{s[`${c}SegmentLoader_`].off("appendsdone",l[c].updateend),s[`${c}SegmentLoader_`].off("playlistupdate",l[c].reset),this.tech_.off(["seeked","seeking"],l[c].reset)}),this.checkCurrentTimeTimeout_&&H.clearTimeout(this.checkCurrentTimeTimeout_),this.resetTimeUpdate_()}}monitorCurrentTime_(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&H.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=H.setTimeout(this.monitorCurrentTime_.bind(this),250)}resetSegmentDownloads_(e){const t=this.playlistController_[`${e}SegmentLoader_`];this[`${e}StalledDownloads_`]>0&&this.logger_(`resetting possible stalled download count for ${e} loader`),this[`${e}StalledDownloads_`]=0,this[`${e}Buffered_`]=t.buffered_()}checkSegmentDownloads_(e){const t=this.playlistController_,i=t[`${e}SegmentLoader_`],n=i.buffered_(),a=Yre(this[`${e}Buffered_`],n);if(this[`${e}Buffered_`]=n,a){const s={bufferedRanges:n};t.trigger({type:"bufferedrangeschanged",metadata:s}),this.resetSegmentDownloads_(e);return}this[`${e}StalledDownloads_`]++,this.logger_(`found #${this[`${e}StalledDownloads_`]} ${e} appends that did not increase buffer (possible stalled download)`,{playlistId:i.playlist_&&i.playlist_.id,buffered:Su(n)}),!(this[`${e}StalledDownloads_`]<10)&&(this.logger_(`${e} loader stalled download exclusion`),this.resetSegmentDownloads_(e),this.tech_.trigger({type:"usage",name:`vhs-${e}-download-exclusion`}),e!=="subtitle"&&t.excludePlaylist({error:{message:`Excessive ${e} segment downloading detected.`},playlistExclusionDuration:1/0}))}checkCurrentTime_(){if(this.tech_.paused()||this.tech_.seeking())return;const e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+Za>=t.end(t.length-1)))return this.techWaiting_();if(this.consecutiveUpdates>=5&&e===this.lastRecordedTime)this.consecutiveUpdates++,this.waiting_();else if(e===this.lastRecordedTime)this.consecutiveUpdates++;else{this.playedRanges_.push(Zr([this.lastRecordedTime,e]));const i={playedRanges:this.playedRanges_};this.playlistController_.trigger({type:"playedrangeschanged",metadata:i}),this.consecutiveUpdates=0,this.lastRecordedTime=e}}resetTimeUpdate_(){this.consecutiveUpdates=0}fixesBadSeeks_(){if(!this.tech_.seeking())return!1;const t=this.seekable(),i=this.tech_.currentTime(),n=this.afterSeekableWindow_(t,i,this.media(),this.allowSeeksWithinUnsafeLiveWindow);let a;if(n&&(a=t.end(t.length-1)),this.beforeSeekableWindow_(t,i)){const p=t.start(0);a=p+(p===t.end(0)?0:Za)}if(typeof a<"u")return this.logger_(`Trying to seek outside of seekable at time ${i} with seekable range ${B8(t)}. Seeking to ${a}.`),this.tech_.setCurrentTime(a),!0;const s=this.playlistController_.sourceUpdater_,o=this.tech_.buffered(),l=s.audioBuffer?s.audioBuffered():null,u=s.videoBuffer?s.videoBuffered():null,c=this.media(),h=c.partTargetDuration?c.partTargetDuration:(c.targetDuration-Ka)*2,d=[l,u];for(let p=0;p<d.length;p++){if(!d[p])continue;if(kA(d[p],i)<h)return!1}const f=um(o,i);return f.length===0?!1:(a=f.start(0)+Za,this.logger_(`Buffered region starts (${f.start(0)}) just beyond seek point (${i}). Seeking to ${a}.`),this.tech_.setCurrentTime(a),!0)}waiting_(){if(this.techWaiting_())return;const e=this.tech_.currentTime(),t=this.tech_.buffered(),i=_h(t,e);if(i.length&&e+3<=i.end(0)){this.resetTimeUpdate_(),this.tech_.setCurrentTime(e),this.logger_(`Stopped at ${e} while inside a buffered region [${i.start(0)} -> ${i.end(0)}]. Attempting to resume playback by seeking to the current time.`),this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"});return}}techWaiting_(){const e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking())return!0;if(this.beforeSeekableWindow_(e,t)){const o=e.end(e.length-1);return this.logger_(`Fell out of live window at time ${t}. Seeking to live point (seekable end) ${o}`),this.resetTimeUpdate_(),this.tech_.setCurrentTime(o),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),!0}const i=this.tech_.vhs.playlistController_.sourceUpdater_,n=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:i.audioBuffered(),videoBuffered:i.videoBuffered(),currentTime:t}))return this.resetTimeUpdate_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),!0;const s=um(n,t);return s.length>0?(this.logger_(`Stopped at ${t} and seeking to ${s.start(0)}`),this.resetTimeUpdate_(),this.skipTheGap_(t),!0):!1}afterSeekableWindow_(e,t,i,n=!1){if(!e.length)return!1;let a=e.end(e.length-1)+Za;const s=!i.endList,o=typeof i.partTargetDuration=="number";return s&&(o||n)&&(a=e.end(e.length-1)+i.targetDuration*3),t>a}beforeSeekableWindow_(e,t){return!!(e.length&&e.start(0)>0&&t<e.start(0)-this.liveRangeSafeTimeDelta)}videoUnderflow_({videoBuffered:e,audioBuffered:t,currentTime:i}){if(!e)return;let n;if(e.length&&t.length){const a=_h(e,i-3),s=_h(e,i),o=_h(t,i);o.length&&!s.length&&a.length&&(n={start:a.end(0),end:o.end(0)})}else um(e,i).length||(n=this.gapFromVideoUnderflow_(e,i));return n?(this.logger_(`Encountered a gap in video from ${n.start} to ${n.end}. Seeking to current time ${i}`),!0):!1}skipTheGap_(e){const t=this.tech_.buffered(),i=this.tech_.currentTime(),n=um(t,i);if(this.resetTimeUpdate_(),n.length===0||i!==e)return;this.logger_("skipTheGap_:","currentTime:",i,"scheduled currentTime:",e,"nextRange start:",n.start(0)),this.tech_.setCurrentTime(n.start(0)+Ka);const a={gapInfo:{from:i,to:n.start(0)}};this.playlistController_.trigger({type:"gapjumped",metadata:a}),this.tech_.trigger({type:"usage",name:"vhs-gap-skip"})}gapFromVideoUnderflow_(e,t){const i=qre(e);for(let n=0;n<i.length;n++){const a=i.start(n),s=i.end(n);if(t-a<4&&t-a>2)return{start:a,end:s}}return null}}const cae={errorInterval:30,getSource(r){const t=this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource();return r(t)}},AU=function(r,e){let t=0,i=0;const n=Pt(cae,e);r.ready(()=>{r.trigger({type:"usage",name:"vhs-error-reload-initialized"})});const a=function(){i&&r.currentTime(i)},s=function(c){c!=null&&(i=r.duration()!==1/0&&r.currentTime()||0,r.one("loadedmetadata",a),r.src(c),r.trigger({type:"usage",name:"vhs-error-reload"}),r.play())},o=function(){if(Date.now()-t<n.errorInterval*1e3){r.trigger({type:"usage",name:"vhs-error-reload-canceled"});return}if(!n.getSource||typeof n.getSource!="function"){K.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!");return}return t=Date.now(),n.getSource.call(r,s)},l=function(){r.off("loadedmetadata",a),r.off("error",o),r.off("dispose",l)},u=function(c){l(),AU(r,c)};r.on("error",o),r.on("dispose",l),r.reloadSourceOnError=u},hae=function(r){AU(this,r)};var DU="3.14.2",fae="7.0.3",dae="1.3.0",pae="7.2.0",vae="4.0.2";const er={PlaylistLoader:bh,Playlist:$i,utils:_ie,STANDARD_PLAYLIST_SELECTOR:KM,INITIAL_PLAYLIST_SELECTOR:one,lastBandwidthSelector:KM,movingAverageBandwidthSelector:ane,comparePlaylistBandwidth:FA,comparePlaylistResolution:nne,xhr:eU()};Object.keys(Vr).forEach(r=>{Object.defineProperty(er,r,{get(){return K.log.warn(`using Vhs.${r} is UNSAFE be sure you know what you are doing`),Vr[r]},set(e){if(K.log.warn(`using Vhs.${r} is UNSAFE be sure you know what you are doing`),typeof e!="number"||e<0){K.log.warn(`value of Vhs.${r} must be greater than or equal to 0`);return}Vr[r]=e}})});const EU="videojs-vhs",IU=function(r,e){const t=e.media();let i=-1;for(let n=0;n<r.length;n++)if(r[n].id===t.id){i=n;break}r.selectedIndex_=i,r.trigger({selectedIndex:i,type:"change"})},gae=function(r,e){e.representations().forEach(t=>{r.addQualityLevel(t)}),IU(r,e.playlists)};er.canPlaySource=function(){return K.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")};const mae=(r,e,t)=>{if(!r)return r;let i={};e&&e.attributes&&e.attributes.CODECS&&(i=x0(Ga(e.attributes.CODECS))),t&&t.attributes&&t.attributes.CODECS&&(i.audio=t.attributes.CODECS);const n=Yh(i.video),a=Yh(i.audio),s={};for(const o in r)s[o]={},a&&(s[o].audioContentType=a),n&&(s[o].videoContentType=n),e.contentProtection&&e.contentProtection[o]&&e.contentProtection[o].pssh&&(s[o].pssh=e.contentProtection[o].pssh),typeof r[o]=="string"&&(s[o].url=r[o]);return Pt(r,s)},yae=(r,e)=>r.reduce((t,i)=>{if(!i.contentProtection)return t;const n=e.reduce((a,s)=>{const o=i.contentProtection[s];return o&&o.pssh&&(a[s]={pssh:o.pssh}),a},{});return Object.keys(n).length&&t.push(n),t},[]),_ae=({player:r,sourceKeySystems:e,audioMedia:t,mainPlaylists:i})=>{if(!r.eme.initializeMediaKeys)return Promise.resolve();const n=t?i.concat([t]):i,a=yae(n,Object.keys(e)),s=[],o=[];return a.forEach(l=>{o.push(new Promise((u,c)=>{r.tech_.one("keysessioncreated",u)})),s.push(new Promise((u,c)=>{r.eme.initializeMediaKeys({keySystems:l},h=>{if(h){c(h);return}u()})}))}),Promise.race([Promise.all(s),Promise.race(o)])},bae=({player:r,sourceKeySystems:e,media:t,audioMedia:i})=>{const n=mae(e,t,i);return n?(r.currentSource().keySystems=n,n&&!r.eme?(K.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),!1):!0):!1},PU=()=>{if(!H.localStorage)return null;const r=H.localStorage.getItem(EU);if(!r)return null;try{return JSON.parse(r)}catch{return null}},Sae=r=>{if(!H.localStorage)return!1;let e=PU();e=e?Pt(e,r):r;try{H.localStorage.setItem(EU,JSON.stringify(e))}catch{return!1}return e},Tae=r=>r.toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")===0?JSON.parse(r.substring(r.indexOf(",")+1)):r,MU=(r,e)=>{r._requestCallbackSet||(r._requestCallbackSet=new Set),r._requestCallbackSet.add(e)},LU=(r,e)=>{r._responseCallbackSet||(r._responseCallbackSet=new Set),r._responseCallbackSet.add(e)},kU=(r,e)=>{r._requestCallbackSet&&(r._requestCallbackSet.delete(e),r._requestCallbackSet.size||delete r._requestCallbackSet)},RU=(r,e)=>{r._responseCallbackSet&&(r._responseCallbackSet.delete(e),r._responseCallbackSet.size||delete r._responseCallbackSet)};er.supportsNativeHls=function(){if(!pe||!pe.createElement)return!1;const r=pe.createElement("video");return K.getTech("Html5").isSupported()?["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"].some(function(t){return/maybe|probably/i.test(r.canPlayType(t))}):!1}();er.supportsNativeDash=function(){return!pe||!pe.createElement||!K.getTech("Html5").isSupported()?!1:/maybe|probably/i.test(pe.createElement("video").canPlayType("application/dash+xml"))}();er.supportsTypeNatively=r=>r==="hls"?er.supportsNativeHls:r==="dash"?er.supportsNativeDash:!1;er.isSupported=function(){return K.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")};er.xhr.onRequest=function(r){MU(er.xhr,r)};er.xhr.onResponse=function(r){LU(er.xhr,r)};er.xhr.offRequest=function(r){kU(er.xhr,r)};er.xhr.offResponse=function(r){RU(er.xhr,r)};const xae=K.getComponent("Component");class OU extends xae{constructor(e,t,i){if(super(t,i.vhs),typeof i.initialBandwidth=="number"&&(this.options_.bandwidth=i.initialBandwidth),this.logger_=ea("VhsHandler"),t.options_&&t.options_.playerId){const n=K.getPlayer(t.options_.playerId);this.player_=n}if(this.tech_=t,this.source_=e,this.stats={},this.ignoreNextSeekingEvent_=!1,this.setOptions_(),this.options_.overrideNative&&t.overrideNativeAudioTracks&&t.overrideNativeVideoTracks)t.overrideNativeAudioTracks(!0),t.overrideNativeVideoTracks(!0);else if(this.options_.overrideNative&&(t.featuresNativeVideoTracks||t.featuresNativeAudioTracks))throw new Error("Overriding native VHS requires emulated tracks. See https://git.io/vMpjB");this.on(pe,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],n=>{const a=pe.fullscreenElement||pe.webkitFullscreenElement||pe.mozFullScreenElement||pe.msFullscreenElement;a&&a.contains(this.tech_.el())?this.playlistController_.fastQualityChange_():this.playlistController_.checkABR_()}),this.on(this.tech_,"seeking",function(){if(this.ignoreNextSeekingEvent_){this.ignoreNextSeekingEvent_=!1;return}this.setCurrentTime(this.tech_.currentTime())}),this.on(this.tech_,"error",function(){this.tech_.error()&&this.playlistController_&&this.playlistController_.pauseLoading()}),this.on(this.tech_,"play",this.play)}setOptions_(e={}){if(this.options_=Pt(this.options_,e),this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions!==!1,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.useBandwidthFromLocalStorage=typeof this.source_.useBandwidthFromLocalStorage<"u"?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useForcedSubtitles=this.options_.useForcedSubtitles||!1,this.options_.useNetworkInformationApi=this.options_.useNetworkInformationApi||!1,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.llhls=this.options_.llhls!==!1,this.options_.bufferBasedABR=this.options_.bufferBasedABR||!1,typeof this.options_.playlistExclusionDuration!="number"&&(this.options_.playlistExclusionDuration=60),typeof this.options_.bandwidth!="number"&&this.options_.useBandwidthFromLocalStorage){const i=PU();i&&i.bandwidth&&(this.options_.bandwidth=i.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"})),i&&i.throughput&&(this.options_.throughput=i.throughput,this.tech_.trigger({type:"usage",name:"vhs-throughput-from-local-storage"}))}typeof this.options_.bandwidth!="number"&&(this.options_.bandwidth=Vr.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Vr.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","customPixelRatio","limitRenditionByPlayerDimensions","bandwidth","customTagParsers","customTagMappers","cacheEncryptionKeys","playlistSelector","initialPlaylistSelector","bufferBasedABR","liveRangeSafeTimeDelta","llhls","useForcedSubtitles","useNetworkInformationApi","useDtsForTimestampOffset","exactManifestTimings","leastPixelDiffSelector"].forEach(i=>{typeof this.source_[i]<"u"&&(this.options_[i]=this.source_[i])}),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio;const t=this.options_.customPixelRatio;typeof t=="number"&&t>=0&&(this.customPixelRatio=t)}setOptions(e={}){this.setOptions_(e)}src(e,t){if(!e)return;this.setOptions_(),this.options_.src=Tae(this.source_.src),this.options_.tech=this.tech_,this.options_.externVhs=er,this.options_.sourceType=D4(t),this.options_.seekTo=a=>{this.tech_.setCurrentTime(a)},this.options_.player_=this.player_,this.playlistController_=new aae(this.options_);const i=Pt({liveRangeSafeTimeDelta:Za},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_});this.playbackWatcher_=new uae(i),this.attachStreamingEventListeners_(),this.playlistController_.on("error",()=>{const a=K.players[this.tech_.options_.playerId];let s=this.playlistController_.error;typeof s=="object"&&!s.code?s.code=3:typeof s=="string"&&(s={message:s,code:3}),a.error(s)});const n=this.options_.bufferBasedABR?er.movingAverageBandwidthSelector(.55):er.STANDARD_PLAYLIST_SELECTOR;this.playlistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):n.bind(this),this.playlistController_.selectInitialPlaylist=er.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.playlistController_.mainPlaylistLoader_,this.mediaSource=this.playlistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get(){return this.playlistController_.selectPlaylist},set(a){this.playlistController_.selectPlaylist=a.bind(this)}},throughput:{get(){return this.playlistController_.mainSegmentLoader_.throughput.rate},set(a){this.playlistController_.mainSegmentLoader_.throughput.rate=a,this.playlistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get(){let a=this.playlistController_.mainSegmentLoader_.bandwidth;const s=H.navigator.connection||H.navigator.mozConnection||H.navigator.webkitConnection,o=1e7;if(this.options_.useNetworkInformationApi&&s){const l=s.downlink*1e3*1e3;l>=o&&a>=o?a=Math.max(a,l):a=l}return a},set(a){this.playlistController_.mainSegmentLoader_.bandwidth=a,this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get(){const a=1/(this.bandwidth||1);let s;return this.throughput>0?s=1/this.throughput:s=0,Math.floor(1/(a+s))},set(){K.log.error('The "systemBandwidth" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:()=>this.bandwidth||0,enumerable:!0},mediaRequests:{get:()=>this.playlistController_.mediaRequests_()||0,enumerable:!0},mediaRequestsAborted:{get:()=>this.playlistController_.mediaRequestsAborted_()||0,enumerable:!0},mediaRequestsTimedout:{get:()=>this.playlistController_.mediaRequestsTimedout_()||0,enumerable:!0},mediaRequestsErrored:{get:()=>this.playlistController_.mediaRequestsErrored_()||0,enumerable:!0},mediaTransferDuration:{get:()=>this.playlistController_.mediaTransferDuration_()||0,enumerable:!0},mediaBytesTransferred:{get:()=>this.playlistController_.mediaBytesTransferred_()||0,enumerable:!0},mediaSecondsLoaded:{get:()=>this.playlistController_.mediaSecondsLoaded_()||0,enumerable:!0},mediaAppends:{get:()=>this.playlistController_.mediaAppends_()||0,enumerable:!0},mainAppendsToLoadedData:{get:()=>this.playlistController_.mainAppendsToLoadedData_()||0,enumerable:!0},audioAppendsToLoadedData:{get:()=>this.playlistController_.audioAppendsToLoadedData_()||0,enumerable:!0},appendsToLoadedData:{get:()=>this.playlistController_.appendsToLoadedData_()||0,enumerable:!0},timeToLoadedData:{get:()=>this.playlistController_.timeToLoadedData_()||0,enumerable:!0},buffered:{get:()=>Su(this.tech_.buffered()),enumerable:!0},currentTime:{get:()=>this.tech_.currentTime(),enumerable:!0},currentSource:{get:()=>this.tech_.currentSource_,enumerable:!0},currentTech:{get:()=>this.tech_.name_,enumerable:!0},duration:{get:()=>this.tech_.duration(),enumerable:!0},main:{get:()=>this.playlists.main,enumerable:!0},playerDimensions:{get:()=>this.tech_.currentDimensions(),enumerable:!0},seekable:{get:()=>Su(this.tech_.seekable()),enumerable:!0},timestamp:{get:()=>Date.now(),enumerable:!0},videoPlaybackQuality:{get:()=>this.tech_.getVideoPlaybackQuality(),enumerable:!0}}),this.tech_.one("canplay",this.playlistController_.setupFirstPlay.bind(this.playlistController_)),this.tech_.on("bandwidthupdate",()=>{this.options_.useBandwidthFromLocalStorage&&Sae({bandwidth:this.bandwidth,throughput:Math.round(this.throughput)})}),this.playlistController_.on("selectedinitialmedia",()=>{lae(this)}),this.playlistController_.sourceUpdater_.on("createdsourcebuffers",()=>{this.setupEme_()}),this.on(this.playlistController_,"progress",function(){this.tech_.trigger("progress")}),this.on(this.playlistController_,"firstplay",function(){this.ignoreNextSeekingEvent_=!0}),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=H.URL.createObjectURL(this.playlistController_.mediaSource),this.tech_.src(this.mediaSourceUrl_))}createKeySessions_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_("waiting for EME key session creation"),_ae({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:e&&e.media(),mainPlaylists:this.playlists.main.playlists}).then(()=>{this.logger_("created EME key session"),this.playlistController_.sourceUpdater_.initializedEme()}).catch(t=>{this.logger_("error while creating EME key session",t),this.player_.error({message:"Failed to initialize media keys for EME",code:3})})}handleWaitingForKey_(){this.logger_("waitingforkey fired, attempting to create any new key sessions"),this.createKeySessions_()}setupEme_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader,t=bae({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:e&&e.media()});if(this.player_.tech_.on("keystatuschange",i=>{this.playlistController_.updatePlaylistByKeyStatus(i.keyId,i.status)}),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on("waitingforkey",this.handleWaitingForKey_),!t){this.playlistController_.sourceUpdater_.initializedEme();return}this.createKeySessions_()}setupQualityLevels_(){const e=K.players[this.tech_.options_.playerId];!e||!e.qualityLevels||this.qualityLevels_||(this.qualityLevels_=e.qualityLevels(),this.playlistController_.on("selectedinitialmedia",()=>{gae(this.qualityLevels_,this)}),this.playlists.on("mediachange",()=>{IU(this.qualityLevels_,this.playlists)}))}static version(){return{"@videojs/http-streaming":DU,"mux.js":fae,"mpd-parser":dae,"m3u8-parser":pae,"aes-decrypter":vae}}version(){return this.constructor.version()}canChangeType(){return TU.canChangeType()}play(){this.playlistController_.play()}setCurrentTime(e){this.playlistController_.setCurrentTime(e)}duration(){return this.playlistController_.duration()}seekable(){return this.playlistController_.seekable()}dispose(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.playlistController_&&this.playlistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.mediaSourceUrl_&&H.URL.revokeObjectURL&&(H.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),super.dispose()}convertToProgramTime(e,t){return Aie({playlist:this.playlistController_.media(),time:e,callback:t})}seekToProgramTime(e,t,i=!0,n=2){return aU({programTime:e,playlist:this.playlistController_.media(),retryCount:n,pauseAfterSeek:i,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})}setupXhrHooks_(){this.xhr.onRequest=e=>{MU(this.xhr,e)},this.xhr.onResponse=e=>{LU(this.xhr,e)},this.xhr.offRequest=e=>{kU(this.xhr,e)},this.xhr.offResponse=e=>{RU(this.xhr,e)},this.player_.trigger("xhr-hooks-ready")}attachStreamingEventListeners_(){const e=["seekablerangeschanged","bufferedrangeschanged","contentsteeringloadstart","contentsteeringloadcomplete","contentsteeringparsed"],t=["gapjumped","playedrangeschanged"];e.forEach(i=>{this.playlistController_.on(i,n=>{this.player_.trigger(or({},n))})}),t.forEach(i=>{this.playbackWatcher_.on(i,n=>{this.player_.trigger(or({},n))})})}}const A0={name:"videojs-http-streaming",VERSION:DU,canHandleSource(r,e={}){const t=Pt(K.options,e);return!t.vhs.experimentalUseMMS&&!Ep("avc1.4d400d,mp4a.40.2",!1)?!1:A0.canPlayType(r.type,t)},handleSource(r,e,t={}){const i=Pt(K.options,t);return e.vhs=new OU(r,e,i),e.vhs.xhr=eU(),e.vhs.setupXhrHooks_(),e.vhs.src(r.src,r.type),e.vhs},canPlayType(r,e){const t=D4(r);if(!t)return"";const i=A0.getOverrideNative(e);return!er.supportsTypeNatively(t)||i?"maybe":""},getOverrideNative(r={}){const{vhs:e={}}=r,t=!(K.browser.IS_ANY_SAFARI||K.browser.IS_IOS),{overrideNative:i=t}=e;return i}},wae=()=>Ep("avc1.4d400d,mp4a.40.2",!0);wae()&&K.getTech("Html5").registerSourceHandler(A0,0);K.VhsHandler=OU;K.VhsSourceHandler=A0;K.Vhs=er;K.use||K.registerComponent("Vhs",er);K.options.vhs=K.options.vhs||{};(!K.getPlugin||!K.getPlugin("reloadSourceOnError"))&&K.registerPlugin("reloadSourceOnError",hae);/*! @name videojs-contrib-eme @version 3.11.2 @license Apache-2.0 */function D0(){return D0=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=t[i])}return r},D0.apply(this,arguments)}var Cae=function(e){for(var t=new ArrayBuffer(e.length*2),i=new Uint16Array(t),n=0;n<e.length;n++)i[n]=e.charCodeAt(n);return i},Aae=function(e){return String.fromCharCode.apply(null,new Uint16Array(e.buffer))},Dae=function(e){var t=pe.createElement("a");return t.href=e,t.hostname},Eae=function(e,t){if(e===t)return!0;if(e.byteLength!==t.byteLength)return!1;for(var i=new DataView(e),n=new DataView(t),a=0;a<i.byteLength;a++)if(i.getUint8(a)!==n.getUint8(a))return!1;return!0},uL=function(e){return e instanceof Uint8Array||e instanceof Uint16Array?e.buffer:e},UA=function(){for(var e=K.obj||K,t=e.merge||e.mergeOptions,i=arguments.length,n=new Array(i),a=0;a<i;a++)n[a]=arguments[a];return t.apply(e,n)},h1=function(){var e=UA.apply(void 0,arguments);return Object.keys(e).forEach(function(t){e[t]===null&&delete e[t]}),e},uf=K.xhr.httpHandler;uf||(uf=function(e,t){return function(i,n,a){if(i){e(i);return}if(n.statusCode>=400&&n.statusCode<=599){var s=a;t&&(s=String.fromCharCode.apply(null,new Uint8Array(a))),e({cause:s});return}e(null,a)}});var Iae=function(e){var t=String.fromCharCode.apply(null,new Uint16Array(e)),i=new H.DOMParser().parseFromString(t,"application/xml"),n=i.getElementsByTagName("HttpHeaders")[0],a={};if(n)for(var s=n.getElementsByTagName("name"),o=n.getElementsByTagName("value"),l=0;l<s.length;l++)a[s[l].childNodes[0].nodeValue]=o[l].childNodes[0].nodeValue;var u=i.getElementsByTagName("Challenge")[0],c;return u&&(c=H.atob(u.childNodes[0].nodeValue)),i.querySelector("parsererror")&&(a={"Content-Type":"text/xml; charset=utf-8",SOAPAction:'"http://schemas.microsoft.com/DRM/2007/03/protocols/AcquireLicense"'},c=e),{headers:a,message:c}},NU=function(e,t,i,n){var a=Iae(t),s=a.message,o=h1(a.headers,i.emeHeaders,e.licenseHeaders);K.xhr({uri:e.url,method:"post",headers:o,body:s,responseType:"arraybuffer"},uf(n,!0))},Pae=function(e){if(e.supportedConfigurations)return e.supportedConfigurations;var t={},i=e.audioContentType,n=e.audioRobustness,a=e.videoContentType,s=e.videoRobustness,o=e.persistentState;return(i||n)&&(t.audioCapabilities=[D0({},i?{contentType:i}:{},n?{robustness:n}:{})]),(a||s)&&(t.videoCapabilities=[D0({},a?{contentType:a}:{},s?{robustness:s}:{})]),o&&(t.persistentState=o),[t]},Mae=function(e){var t;return Object.keys(e).forEach(function(i){var n=Pae(e[i]);t?t=t.catch(function(a){return H.navigator.requestMediaKeySystemAccess(i,n)}):t=H.navigator.requestMediaKeySystemAccess(i,n)}),t},BU=function r(e,t){var i=t.mediaKeys,n=t.initDataType,a=t.initData,s=t.options,o=t.getLicense,l=t.removeSession,u=t.eventBus,c=i.createSession();return u.trigger("keysessioncreated"),e.on("dispose",function(){c.close()}),new Promise(function(h,d){c.addEventListener("message",function(f){f.messageType!=="license-request"&&f.messageType!=="license-renewal"||o(s,f.message).then(function(p){h(c.update(p))}).catch(function(p){d(p)})},!1),c.addEventListener("keystatuseschange",function(f){var p=!1;c.keyStatuses.forEach(function(v,g){switch(u.trigger({keyId:g,status:v,target:c,type:"keystatuschange"}),v){case"expired":p=!0;break;case"internal-error":var m=`Key status reported as "internal-error." Leaving the session open since we don't have enough details to know if this error is fatal.`;K.log.warn(m,f);break}}),p&&c.close().then(function(){l(a),r(e,t)})},!1),c.generateRequest(n,a).catch(function(){d("Unable to create or initialize key session")})})},Lae=function(e){var t=e.player,i=e.video,n=e.initDataType,a=e.initData,s=e.options,o=e.getLicense,l=e.removeSession,u=e.eventBus;return i.mediaKeysObject?BU(t,{mediaKeys:i.mediaKeysObject,initDataType:n,initData:a,options:s,getLicense:o,removeSession:l,eventBus:u}):(i.pendingSessionData.push({initDataType:n,initData:a,options:s,getLicense:o,removeSession:l,eventBus:u}),Promise.resolve())},kae=function(e){var t=e.player,i=e.video,n=e.certificate,a=e.createdMediaKeys;i.mediaKeysObject=a;var s=[];n&&s.push(a.setServerCertificate(n));for(var o=0;o<i.pendingSessionData.length;o++){var l=i.pendingSessionData[o];s.push(BU(t,{mediaKeys:i.mediaKeysObject,initDataType:l.initDataType,initData:l.initData,options:l.options,getLicense:l.getLicense,removeSession:l.removeSession,eventBus:l.eventBus}))}return i.pendingSessionData=[],s.push(i.setMediaKeys(a)),Promise.all(s)},Rae=function(e){return function(t,i,n){NU(e,i,t,n)}},Oae=function(e){return function(t,i,n){var a=h1({"Content-type":"application/octet-stream"},t.emeHeaders,e.licenseHeaders);K.xhr({uri:e.url,method:"POST",responseType:"arraybuffer",body:i,headers:a},uf(n,!0))}},Nae=function(e,t){return function(i,n){return new Promise(function(a,s){e(i,n,function(o,l){if(t&&t.trigger("licenserequestattempted"),o){s(o);return}a(l)})})}},cL=function(e,t){if(typeof t=="string"&&(t={url:t}),!t.url&&!t.getLicense)throw new Error("Neither URL nor getLicense function provided to get license");return t.url&&!t.getLicense&&(t.getLicense=e==="com.microsoft.playready"?Rae(t):Oae(t)),t},Bae=function(e){var t=e.player,i=e.video,n=e.initDataType,a=e.initData,s=e.keySystemAccess,o=e.options,l=e.removeSession,u=e.eventBus,c=Promise.resolve();if(typeof i.mediaKeysObject>"u"){i.mediaKeysObject=null,i.pendingSessionData=[];var h,d;c=new Promise(function(f,p){if(i.keySystem=s.keySystem,d=cL(s.keySystem,o.keySystems[s.keySystem]),!d.getCertificate){f(s);return}d.getCertificate(o,function(v,g){if(v){p(v);return}h=g,f()})}).then(function(){return s.createMediaKeys()}).then(function(f){return kae({player:t,video:i,certificate:h,createdMediaKeys:f})}).catch(function(f){return f?Promise.reject(f):Promise.reject("Failed to create and initialize a MediaKeys object")})}return c.then(function(){var f=cL(i.keySystem,o.keySystems[i.keySystem]),p=f.getLicense;return Lae({player:t,video:i,initDataType:n,initData:a,options:o,getLicense:i.keySystem?Nae(p,u):null,removeSession:l,eventBus:u})})},VA="com.apple.fps.1_0",Fae=function(e){var t=e.initData,i=e.id,n=e.cert;typeof i=="string"&&(i=Cae(i));var a=0,s=new ArrayBuffer(t.byteLength+4+i.byteLength+4+n.byteLength),o=new DataView(s),l=new Uint8Array(s,a,t.byteLength);l.set(t),a+=t.byteLength,o.setUint32(a,i.byteLength,!0),a+=4;var u=new Uint16Array(s,a,i.length);u.set(i),a+=u.byteLength,o.setUint32(a,n.byteLength,!0),a+=4;var c=new Uint8Array(s,a,n.byteLength);return c.set(n),new Uint8Array(s,0,s.byteLength)},Uae=function(e){var t=e.video,i=e.contentId,n=e.initData,a=e.cert,s=e.options,o=e.getLicense,l=e.eventBus;return new Promise(function(u,c){if(!t.webkitKeys)try{t.webkitSetMediaKeys(new H.WebKitMediaKeys(VA))}catch{c("Could not create MediaKeys");return}var h;try{h=t.webkitKeys.createSession("video/mp4",Fae({id:i,initData:n,cert:a}))}catch{c("Could not create key session");return}l.trigger("keysessioncreated"),h.contentId=i,h.addEventListener("webkitkeymessage",function(d){o(s,i,d.message,function(f,p){if(l&&l.trigger("licenserequestattempted"),f){c(f);return}h.update(new Uint8Array(p))})}),h.addEventListener("webkitkeyadded",function(){u()}),h.addEventListener("webkitkeyerror",function(){var d=h.error;c("KeySession error: code "+d.code+", systemCode "+d.systemCode)})})},Vae=function(e){return function(t,i){var n=h1(t.emeHeaders,e.certificateHeaders);K.xhr({uri:e.certificateUri,responseType:"arraybuffer",headers:n},uf(function(a,s){if(a){i(a);return}i(null,new Uint8Array(s))}))}},zae=function(e,t){return Dae(Aae(t))},Gae=function(e){return function(t,i,n,a){var s=h1({"Content-type":"application/octet-stream"},t.emeHeaders,e.licenseHeaders);K.xhr({uri:e.licenseUri,method:"POST",responseType:"arraybuffer",body:n,headers:s},uf(a,!0))}},Hae=function(e){var t=e.video,i=e.initData,n=e.options,a=e.eventBus,s=n.keySystems[VA],o=s.getCertificate||Vae(s),l=s.getContentId||zae,u=s.getLicense||Gae(s);return new Promise(function(c,h){o(n,function(d,f){if(d){h(d);return}c(f)})}).then(function(c){return Uae({video:t,cert:c,initData:i,getLicense:u,options:n,contentId:l(n,i),eventBus:a})})},Sh="com.microsoft.playready",$ae=function(e,t,i,n){var a=e.keySystems[Sh];if(typeof a.getKey=="function"){a.getKey(e,i.destinationURL,i.message.buffer,function(o,l){if(o){n.trigger({message:"Unable to get key: "+o,target:t,type:"mskeyerror"});return}t.update(l)});return}typeof a=="string"?a={url:a}:typeof a=="boolean"&&(a={}),a.url||(a.url=i.destinationURL);var s=function(l,u){if(n&&n.trigger("licenserequestattempted"),l){n.trigger({message:"Unable to request key from url: "+a.url,target:t,type:"mskeyerror"});return}t.update(new Uint8Array(u))};a.getLicense?a.getLicense(e,i.message.buffer,s):NU(a,i.message.buffer,e,s)},Wae=function(e,t,i,n){var a=e.msKeys.createSession("video/mp4",t);if(!a)throw new Error("Could not create key session.");n.trigger("keysessioncreated"),a.addEventListener("mskeymessage",function(s){$ae(i,a,s,n)}),a.addEventListener("mskeyerror",function(s){n.trigger({message:"Unexpected key error from key session with "+("code: "+a.error.code+" and systemCode: "+a.error.systemCode),target:a,type:"mskeyerror"})}),a.addEventListener("mskeyadded",function(){n.trigger({target:a,type:"mskeyadded"})})},qae=function(r){var e=r.video,t=r.initData,i=r.options,n=r.eventBus;e.msKeys&&delete e.msKeys;try{e.msSetMediaKeys(new H.MSMediaKeys(Sh))}catch(a){throw new Error("Unable to create media keys for PlayReady key system. Error: "+a.message)}Wae(e,t,i,n)},jae="3.11.2",Xae=function(e,t){for(var i=0;i<e.length;i++)if(e[i].initData){var n=uL(e[i].initData),a=uL(t);if(Eae(n,a))return!0}return!1},Yae=function(e,t){for(var i=0;i<e.length;i++)if(e[i].initData===t){e.splice(i,1);return}},FU=function(e,t,i,n,a){if(!i||!i.keySystems)return Promise.resolve();var s=t.initData;return Mae(i.keySystems).then(function(o){var l=o.keySystem;return i.keySystems[l]&&i.keySystems[l].pssh&&(s=i.keySystems[l].pssh),Xae(n,s)||!s?Promise.resolve():(n.push({initData:s}),Bae({player:e,video:t.target,initDataType:t.initDataType,initData:s,keySystemAccess:o,options:i,removeSession:Yae.bind(null,n),eventBus:a}))})},Kae=function(e,t,i){return!t.keySystems||!t.keySystems[VA]||!e.initData?Promise.resolve():Hae({video:e.target,initData:e.initData,options:t,eventBus:i})},UU=function(e,t,i,n){if(!(!t.keySystems||!t.keySystems[Sh])&&!i.reduce(function(s,o){return s||o.playready},!1)){var a=e.initData;t.keySystems[Sh]&&t.keySystems[Sh].pssh&&(a=t.keySystems[Sh].pssh),a&&(i.push({playready:!0,initData:a}),qae({video:e.target,initData:a,options:t,eventBus:n}))}},fm=function(e){return UA(e.currentSource(),e.eme.options)},lp=function(e){var t=e.src();t!==e.eme.activeSrc&&(e.eme.activeSrc=t,e.eme.sessions=[])},Zae=function(e){return function(t){var i={code:5};typeof t=="string"?i.message=t:t&&(t.message&&(i.message=t.message),t.cause&&(t.cause.length||t.cause.byteLength)&&(i.cause=t.cause)),e.error(i)}},Qae=function(e,t){if(e.$(".vjs-tech").tagName.toLowerCase()==="video")if(lp(e),H.WebKitMediaKeys){var i=function(a){lp(e),Kae(a,fm(e),e.tech_).catch(t)};e.tech_.el_.addEventListener("webkitneedkey",function(n){var a=fm(e),s=a.firstWebkitneedkeyTimeout||1e3,o=e.src();e.eme.webkitneedkey_=e.eme.webkitneedkey_||{},e.eme.webkitneedkey_.src!==o&&(e.eme.webkitneedkey_={handledFirstEvent:!1,src:o}),e.eme.webkitneedkey_.handledFirstEvent?i(n):(e.clearTimeout(e.eme.webkitneedkey_.timeout),e.eme.webkitneedkey_.timeout=e.setTimeout(function(){e.eme.webkitneedkey_.handledFirstEvent=!0,e.eme.webkitneedkey_.timeout=null,i(n)},s))})}else H.MediaKeys?e.tech_.el_.addEventListener("encrypted",function(n){lp(e),FU(e,n,fm(e),e.eme.sessions,e.tech_).catch(t)}):H.MSMediaKeys&&(e.tech_.el_.addEventListener("msneedkey",function(n){lp(e);try{UU(n,fm(e),e.eme.sessions,e.tech_)}catch(a){t(a)}}),e.tech_.on("mskeyerror",t),e.on("dispose",function(){e.tech_.off("mskeyerror",t)}))},VU=function(e){e===void 0&&(e={});var t=this,i=Zae(t);t.ready(function(){return Qae(t,i)}),t.eme={initializeMediaKeys:function(a,s,o){a===void 0&&(a={}),s===void 0&&(s=function(){}),o===void 0&&(o=!1);var l=UA(t.currentSource(),e,a),u={initDataType:"cenc",initData:null,target:t.tech_.el_};if(lp(t),t.tech_.el_.setMediaKeys)FU(t,u,l,t.eme.sessions,t.tech_).then(function(){return s()}).catch(function(h){s(h),o||i(h)});else if(t.tech_.el_.msSetMediaKeys){var c=function h(d){t.tech_.off("mskeyadded",h),t.tech_.off("mskeyerror",h),d.type==="mskeyerror"?(s(d.target.error),o||i(d.message)):s()};t.tech_.one("mskeyadded",c),t.tech_.one("mskeyerror",c);try{UU(u,l,t.eme.sessions,t.tech_)}catch(h){t.tech_.off("mskeyadded",c),t.tech_.off("mskeyerror",c),s(h),o||i(h)}}},options:e}};K.registerPlugin("eme",VU);VU.VERSION=jae;function hL(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable})),t.push.apply(t,i)}return t}function Kr(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?hL(Object(t),!0).forEach(function(i){tse(r,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):hL(Object(t)).forEach(function(i){Object.defineProperty(r,i,Object.getOwnPropertyDescriptor(t,i))})}return r}function Jae(r,e){if(typeof r!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var i=t.call(r,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function ese(r){var e=Jae(r,"string");return typeof e=="symbol"?e:e+""}function fL(r,e,t,i,n,a,s){try{var o=r[a](s),l=o.value}catch(u){t(u);return}o.done?e(l):Promise.resolve(l).then(i,n)}function hh(r){return function(){var e=this,t=arguments;return new Promise(function(i,n){var a=r.apply(e,t);function s(l){fL(a,i,n,s,o,"next",l)}function o(l){fL(a,i,n,s,o,"throw",l)}s(void 0)})}}function tse(r,e,t){return e=ese(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function rse(r,e){if(r==null)return{};var t={},i=Object.keys(r),n,a;for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&(t[n]=r[n]);return t}function dL(r,e){if(r==null)return{};var t=rse(r,e),i,n;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);for(n=0;n<a.length;n++)i=a[n],!(e.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(r,i)&&(t[i]=r[i])}return t}var ise="1.12.1";const nse=K.getComponent("player");class ase extends nse{constructor(e,t,i){t=K.obj.merge(t,{plugins:{eme:!0}}),super(e,t,i)}audioTrack(e){const t=Array.from(this.player().audioTracks());if(!e)return t.find(s=>s.enabled);const{kind:i,language:n}=e,a=t.find(s=>s.language===n&&s.kind===i)||t.find(s=>s.language===n);return a&&(a.enabled=!0),a}bufferedRanges(){const e=[];for(let t=0;t<this.buffered().length;t++){const i=this.buffered().start(t),n=this.buffered().end(t);e.push({start:i,end:n})}return e}playedPercent(){if(!Number.isFinite(this.duration()))return NaN;let e=0;for(let i=0;i!=this.played().length;i++)e+=this.played().end(i)-this.played().start(i);return e/this.duration()}playedRanges(){const e=[];for(let t=0;t<this.played().length;t++){const i=this.played().start(t),n=this.played().end(t);e.push({start:i,end:n})}return e}seekableRanges(){const e=[];for(let t=0;t<this.seekable().length;t++){const i=this.seekable().start(t),n=this.seekable().end(t);e.push({start:i,end:n})}return e}textTrack(e){const t=Array.from(this.player().textTracks()).filter(s=>!["chapters","metadata"].includes(s.kind));if(!e)return t.find(s=>s.mode==="showing");t.forEach(s=>s.mode="disabled");const{kind:i,language:n}=e;return t.find(s=>(s.language===n&&s.kind===i&&(s.mode="showing"),s.mode==="showing"))||t.find(s=>(s.language===n&&(s.mode="showing"),s.mode==="showing"))}}K.registerComponent("player",ase);const lr=K;lr.VERSION={pillarbox:ise,videojs:K.VERSION,[K.VhsSourceHandler.name]:K.VhsSourceHandler.VERSION,eme:K.getPlugin("eme").VERSION};lr.options.enableSmoothSeeking=!0;lr.options.fill=!0;lr.options.html5={vhs:{useForcedSubtitles:!0}};lr.options.liveTracker={trackingThreshold:120,liveTolerance:15};lr.options.liveui=!0;lr.options.playsinline=!0;lr.options.responsive=!0;lr.options.trackers={};class pL{constructor(e="il.srgssr.ch"){this.setIlHost(e)}setIlHost(e){this.baseUrl=`${e}/integrationlayer/2.1/`}handleRequest(e){var t=this;return function(){var i=hh(function*(n){const a=typeof e=="function"?e(n):t.mediaCompositionUrlHandler(n),s=yield fetch(a);if(!s.ok)throw s;return yield s.json()});return function(n){return i.apply(this,arguments)}}()}mediaCompositionUrlHandler(e){return`https://${this.baseUrl}mediaComposition/byUrn/${e}?onlyChapters=true&vector=portalplay`}}const Fc={WIDTH_240:"240",WIDTH_320:"320",WIDTH_480:"480",WIDTH_960:"960",WIDTH_1920:"1920"},dm={JPG:"jpg",WEBP:"webp",PNG:"png"},sse="https://il.srgssr.ch/images/";let ose=class{static scale({url:e,width:t=Fc.WIDTH_960,format:i=dm.JPG}={},n=sse){if(!e)return;const a=new URL(n);return a.searchParams.set("imageUrl",e),a.searchParams.set("format",i),a.searchParams.set("width",t),decodeURIComponent(a.href)}static get JPG(){return dm.JPG}static get PNG(){return dm.PNG}static get WEBP(){return dm.WEBP}static get WIDTH_240(){return Fc.WIDTH_240}static get WIDTH_320(){return Fc.WIDTH_320}static get WIDTH_480(){return Fc.WIDTH_480}static get WIDTH_960(){return Fc.WIDTH_960}static get WIDTH_1920(){return Fc.WIDTH_1920}};const lse={WIDEVINE:"com.widevine.alpha",FAIRPLAY:"com.apple.fps.1_0",PLAYREADY:"com.microsoft.playready"};class fv{static buildKeySystems(e=[]){const t={};return e.forEach(i=>{const n=fv.vendors[i.type];if(fv.vendors.FAIRPLAY===n){const{certificateUrl:a,licenseUrl:s}=i;t[n]={certificateUri:a,licenseUri:s}}else t[n]=i.licenseUrl}),{keySystems:t}}static hasDrm(e){return e.some(({drmList:t})=>t&&t.length>0)}static get vendors(){return lse}}const pm={AKAMAI:"AKAMAI",NONE:"NONE"};class Bu{static aclPath(e){const t=e.pathname;return`${t.substring(0,t.lastIndexOf("/")+1)}*`}static get AKAMAI(){return pm.AKAMAI}static hasToken(e){return e.some(t=>Bu.isAkamai(t.tokenType))}static isAkamai(e){return pm.AKAMAI===e}static isNone(e){return pm.NONE===e}static get NONE(){return pm.NONE}static tokenize(e,t){const i=new URL(`${e.url}`),n=Bu.aclPath(i),a=`${t}${encodeURIComponent(n)}`;return fetch(a).then(s=>s.ok?s.json():Promise.reject({status:s.status,statusText:s.statusText})).then(({token:{authparams:s}})=>(new URLSearchParams(s).forEach((l,u)=>i.searchParams.set(u,l)),Object.assign({},e,{url:i.toString()}))).catch(s=>Promise.reject(s))}static tokenizeSources(e,t="https://tp.srgssr.ch/akahd/token?acl="){const i=[];return e.forEach(n=>{const a=Bu.tokenize(n,t);i.push(a)}),Promise.all(i).then(n=>n).catch(n=>Promise.reject(n))}}const vL="emptied",gL="ended",mL="loadeddata",yL="loadstart",Zb="pause",use="play",Qb="playing",_L="ratechange",bL="seeking",Jb="timeupdate",SL="waiting";class du{constructor(e,{debug:t=!1,environment:i="prod",playerVersion:n="none",tagCommanderScriptURL:a="//colibri-js.akamaized.net/penguin/tc_SRGGD_11.js"}={}){this.isDebugEnabled=t,this.elapsedPlaybackTime=0,this.environment=i,this.hasStarted=!1,this.heartBeatIntervalId=void 0,this.initialized=!1,this.isSeeking=!1,this.isWaiting=!1,this.mediaSession=0,this.pendingQueue=[],this.pendingTagCommanderReload=!1,this.player=e,this.playerVersion=n,this.srcMediaData=void 0,this.startPlaybackSession=0,this.tagCommanderScriptURL=a,this.trackedCurrentTime=0,this.uptimeIntervalId=void 0,this.initScript(),this.initListeners()}beforeunload(){this.notify("stop")}clearTimers(){clearInterval(this.heartBeatIntervalId),clearInterval(this.uptimeIntervalId),clearTimeout(this.uptimeTimeoutId)}currentTime(){return Math.round(this.trackedCurrentTime)}debug(e){if(e===void 0)return this.isDebugEnabled||this.player.debug();this.isDebugEnabled=!!e}destroy(){this.clearTimers(),window.tc_vars||(window.tc_vars={}),this.elapsedPlaybackTime=0,this.hasStarted=!1,this.heartBeatIntervalId=void 0,this.initialized=!1,this.isWaiting=!1,this.mediaSession=0,this.pendingQueue=[],this.srcMediaData=void 0,this.startPlaybackSession=0,this.trackedCurrentTime=0,this.uptimeIntervalId=void 0}dispose(){this.beforeunload(),this.clearTimers(),window.removeEventListener("beforeunload",this.beforeunloadListener),this.player.off(vL,this.emptiedListener),this.player.off(gL,this.endedListener),this.player.off(yL,this.loadstartListener),this.player.off(mL,this.loadeddataListener),this.player.off(Qb,this.playListener),this.player.off(Zb,this.pauseListener),this.player.off(_L,this.rateChangeListener),this.player.off(bL,this.seekingListener),this.player.off(Jb,this.timeUpdateListener),this.player.off(SL,this.waitingListener)}emptied(){this.player.ended()||this.notify("stop")}ended(){this.notify("eof"),this.mediaSession=0,this.clearTimers()}flush(){this.isTrackerDisabled()||(this.pendingTagCommanderReload&&window.tC&&(window.tC.container.reload(),this.pendingTagCommanderReload=!1),window.tc_events_11&&this.pendingQueue.length>0&&(this.pendingQueue.forEach(e=>{window.tc_events_11(this.player.el(),e.action,e.labels)}),this.pendingQueue=[]))}getCurrentAudioTrack(){const e=Array.from(this.player.audioTracks()).find(i=>i.enabled);let t="und";return e&&e.language&&(t=e.language),e?t.toUpperCase():""}getCurrentTextTrack(){const e=this.player.textTrack();let t="und";return e&&e.language&&(t=e.language),e?t.toUpperCase():""}getDvrWindowPosition(){const{liveTracker:e}=this.player,t=this.currentTime()-e.seekableStart()|0,i=e.liveWindow()-t;return i<0||i===1/0?0:i*1e3}getDvrWindowSize(){const e=this.player.liveTracker.liveWindow()===1/0,t=this.player.liveTracker.liveWindow()*1e3;return e?0:t}getElapsedPlaybackTime(){return this.startPlaybackSession?this.getElapsedPlayingTime():this.elapsedPlaybackTime}getElapsedPlayingTime(){const e=du.now()-this.startPlaybackSession|0;return this.elapsedPlaybackTime+e}getEventLabels(e){const t={event_id:e,event_timestamp:du.now(),media_dvr_window_length:0,media_dvr_window_offset:0,media_is_dvr:!1,media_is_live:!1,media_mute:this.player.muted()?"1":"0",media_playback_rate:this.player.playbackRate(),media_position:this.currentTime(),media_quality:this.srcMediaData.mediaData.quality,media_subtitles_on:this.isTextTrackEnabled(),media_volume:(this.player.volume()*100).toFixed(0),navigation_environment:this.environment};return this.isAudioTrackEnabled()&&(t.media_audio_track=this.getCurrentAudioTrack()),this.isTextTrackEnabled()&&(t.media_subtitle_selection=this.getCurrentTextTrack()),this.isMediaOnDemand()||(t.media_is_live=!0,t.media_position=this.getElapsedPlaybackTime()),this.isMediaDvr()&&(t.media_dvr_window_offset=this.getDvrWindowPosition()|0,t.media_dvr_window_length=this.getDvrWindowSize()|0,t.media_is_dvr=!0,t.media_timeshift=[use,Zb].includes(e)?this.timeShifted():0),t}getInternalLabels(){const e={media_bu_distributer:this.srcMediaData.mediaData.vendor,media_chromecast_selected:!!this.player.tech(!0).isCasting,media_embedding_url:document.referrer,media_player_display:"default",media_player_name:"pillarbox-web",media_player_version:this.playerVersion,media_url:this.srcMediaData.src},t=this.srcMediaData.mediaData.analyticsMetadata||{};window.tc_vars=Object.assign({},window.tc_vars,e,t)}heartBeat(){this.heartBeatIntervalId=setInterval(()=>{this.player.paused()||this.notify("pos")},3e4)}initCallbacks(){this.beforeunloadListener=this.beforeunload.bind(this),this.emptiedListener=this.emptied.bind(this),this.endedListener=this.ended.bind(this),this.loadstartListener=this.loadstart.bind(this),this.loadeddataListener=this.loadeddata.bind(this),this.playListener=this.play.bind(this),this.pauseListener=this.pause.bind(this),this.rateChangeListener=this.rateChange.bind(this),this.seekingListener=this.seeking.bind(this),this.timeUpdateListener=this.timeUpdate.bind(this),this.waitingListener=this.waiting.bind(this)}initListeners(){this.initCallbacks(),window.addEventListener("beforeunload",this.beforeunloadListener),this.player.on(vL,this.emptiedListener),this.player.on(gL,this.endedListener),this.player.on(yL,this.loadstartListener),this.player.on(mL,this.loadeddataListener),this.player.on(Qb,this.playListener),this.player.on(Zb,this.pauseListener),this.player.on(_L,this.rateChangeListener),this.player.on(bL,this.seekingListener),this.player.on(Jb,this.timeUpdateListener),this.player.on(SL,this.waitingListener),this.player.one("dispose",this.dispose.bind(this))}initScript(){const e="tc_script__11";if(!document.querySelector(`#${e}`)){const t=document.createElement("script"),i=this.tagCommanderScriptURL;t.defer=!0,t.id=e,t.src=i,t.type="text/javascript",t.onload=n=>{this.flush()},document.body.appendChild(t)}}isAudioTrackEnabled(){return!!this.getCurrentAudioTrack()}isMediaDvr(){const{trackingThreshold:e}=this.player.liveTracker.options();return!this.isMediaOnDemand()&&e<this.player.liveTracker.liveWindow()}isMediaLive(){const{trackingThreshold:e}=this.player.liveTracker.options();return!this.isMediaOnDemand()&&e>this.player.liveTracker.liveWindow()}isMediaOnDemand(){return Number.isFinite(this.player.duration())}isTextTrackEnabled(){return!!this.getCurrentTextTrack()}isTrackerDisabled(){return!this.srcMediaData||!this.srcMediaData.mediaData?!0:Array.isArray(this.srcMediaData.disableTrackers)?!!this.srcMediaData.disableTrackers.find(e=>e.toLowerCase()===du.name.toLowerCase()):!!this.srcMediaData.disableTrackers}loadstart(){this.destroy(),this.updateSrcMediaData(this.player.currentSource()),!this.isTrackerDisabled()&&(this.getInternalLabels(),this.reloadTagCommanderContainer(),this.notify("buffer_start"),this.hasStarted=!1)}loadeddata(){this.notify("init"),this.initialized=!0,this.notify("buffer_stop")}log(e,t,i="log"){this.debug()&&console[i](`SRGAnalytics:${e}`,t,window.tc_vars)}notify(e,t){if(this.isTrackerDisabled())return;try{this.flush()}catch(n){this.log(e,n,"error")}const i=Object.assign({},this.getEventLabels(e),t);this.log(e,i);try{window.tc_events_11?window.tc_events_11(this.player.el(),e,i):this.pendingQueue.push({action:e,labels:i})}catch(n){this.log(e,n,"error")}}static now(){return(Date.now()/1e3).toFixed(0)}play(){this.hasStarted||(this.hasStarted=!0),!this.startPlaybackSession&&!this.isMediaOnDemand()&&(this.startPlaybackSession=du.now()),this.mediaSession===0&&(this.mediaSession=du.now(),this.heartBeat(),this.uptime()),this.timeUpdate(),this.notify("play"),this.isSeeking&&(this.isSeeking=!1)}pause(){if(this.isMediaOnDemand()||(this.elapsedPlaybackTime=this.getElapsedPlayingTime(),this.startPlaybackSession=0),!this.player.seeking()&&!this.isMediaLive()&&this.player.currentTime()<this.player.duration()){this.notify("pause");return}this.hasStarted&&!this.isSeeking&&(this.notify("seek"),this.isSeeking=!0)}rateChange(){this.notify("change_playback_rate")}reloadTagCommanderContainer(){window.tC?(window.tC.container.reload(),this.pendingTagCommanderReload=!1):this.pendingTagCommanderReload=!0}seeking(){this.hasStarted&&!this.player.paused()&&!this.isSeeking&&(this.notify("seek"),this.isSeeking=!0)}timeUpdate(){this.player.paused()||(this.trackedCurrentTime=this.player.currentTime())}timeShifted(){const e=this.player.liveTracker.atLiveEdge(),t=this.player.liveTracker.liveCurrentTime(),i=this.player.currentTime();return e?0:(t-i).toFixed(0)}updateSrcMediaData(e){this.srcMediaData=e}uptime(){const e=()=>{!this.player.paused()&&!this.isMediaOnDemand()&&this.notify("uptime")};this.uptimeTimeoutId=setTimeout(()=>{e(),this.uptimeIntervalId=setInterval(()=>{e()},6e4)},3e4)}waiting(){if(!this.initialized||this.isWaiting)return;const e=()=>{this.isWaiting=!1,this.notify("buffer_stop")};this.isWaiting=!0,this.notify("buffer_start"),lr.browser.IS_ANY_SAFARI?this.player.one(Jb,e):this.player.one(Qb,e)}}class cse{findChapterByUrn(e){if(this.chapterList){const[t]=this.chapterList.filter(i=>i.urn===e);return t}}findMainSegment(){if(!this.segmentUrn)return;const e=this.getMainSegments(),[t]=e.filter(i=>i.urn===this.segmentUrn);return t}findResourceListByUrn(e){const t=this.findChapterByUrn(e);if(t)return t.resourceList||[]}getChapters(){const e="AUDIO";return this.getMainChapter().mediaType===e?[]:this.chapterList.filter(({mediaType:t})=>t!==e)}getFilteredExternalSubtitles(){const{subtitleList:e}=this.getMainChapter(),[{subtitleInformationList:t}={}]=this.getResourceList().filter(({subtitleInformationList:a})=>a),i=e&&!t;if(!e)return[];const n=e.filter(a=>a.format!=="TTML");return i?n:n.filter(a=>!t.find(o=>o.locale===a.locale&&a.type===o.type))}getMainBlockReason(){const e=this.getMainChapter();if(!e)return;let{blockReason:t}=e;return!t&&new Date<this.getMainValidFromDate()&&(t="STARTDATE"),t}getMainBlockedSegments(){return this.getMainSegments().filter(e=>e.blockReason)}getMainChapter(){return this.mainChapter||(this.mainChapter=this.findChapterByUrn(this.chapterUrn)),!this.mainChapter&&this.chapterList&&this.chapterList.length>0&&([this.mainChapter]=this.chapterList),this.mainChapter}getMainChapterImageUrl(){const e=this.getMainChapter();if(!(!e||!e.imageUrl))return e.imageUrl}getMainResources(){const e=this.getResourceList();if(!(!e||!e.length))return e.map(t=>({analyticsData:this.getMergedAnalyticsData(t.analyticsData),analyticsMetadata:this.getMergedAnalyticsMetadata(t.analyticsMetadata),blockReason:this.getMainChapter().blockReason,blockedSegments:this.getMainBlockedSegments(),imageUrl:this.getMainChapterImageUrl(),chapters:this.getChapters(),drmList:t.drmList,dvr:t.dvr,eventData:this.getMainChapter().eventData,id:this.getMainChapter().id,imageCopyright:this.getMainChapter().imageCopyright,intervals:this.getMainTimeIntervals(),live:t.live,mediaType:this.getMainChapter().mediaType,mimeType:t.mimeType,presentation:t.presentation,quality:t.quality,streaming:t.streaming,streamOffset:t.streamOffset,subtitles:this.getFilteredExternalSubtitles(),title:this.getMainChapter().title,tokenType:t.tokenType,url:t.url,urn:this.chapterUrn,vendor:this.getMainChapter().vendor}))}getMainSegments(){const e=this.getMainChapter();return!this.mainSegments&&e&&e.segmentList&&(this.mainSegments=e.segmentList),this.mainSegments||[]}getMainTimeIntervals(){const{timeIntervalList:e=[]}=this.getMainChapter()||{};return e}getMainValidFromDate(){const e=this.getMainChapter();if(!e)return new Date(0);const{validFrom:t}=e;if(t)return new Date(t)}getMergedAnalyticsData(e){return Kr(Kr(Kr({},this.analyticsData),this.getMainChapter().analyticsData),e)}getMergedAnalyticsMetadata(e){return Kr(Kr(Kr({},this.analyticsMetadata),this.getMainChapter().analyticsMetadata),e)}getResourceList(){const{resourceList:e}=this.getMainChapter();return e||[]}}var zU="Wiedergabe",GU="Pause",HU="Erneut abspielen",$U="Dauer",WU="LIVE",qU="Geladen",jU="Status",XU="Vollbild",YU="Stumm schalten",KU="Ton einschalten",ZU="Untertitel",QU="Untertitel",JU="Kapitel",e6="Schließen",t6="Beschreibungen",r6="Schrift",i6="Weiß",n6="Schwarz",a6="Rot",s6="Grün",o6="Blau",l6="Gelb",u6="Magenta",c6="Türkis",h6="Hintergrund",f6="Fenster",d6="Durchsichtig",p6="Undurchsichtig",v6="Kein",g6="Erhoben",m6="Gedrückt",y6="Uniform",_6="Zwanglos",b6="Schreibschrift",S6="Zurücksetzen",T6="Fertig",x6="Farbe",w6="Deckkraft",hse={Play:zU,Pause:GU,Replay:HU,"Current Time":"Aktueller Zeitpunkt",Duration:$U,"Remaining Time":"Verbleibende Zeit","Stream Type":"Streamtyp",LIVE:WU,Loaded:qU,Progress:jU,Fullscreen:XU,"Exit Fullscreen":"Vollbildmodus beenden",Mute:YU,Unmute:KU,"Playback Rate":"Wiedergabegeschwindigkeit",Subtitles:ZU,"subtitles off":"Untertitel aus",Captions:QU,"captions off":"Untertitel aus",Chapters:JU,"You aborted the media playback":"Sie haben die Videowiedergabe abgebrochen.","A network error caused the media download to fail part-way.":"Der Videodownload ist aufgrund eines Netzwerkfehlers fehlgeschlagen.","The media could not be loaded, either because the server or network failed or because the format is not supported.":"Das Video konnte nicht geladen werden, da entweder ein Server- oder Netzwerkfehler auftrat oder das Format nicht unterstützt wird.","The media playback was aborted due to a corruption problem or because the media used features your browser did not support.":"Die Videowiedergabe wurde entweder wegen eines Problems mit einem beschädigten Video oder wegen verwendeten Funktionen, die vom Browser nicht unterstützt werden, abgebrochen.","No compatible source was found for this media.":"Für dieses Video wurde keine kompatible Quelle gefunden.","Play Video":"Video abspielen",Close:e6,"Modal Window":"Modales Fenster","This is a modal window":"Dies ist ein modales Fenster","This modal can be closed by pressing the Escape key or activating the close button.":'Durch Drücken der Esc-Taste bzw. Betätigung der Schaltfläche "Schließen" wird dieses modale Fenster geschlossen.',", opens captions settings dialog":", öffnet Einstellungen für Untertitel",", opens subtitles settings dialog":", öffnet Einstellungen für Untertitel",", selected":", ausgewählt","captions settings":"Untertiteleinstellungen","subtitles settings":"Untertiteleinstellungen","descriptions settings":"Einstellungen für Beschreibungen","Close Modal Dialog":"Modales Fenster schließen",Descriptions:t6,"descriptions off":"Beschreibungen aus","The media is encrypted and we do not have the keys to decrypt it.":"Die Entschlüsselungsschlüssel für den verschlüsselten Medieninhalt sind nicht verfügbar.",", opens descriptions settings dialog":", öffnet Einstellungen für Beschreibungen","Audio Track":"Tonspur",Text:r6,White:i6,Black:n6,Red:a6,Green:s6,Blue:o6,Yellow:l6,Magenta:u6,Cyan:c6,Background:h6,Window:f6,Transparent:d6,"Semi-Transparent":"Halbdurchsichtig",Opaque:p6,"Font Size":"Schriftgröße","Text Edge Style":"Textkantenstil",None:v6,Raised:g6,Depressed:m6,Uniform:y6,"Drop shadow":"Schlagschatten","Font Family":"Schriftfamilie","Proportional Sans-Serif":"Proportionale Sans-Serif","Monospace Sans-Serif":"Monospace Sans-Serif","Proportional Serif":"Proportionale Serif","Monospace Serif":"Monospace Serif",Casual:_6,Script:b6,"Small Caps":"Small-Caps",Reset:S6,"restore all settings to the default values":"Alle Einstellungen auf die Standardwerte zurücksetzen",Done:T6,"Caption Settings Dialog":"Einstellungsdialog für Untertitel","Beginning of dialog window. Escape will cancel and close the window.":"Anfang des Dialogfensters. Esc bricht ab und schließt das Fenster.","End of dialog window.":"Ende des Dialogfensters.","Audio Player":"Audio-Player","Video Player":"Video-Player","Progress Bar":"Fortschrittsbalken","progress bar timing: currentTime={1} duration={2}":"{1} von {2}","Volume Level":"Lautstärke","{1} is loading.":"{1} wird geladen.","Seek to live, currently behind live":"Zur Live-Übertragung wechseln. Aktuell wird es nicht live abgespielt.","Seek to live, currently playing live":"Zur Live-Übertragung wechseln. Es wird aktuell live abgespielt.","Exit Picture-in-Picture":"Bild-im-Bild-Modus beenden","Picture-in-Picture":"Bild-im-Bild-Modus","No content":"Kein Inhalt",Color:x6,Opacity:w6,"Text Background":"Texthintergrund","Caption Area Background":"Hintergrund des Untertitelbereichs","Playing in Picture-in-Picture":"Wird im Bild-im-Bild-Modus wiedergegeben","Skip forward {1} seconds":"{1} Sekunden vorwärts","Skip backward {1} seconds":"{1} Sekunden zurück"},fse=Object.freeze({__proto__:null,Background:h6,Black:n6,Blue:o6,Captions:QU,Casual:_6,Chapters:JU,Close:e6,Color:x6,Cyan:c6,Depressed:m6,Descriptions:t6,Done:T6,Duration:$U,Fullscreen:XU,Green:s6,LIVE:WU,Loaded:qU,Magenta:u6,Mute:YU,None:v6,Opacity:w6,Opaque:p6,Pause:GU,Play:zU,Progress:jU,Raised:g6,Red:a6,Replay:HU,Reset:S6,Script:b6,Subtitles:ZU,Text:r6,Transparent:d6,Uniform:y6,Unmute:KU,White:i6,Window:f6,Yellow:l6,default:hse}),C6="Aus Gründen des Jugendschutzes steht dieser Inhalt nur zwischen 20:00 und 06:00 Uhr zur Verfügung.",A6="Aus Gründen des Jugendschutzes steht dieser Inhalt nur zwischen 23:00 und 05:00 Uhr zur Verfügung.",D6="Die Werbung wurde übersprungen.",E6="Dieser Inhalt ist nicht mehr verfügbar.",I6="Dieser Inhalt ist ausserhalb der Schweiz nicht verfügbar.",P6="Dieser Inhalt ist aus rechtlichen Gründen nicht verfügbar.",M6="Dieser Inhalt ist noch nicht verfügbar. Bitte probieren Sie es später noch einmal.",L6="Dieser Inhalt ist nicht verfügbar.",dse={AGERATING12:C6,AGERATING18:A6,COMMERCIAL:D6,ENDDATE:E6,GEOBLOCK:I6,LEGAL:P6,STARTDATE:M6,UNKNOWN:L6},pse=Object.freeze({__proto__:null,AGERATING12:C6,AGERATING18:A6,COMMERCIAL:D6,ENDDATE:E6,GEOBLOCK:I6,LEGAL:P6,STARTDATE:M6,UNKNOWN:L6,default:dse});lr.addLanguage("de",Kr(Kr({},fse),pse));var k6="Play",R6="Pause",O6="Replay",N6="Duration",B6="LIVE",F6="Loaded",U6="Progress",V6="Fullscreen",z6="Mute",G6="Unmute",H6="Subtitles",$6="Captions",W6="Chapters",q6="Descriptions",j6="Close",X6="Text",Y6="White",K6="Black",Z6="Red",Q6="Green",J6="Blue",eV="Yellow",tV="Magenta",rV="Cyan",iV="Background",nV="Window",aV="Transparent",sV="Opaque",oV="None",lV="Raised",uV="Depressed",cV="Uniform",hV="Casual",fV="Script",dV="Reset",pV="Done",vV="Color",gV="Opacity",vse={"Audio Player":"Audio Player","Video Player":"Video Player",Play:k6,Pause:R6,Replay:O6,"Current Time":"Current Time",Duration:N6,"Remaining Time":"Remaining Time","Stream Type":"Stream Type",LIVE:B6,"Seek to live, currently behind live":"Seek to live, currently behind live","Seek to live, currently playing live":"Seek to live, currently playing live",Loaded:F6,Progress:U6,"Progress Bar":"Progress Bar","progress bar timing: currentTime={1} duration={2}":"{1} of {2}",Fullscreen:V6,"Exit Fullscreen":"Exit Fullscreen",Mute:z6,Unmute:G6,"Playback Rate":"Playback Rate",Subtitles:H6,"subtitles off":"subtitles off",Captions:$6,"captions off":"captions off",Chapters:W6,Descriptions:q6,"descriptions off":"descriptions off","Audio Track":"Audio Track","Volume Level":"Volume Level","You aborted the media playback":"You aborted the media playback","A network error caused the media download to fail part-way.":"A network error caused the media download to fail part-way.","The media could not be loaded, either because the server or network failed or because the format is not supported.":"The media could not be loaded, either because the server or network failed or because the format is not supported.","The media playback was aborted due to a corruption problem or because the media used features your browser did not support.":"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.","No compatible source was found for this media.":"No compatible source was found for this media.","The media is encrypted and we do not have the keys to decrypt it.":"The media is encrypted and we do not have the keys to decrypt it.","Play Video":"Play Video",Close:j6,"Close Modal Dialog":"Close Modal Dialog","Modal Window":"Modal Window","This is a modal window":"This is a modal window","This modal can be closed by pressing the Escape key or activating the close button.":"This modal can be closed by pressing the Escape key or activating the close button.",", opens captions settings dialog":", opens captions settings dialog",", opens subtitles settings dialog":", opens subtitles settings dialog",", opens descriptions settings dialog":", opens descriptions settings dialog",", selected":", selected","captions settings":"captions settings","subtitles settings":"subtitles settings","descriptions settings":"descriptions settings",Text:X6,White:Y6,Black:K6,Red:Z6,Green:Q6,Blue:J6,Yellow:eV,Magenta:tV,Cyan:rV,Background:iV,Window:nV,Transparent:aV,"Semi-Transparent":"Semi-Transparent",Opaque:sV,"Font Size":"Font Size","Text Edge Style":"Text Edge Style",None:oV,Raised:lV,Depressed:uV,Uniform:cV,"Drop shadow":"Drop shadow","Font Family":"Font Family","Proportional Sans-Serif":"Proportional Sans-Serif","Monospace Sans-Serif":"Monospace Sans-Serif","Proportional Serif":"Proportional Serif","Monospace Serif":"Monospace Serif",Casual:hV,Script:fV,"Small Caps":"Small Caps",Reset:dV,"restore all settings to the default values":"restore all settings to the default values",Done:pV,"Caption Settings Dialog":"Caption Settings Dialog","Beginning of dialog window. Escape will cancel and close the window.":"Beginning of dialog window. Escape will cancel and close the window.","End of dialog window.":"End of dialog window.","{1} is loading.":"{1} is loading.","Exit Picture-in-Picture":"Exit Picture-in-Picture","Picture-in-Picture":"Picture-in-Picture","No content":"No content",Color:vV,Opacity:gV,"Text Background":"Text Background","Caption Area Background":"Caption Area Background","Playing in Picture-in-Picture":"Playing in Picture-in-Picture","Skip backward {1} seconds":"Skip backward {1} seconds","Skip forward {1} seconds":"Skip forward {1} seconds"},gse=Object.freeze({__proto__:null,Background:iV,Black:K6,Blue:J6,Captions:$6,Casual:hV,Chapters:W6,Close:j6,Color:vV,Cyan:rV,Depressed:uV,Descriptions:q6,Done:pV,Duration:N6,Fullscreen:V6,Green:Q6,LIVE:B6,Loaded:F6,Magenta:tV,Mute:z6,None:oV,Opacity:gV,Opaque:sV,Pause:R6,Play:k6,Progress:U6,Raised:lV,Red:Z6,Replay:O6,Reset:dV,Script:fV,Subtitles:H6,Text:X6,Transparent:aV,Uniform:cV,Unmute:G6,White:Y6,Window:nV,Yellow:eV,default:vse}),mV="To protect children this content is only available between 8PM and 6AM.",yV="To protect children this content is only available between 10PM and 5AM.",_V="This commercial content is not available.",bV="This content is not available anymore.",SV="This content is not available outside Switzerland.",TV="This content is not available due to legal restrictions.",xV="This content is not available yet.",wV="This content is not available.",mse={AGERATING12:mV,AGERATING18:yV,COMMERCIAL:_V,ENDDATE:bV,GEOBLOCK:SV,LEGAL:TV,STARTDATE:xV,UNKNOWN:wV},yse=Object.freeze({__proto__:null,AGERATING12:mV,AGERATING18:yV,COMMERCIAL:_V,ENDDATE:bV,GEOBLOCK:SV,LEGAL:TV,STARTDATE:xV,UNKNOWN:wV,default:mse});lr.addLanguage("en",Kr(Kr({},gse),yse));var CV="Lecture",AV="Pause",DV="Revoir",EV="Durée",IV="EN DIRECT",PV="Chargé",MV="Progression",LV="Plein écran",kV="Mettre en sourdine",RV="Activer le son",OV="Sous-titres",NV="Sous-titres transcrits",BV="Chapitres",FV="Descriptions",UV="Fermer",VV="Texte",zV="Blanc",GV="Noir",HV="Rouge",$V="Vert",WV="Bleu",qV="Jaune",jV="Magenta",XV="Cyan",YV="Arrière-plan",KV="Fenêtre",ZV="Transparent",QV="Opaque",JV="Aucun",ez="Élevé",tz="Enfoncé",rz="Uniforme",iz="Manuscrite",nz="Scripte",az="Réinitialiser",sz="Terminé",oz="Couleur",lz="Opacité",_se={"Audio Player":"Lecteur audio","Video Player":"Lecteur vidéo",Play:CV,Pause:AV,Replay:DV,"Current Time":"Temps actuel",Duration:EV,"Remaining Time":"Temps restant","Stream Type":"Type de flux",LIVE:IV,"Seek to live, currently behind live":"Rechercher le direct, actuellement après le direct","Seek to live, currently playing live":"Rechercher le direct, le direct actuellement en cours de lecture",Loaded:PV,Progress:MV,"Progress Bar":"Barre de progression","progress bar timing: currentTime={1} duration={2}":"{1} de {2}",Fullscreen:LV,"Exit Fullscreen":"Fenêtré",Mute:kV,Unmute:RV,"Playback Rate":"Vitesse de lecture",Subtitles:OV,"subtitles off":"Sous-titres désactivés",Captions:NV,"captions off":"Sous-titres transcrits désactivés",Chapters:BV,Descriptions:FV,"descriptions off":"descriptions désactivées","Audio Track":"Piste audio","Volume Level":"Niveau de volume","You aborted the media playback":"Vous avez interrompu la lecture de la vidéo.","A network error caused the media download to fail part-way.":"Une erreur de réseau a interrompu le téléchargement de la vidéo.","The media could not be loaded, either because the server or network failed or because the format is not supported.":"Cette vidéo n'a pas pu être chargée, soit parce que le serveur ou le réseau a échoué ou parce que le format n'est pas reconnu.","The media playback was aborted due to a corruption problem or because the media used features your browser did not support.":"La lecture de la vidéo a été interrompue à cause d'un problème de corruption ou parce que la vidéo utilise des fonctionnalités non prises en charge par votre navigateur.","No compatible source was found for this media.":"Aucune source compatible n'a été trouvée pour cette vidéo.","The media is encrypted and we do not have the keys to decrypt it.":"Le média est chiffré et nous n'avons pas les clés pour le déchiffrer.","Play Video":"Lire la vidéo",Close:UV,"Close Modal Dialog":"Fermer la boîte de dialogue modale","Modal Window":"Fenêtre modale","This is a modal window":"Ceci est une fenêtre modale","This modal can be closed by pressing the Escape key or activating the close button.":"Ce modal peut être fermé en appuyant sur la touche Échap ou activer le bouton de fermeture.",", opens captions settings dialog":", ouvrir les paramètres des sous-titres transcrits",", opens subtitles settings dialog":", ouvrir les paramètres des sous-titres",", opens descriptions settings dialog":", ouvrir les paramètres des descriptions",", selected":", sélectionné","captions settings":"Paramètres des sous-titres transcrits","subtitles settings":"Paramètres des sous-titres","descriptions settings":"Paramètres des descriptions",Text:VV,White:zV,Black:GV,Red:HV,Green:$V,Blue:WV,Yellow:qV,Magenta:jV,Cyan:XV,Background:YV,Window:KV,Transparent:ZV,"Semi-Transparent":"Semi-transparent",Opaque:QV,"Font Size":"Taille des caractères","Text Edge Style":"Style des contours du texte",None:JV,Raised:ez,Depressed:tz,Uniform:rz,"Drop shadow":"Ombre portée","Font Family":"Famille de polices","Proportional Sans-Serif":"Polices à chasse variable sans empattement (Proportional Sans-Serif)","Monospace Sans-Serif":"Polices à chasse fixe sans empattement (Monospace Sans-Serif)","Proportional Serif":"Polices à chasse variable avec empattement (Proportional Serif)","Monospace Serif":"Polices à chasse fixe avec empattement (Monospace Serif)",Casual:iz,Script:nz,"Small Caps":"Petites capitales",Reset:az,"restore all settings to the default values":"Restaurer tous les paramètres aux valeurs par défaut",Done:sz,"Caption Settings Dialog":"Boîte de dialogue des paramètres des sous-titres transcrits","Beginning of dialog window. Escape will cancel and close the window.":"Début de la fenêtre de dialogue. La touche d'échappement annulera et fermera la fenêtre.","End of dialog window.":"Fin de la fenêtre de dialogue.","Exit Picture-in-Picture":"Quitter le mode image dans l'image","Picture-in-Picture":"Image dans l'image","{1} is loading.":"{1} en cours de chargement.","No content":"Aucun contenu",Color:oz,Opacity:lz,"Text Background":"Arrière-plan du texte","Caption Area Background":"Arrière-plan de la zone de sous-titre","Skip backward {1} seconds":"Reculer de {1} secondes","Skip forward {1} seconds":"Avancer de {1} secondes"},bse=Object.freeze({__proto__:null,Background:YV,Black:GV,Blue:WV,Captions:NV,Casual:iz,Chapters:BV,Close:UV,Color:oz,Cyan:XV,Depressed:tz,Descriptions:FV,Done:sz,Duration:EV,Fullscreen:LV,Green:$V,LIVE:IV,Loaded:PV,Magenta:jV,Mute:kV,None:JV,Opacity:lz,Opaque:QV,Pause:AV,Play:CV,Progress:MV,Raised:ez,Red:HV,Replay:DV,Reset:az,Script:nz,Subtitles:OV,Text:VV,Transparent:ZV,Uniform:rz,Unmute:RV,White:zV,Window:KV,Yellow:qV,default:_se}),uz="Pour protéger les enfants, ce contenu est accessible entre 20h et 6h.",cz="Pour protéger les enfants, ce contenu est accessible entre 23h et 5h.",hz="Ce contenu n'est actuellement pas disponible.",fz="Ce contenu n'est plus disponible.",dz="La RTS ne dispose pas des droits de diffusion en dehors de la Suisse.",pz="Pour des raisons juridiques, ce contenu n'est pas disponible.",vz="Ce contenu n'est pas encore disponible. Veuillez réessayer plus tard.",gz="Ce contenu n'est actuellement pas disponible.",Sse={AGERATING12:uz,AGERATING18:cz,COMMERCIAL:hz,ENDDATE:fz,GEOBLOCK:dz,LEGAL:pz,STARTDATE:vz,UNKNOWN:gz},Tse=Object.freeze({__proto__:null,AGERATING12:uz,AGERATING18:cz,COMMERCIAL:hz,ENDDATE:fz,GEOBLOCK:dz,LEGAL:pz,STARTDATE:vz,UNKNOWN:gz,default:Sse});lr.addLanguage("fr",Kr(Kr({},bse),Tse));var mz="Play",yz="Pausa",_z="Replay",bz="Durata",Sz="LIVE",Tz="Caricato",xz="Stato",wz="Schermo intero",Cz="Disattiva l’audio",Az="Attiva l’audio",Dz="Sottotitoli",Ez="Sottotitoli non udenti",Iz="Capitolo",Pz="Descrizioni",Mz="Chiudi",Lz="Testo",kz="Bianco",Rz="Nero",Oz="Rosso",Nz="Verde",Bz="Blu",Fz="Giallo",Uz="Magenta",Vz="Ciano",zz="Sfondo",Gz="Finestra",Hz="Trasparente",$z="Opaco",Wz="Nessuno",qz="Uniforme",jz="Reinizializza",Xz="Fatto",Yz="Colore",Kz="Opacità",xse={"Audio Player":"Lettore audio","Video Player":"Lettore video",Play:mz,Pause:yz,Replay:_z,"Current Time":"Orario attuale",Duration:bz,"Remaining Time":"Tempo rimanente","Stream Type":"Tipo di streaming",LIVE:Sz,Loaded:Tz,Progress:xz,"Progress Bar":"Barra di avanzamento","progress bar timing: currentTime={1} duration={2}":"{1} di {2}",Fullscreen:wz,"Exit Fullscreen":"Chiudi Schermo intero",Mute:Cz,Unmute:Az,"Playback Rate":"Velocità di riproduzione",Subtitles:Dz,"subtitles off":"Senza sottotitoli",Captions:Ez,"captions off":"Senza sottotitoli non udenti",Chapters:Iz,Descriptions:Pz,"descriptions off":"Descrizioni disattivate","Audio Track":"Traccia audio","Volume Level":"Livello del volume","You aborted the media playback":"La riproduzione del contenuto multimediale è stata interrotta.","A network error caused the media download to fail part-way.":"Il download del contenuto multimediale è stato interrotto a causa di un problema rete.","The media could not be loaded, either because the server or network failed or because the format is not supported.":"Il contenuto multimediale non può essere caricato a causa di un errore nel server o nella rete o perché il formato non viene supportato.","The media playback was aborted due to a corruption problem or because the media used features your browser did not support.":"La riproduzione del contenuto multimediale è stata interrotta a causa di un file danneggiato o per l’utilizzo di impostazioni non supportate dal browser.","No compatible source was found for this media.":"Non ci sono fonti compatibili per questo contenuto multimediale.","The media is encrypted and we do not have the keys to decrypt it.":"Il contenuto multimediale è criptato e non disponiamo delle chiavi per decifrarlo.","Play Video":"Riproduci il video",Close:Mz,"Close Modal Dialog":"Chiudi la finestra di dialogo","Modal Window":"Finestra di dialogo","This is a modal window":"Questa è una finestra di dialogo","This modal can be closed by pressing the Escape key or activating the close button.":"Questa finestra di dialogo può essere chiusa premendo sul tasto Esc o attivando il pulsante di chiusura.",", opens captions settings dialog":", aprire i parametri della trascrizione dei sottotitoli",", opens subtitles settings dialog":", aprire i parametri dei sottotitoli",", opens descriptions settings dialog":", aprire i parametri delle descrizioni",", selected":", selezionato","captions settings":"Parametri sottotitoli non udenti","subtitles settings":"Parametri sottotitoli","descriptions settings":"Parametri descrizioni",Text:Lz,White:kz,Black:Rz,Red:Oz,Green:Nz,Blue:Bz,Yellow:Fz,Magenta:Uz,Cyan:Vz,Background:zz,Window:Gz,Transparent:Hz,"Semi-Transparent":"Semi-Trasparente",Opaque:$z,"Font Size":"Dimensione dei caratteri","Text Edge Style":"Stile dei bordi del testo",None:Wz,Uniform:qz,"Drop shadow":"Ombra","Font Family":"Carattere","Proportional Sans-Serif":"Sans-Serif proporzionale","Monospace Sans-Serif":"Sans-Serif monospaziato","Proportional Serif":"Serif proporzionale","Monospace Serif":"Serif monospaziato","Small Caps":"Maiuscoletto",Reset:jz,"restore all settings to the default values":"Ripristina i valori predefiniti per tutti i parametri",Done:Xz,"Caption Settings Dialog":"Finestra di dialogo dei parametri della trascrizione dei sottotitoli","Beginning of dialog window. Escape will cancel and close the window.":"Inizio della finestra di dialogo. Il tasto Esc annullerà l’operazione e chiuderà la finestra.","End of dialog window.":"Fine della finestra di dialogo.","{1} is loading.":"{1} in fase di caricamento.","Exit Picture-in-Picture":"Esci dalla modalità Picture-in-Picture","Picture-in-Picture":"Picture-in-Picture",Color:Yz,Opacity:Kz,"Text Background":"Sfondo testo","Caption Area Background":"Sfondo area sottotitoli","Skip forward {1} seconds":"Avanti {1} secondi","Skip backward {1} seconds":"Indietro {1} secondi"},wse=Object.freeze({__proto__:null,Background:zz,Black:Rz,Blue:Bz,Captions:Ez,Chapters:Iz,Close:Mz,Color:Yz,Cyan:Vz,Descriptions:Pz,Done:Xz,Duration:bz,Fullscreen:wz,Green:Nz,LIVE:Sz,Loaded:Tz,Magenta:Uz,Mute:Cz,None:Wz,Opacity:Kz,Opaque:$z,Pause:yz,Play:mz,Progress:xz,Red:Oz,Replay:_z,Reset:jz,Subtitles:Dz,Text:Lz,Transparent:Hz,Uniform:qz,Unmute:Az,White:kz,Window:Gz,Yellow:Fz,default:xse}),Zz="Per proteggere i bambini, questo media è disponibile solo fra le 20 e le 6.",Qz="Per proteggere i bambini, questo media è disponibile solo fra le 23 le 5.",Jz="Questo contenuto commerciale non è disponibile.",e7="Questo media non è più disponibile.",t7="Questo media non è disponibile fuori dalla Svizzera.",r7="Il contenuto non è fruibile a causa di restrizioni legali.",i7="Il contenuto non è ancora disponibile. Per cortesia prova più tardi.",n7="Questo media non è disponibile.",Cse={AGERATING12:Zz,AGERATING18:Qz,COMMERCIAL:Jz,ENDDATE:e7,GEOBLOCK:t7,LEGAL:r7,STARTDATE:i7,UNKNOWN:n7},Ase=Object.freeze({__proto__:null,AGERATING12:Zz,AGERATING18:Qz,COMMERCIAL:Jz,ENDDATE:e7,GEOBLOCK:t7,LEGAL:r7,STARTDATE:i7,UNKNOWN:n7,default:Cse});lr.addLanguage("it",Kr(Kr({},wse),Ase));var a7="Laschar ir",s7="Pausa",o7="Mussar danovamain",l7="Durada",u7="LIVE",c7="Chargià",h7="Progress",f7="Entir visur",d7="Senza tun",p7="Cun tun",v7="Suttitels",g7="Suttitels",m7="Chapitels",y7="Descripziuns",_7="Serrar",b7="Text",S7="Alv",T7="Nair",x7="Cotschn",w7="Verd",C7="Blau",A7="Mellen",D7="Magenta",E7="Cyan",I7="Fund",P7="Fanestra",M7="Transparent",L7="Betg transparent",k7="Nagin",R7="Auzà",O7="Sbassà",N7="Uniform",B7="Sumbriva",F7="Casual",U7="Script",V7="Da nov",z7="Fatg",G7="Per proteger uffants, è quest cuntegn disponibel mo tranter las 20.00 e las 06.00.",H7="Per proteger uffants, è quest cuntegn disponibel mo tranter las 23.00 e las 05.00.",$7="Quest medium commerzial n'è betg disponibel.",W7="Quest cuntegn n'è betg pli disponibel.",q7="Quest cuntegn n'è betg disponibel ordaifer la Svizra.",j7="Quest cuntegn n'è betg disponibel perquai ch'el è scadì.",X7="Quest cuntegn n'è betg anc disponibel. Empruvai pli tard.",Y7="Quest cuntegn n'è betg disponibel.",Dse={"Audio Player":"Audio-Player","Video Player":"Video-Player",Play:a7,Pause:s7,Replay:o7,"Current Time":"Temp actual",Duration:l7,"Remaining Time":"Temp restant","Stream Type":"Tip dal stream",LIVE:u7,Loaded:c7,Progress:h7,"Progress Bar":"Bar da progessiun","progress bar timing: currentTime={1} duration={2}":"{1} da {2}",Fullscreen:f7,"Non-Fullscreen":"Betg entir visur",Mute:d7,Unmute:p7,"Playback Rate":"Tempo ",Subtitles:v7,"subtitles off":"senza suttitels",Captions:g7,"captions off":"senza suttitels",Chapters:m7,Descriptions:y7,"descriptions off":"senza descripziuns","Audio Track":"Piese audio","Volume Level":"Nivel dal volumen","You aborted the media playback":"Vus avais interrut il vdieo","A network error caused the media download to fail part-way.":"In sbagl en la rait ha impedì il download","The media could not be loaded, either because the server or network failed or because the format is not supported.":"Il video n'è betg chargià - ubain per in sbagl da server / da la rait, ubain ch'il format n'è betg cumpatibel.","The media playback was aborted due to a corruption problem or because the media used features your browser did not support.":"Il video è interrut: Ubain ch'il video è donnegià, ubain che funcziuns n'èn betg cumpatiblas.","No compatible source was found for this media.":"Chattà nagina funtauna cumpatibla per quest video.","The media is encrypted and we do not have the keys to decrypt it.":"Il video è codifitgà da moda nunenconuschenta.","Play Video":"Aviar video",Close:_7,"Close Modal Dialog":"Serrar la fanestra modala","Modal Window":"Fanestra modala","This is a modal window":"Quai è ina fanestra modala","This modal can be closed by pressing the Escape key or activating the close button.":'Questa fanestra modala pudais serrar cun la tasta "Escape" ubain cun il buttun.',", opens captions settings dialog":", avra opziuns per ils suttitels",", opens subtitles settings dialog":", avra opziuns per ils suttitels",", opens descriptions settings dialog":", avra opziuns per la descripziun",", selected":", selecziunà","captions settings":"opziuns per ils suttitels","subtitles settings":"opziuns per ils suttitels","descriptions settings":"opziuns per la descripziun",Text:b7,White:S7,Black:T7,Red:x7,Green:w7,Blue:C7,Yellow:A7,Magenta:D7,Cyan:E7,Background:I7,Window:P7,Transparent:M7,"Semi-Transparent":"Mez transparent",Opaque:L7,"Font Size":"Grandezza dal text","Text Edge Style":"Stil dal text",None:k7,Raised:R7,Depressed:O7,Uniform:N7,Dropshadow:B7,"Font Family":"Scrittira","Proportional Sans-Serif":"Proportionale Sans-Serif","Monospace Sans-Serif":"Monospace Sans-Serif","Proportional Serif":"Proportionale Serif","Monospace Serif":"Monospace Serif",Casual:F7,Script:U7,"Small Caps":"Bustabs pitschens",Reset:V7,"restore all settings to the default values":"Enavos tar las opziuns da standard",Done:z7,"Caption Settings Dialog":"Opziuns per suttitels","Beginning of dialog window. Escape will cancel and close the window.":"Entschatta da la fanestra da dialog. Escape stizza e serra la fanestra.","End of dialog window.":"Fin da la fanestra da dialog.",AGERATING12:G7,AGERATING18:H7,COMMERCIAL:$7,ENDDATE:W7,GEOBLOCK:q7,LEGAL:j7,STARTDATE:X7,UNKNOWN:Y7},Ese=Object.freeze({__proto__:null,AGERATING12:G7,AGERATING18:H7,Background:I7,Black:T7,Blue:C7,COMMERCIAL:$7,Captions:g7,Casual:F7,Chapters:m7,Close:_7,Cyan:E7,Depressed:O7,Descriptions:y7,Done:z7,Dropshadow:B7,Duration:l7,ENDDATE:W7,Fullscreen:f7,GEOBLOCK:q7,Green:w7,LEGAL:j7,LIVE:u7,Loaded:c7,Magenta:D7,Mute:d7,None:k7,Opaque:L7,Pause:s7,Play:a7,Progress:h7,Raised:R7,Red:x7,Replay:o7,Reset:V7,STARTDATE:X7,Script:U7,Subtitles:v7,Text:b7,Transparent:M7,UNKNOWN:Y7,Uniform:N7,Unmute:p7,White:S7,Window:P7,Yellow:A7,default:Dse});lr.addLanguage("rm",Kr({},Ese));const Ise=["url","mimeType","keySystems"],Pse=["src"];class pt{static addBlockedSegments(e,t=[]){const i="srgssr-blocked-segments",n=e.textTracks().getTrackById(i);if(n&&e.textTracks().removeTrack(n),!Array.isArray(t)||!t.length)return;const a=t.filter(s=>s.blockReason);a.length&&pt.createTextTrack(e,i).then(s=>{a.forEach(o=>{pt.addTextTrackCue(s,o)}),e.textTracks().addTrack(s)})}static addRemoteTextTracks(e,t=[]){Array.isArray(t)&&t.forEach(({type:i,language:n,locale:a,url:s})=>{e.addRemoteTextTrack({kind:i==="SDH"?"captions":"subtitles",label:n,language:a,src:s})})}static addTextTrackCue(e,t){const i=(Number.isFinite(t.markIn)?t.markIn:t.fullLengthMarkIn)/1e3,n=(Number.isFinite(t.markOut)?t.markOut:t.fullLengthMarkOut)/1e3;e.addCue(new VTTCue(i,n,JSON.stringify(t)))}static addTextTracks(e,{mediaData:t}){pt.addRemoteTextTracks(e,t.subtitles),pt.addChapters(e,t.urn,t.chapters),pt.addBlockedSegments(e,t.blockedSegments),pt.addIntervals(e,t.intervals)}static addChapters(e,t,i=[]){const n="srgssr-chapters",a=e.textTracks().getTrackById(n);a&&e.textTracks().removeTrack(a),!(!Array.isArray(i)||!i.length)&&pt.createTextTrack(e,n).then(s=>{i.forEach(o=>{t===o.fullLengthUrn&&pt.addTextTrackCue(s,o)}),e.textTracks().addTrack(s)})}static addIntervals(e,t=[]){const i="srgssr-intervals",n=e.textTracks().getTrackById(i);n&&e.textTracks().removeTrack(n),!(!Array.isArray(t)||!t.length)&&pt.createTextTrack(e,i).then(a=>{t.forEach(s=>{pt.addTextTrackCue(a,s)}),e.textTracks().addTrack(a)})}static blockingReason(e,t){if(!t.mediaData.blockReason)return;const i=e.localize(t.mediaData.blockReason);return pt.error(e,{code:MediaError.MEDIA_ERR_ABORTED,message:i,metadata:{errorType:t.mediaData.blockReason,src:t}}),!0}static composeAkamaiResources(e=[]){return hh(function*(){return Bu.hasToken(e)?Bu.tokenizeSources(e):Promise.resolve(e)})()}static composeKeySystemsResources(e=[]){return fv.hasDrm(e),e.map(t=>Kr(Kr({},t),fv.buildKeySystems(t.drmList)))}static composeMainResources(e){return pt.composeAkamaiResources(pt.composeKeySystemsResources(pt.filterIncompatibleResources(e.getMainResources())))}static composeSrcMediaData({mediaData:e,disableTrackers:t},i){const n=lr.obj.merge(i,e),{url:a,mimeType:s,keySystems:o}=n,l=dL(n,Ise);return{src:a,type:s,keySystems:o,disableTrackers:t,mediaData:l}}static createTextTrack(e,t){return new Promise(i=>{setTimeout(()=>{i(new lr.TextTrack({id:t,kind:"metadata",label:t,tech:e.tech(!0)}))},100)})}static cuechangeEventProxy(e){e.textTracks().on("addtrack",({track:t})=>{["srgssr-chapters","srgssr-intervals"].includes(t.id)&&t.on("cuechange",()=>{const[i]=Array.from(t.activeCues),n=t.id.includes("srgssr-chapters")?"srgssr/chapter":"srgssr/interval";e.trigger({type:n,data:i})})})}static dataProvider(e){if(!e.options().srgOptions.dataProvider){const{dataProviderHost:t,dataProviderUrlHandler:i}=e.options().srgOptions,a=new pL(t).handleRequest(i);e.options({srgOptions:{dataProvider:a}})}return e.options().srgOptions.dataProvider}static dataProviderError(e,t){if(!t)return;const i=t.statusText?t.statusText:t.message;return pt.error(e,{code:0,message:e.localize("UNKNOWN"),metadata:{errorType:"UNKNOWN",urn:e.src(),status:t.status,statusText:i,url:t.url}}),!0}static error(e,{code:t,message:i,metadata:n}){e.error(null),e.error({code:t,message:i,metadata:n})}static filterIncompatibleResources(e=[]){return e.filter(t=>!["RTMP","HDS"].includes(t.streaming))}static getBlockedSegment(e){const i=e.textTracks().getTrackById("srgssr-blocked-segments");if(!i)return;const[n]=Array.from(i.activeCues);return n}static getBlockedSegmentByTime(e,t){const i=pt.getBlockedSegment(e);return i&&t>=i.startTime&&t<i.endTime?i:void 0}static getMediaComposition(e,t=new pL().handleRequest()){return hh(function*(){const i=yield t(e);return Object.assign(new cse,i)})()}static getMediaData(e=[]){if(Bu.hasToken(e))return e[0];const t=lr.browser.IS_ANY_SAFARI?"HLS":"DASH";return e.find(({streaming:n})=>n===t)||e[0]}static getSrcMediaObj(e,t){return hh(function*(){const{src:i}=t,n=dL(t,Pse),a=yield pt.getMediaComposition(i,pt.dataProvider(e)),s=yield pt.composeMainResources(a),o=pt.getMediaData(s);return pt.composeSrcMediaData(n,o)})()}static handleCurrentTime(e,t){const i=pt.getBlockedSegmentByTime(e,t);if(!i||!Number.isFinite(i.endTime))return t;const n=i.endTime+.1;return e.trigger({type:"srgssr/blocked-segment",data:i}),e.currentTime(n),n}static handleSetCurrentTime(e,t){const{endTime:i}=pt.getBlockedSegmentByTime(e,t)||{};return Number.isFinite(i)?i:t}static handleSetSource(e,t,i){return hh(function*(){try{const n=yield pt.getSrcMediaObj(e,t);return pt.srgAnalytics(e),pt.updateTitleBar(e,n),pt.updatePoster(e,n),pt.blockingReason(e,n)?void 0:(pt.addTextTracks(e,n),i(null,n))}catch(n){return pt.dataProviderError(e,n)?void 0:i(n)}})()}static srgAnalytics(e){if(e.options().trackers.srgAnalytics!==!1&&!e.options().trackers.srgAnalytics){const t=new du(e,{debug:e.debug(),playerVersion:lr.VERSION.pillarbox,tagCommanderScriptURL:e.options().srgOptions.tagCommanderScriptURL});e.options({trackers:{srgAnalytics:t}})}}static updatePoster(e,t,i=ose){e.poster(i.scale({url:t.mediaData.imageUrl}))}static updateTitleBar(e,t){e.titleBar&&e.titleBar.update({title:t.mediaData.vendor,description:t.mediaData.title})}static middleware(e){return pt.cuechangeEventProxy(e),{currentTime:t=>pt.handleCurrentTime(e,t),setCurrentTime:t=>pt.handleSetCurrentTime(e,t),setSource:function(){var t=hh(function*(i,n){return pt.handleSetSource(e,i,n)});return function(n,a){return t.apply(this,arguments)}}()}}}lr.use("srgssr/urn",pt.middleware);lr.options.srgOptions={dataProvider:void 0,dataProviderHost:void 0,dataProviderUrlHandler:void 0,tagCommanderScriptURL:void 0};function Es(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function K7(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.__proto__=e}/*!
|
||
* GSAP 3.12.5
|
||
* https://gsap.com
|
||
*
|
||
* @license Copyright 2008-2024, GreenSock. All rights reserved.
|
||
* Subject to the terms at https://gsap.com/standard-license or for
|
||
* Club GSAP members, the agreement issued with that membership.
|
||
* @author: Jack Doyle, jack@greensock.com
|
||
*/var bn={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},cf={duration:.5,overwrite:!1,delay:0},zA,ui,Xt,$n=1e8,Ht=1/$n,Sw=Math.PI*2,Mse=Sw/4,Lse=0,Z7=Math.sqrt,kse=Math.cos,Rse=Math.sin,qr=function(e){return typeof e=="string"},ur=function(e){return typeof e=="function"},Ks=function(e){return typeof e=="number"},GA=function(e){return typeof e>"u"},ds=function(e){return typeof e=="object"},Yi=function(e){return e!==!1},HA=function(){return typeof window<"u"},vm=function(e){return ur(e)||qr(e)},Q7=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},ci=Array.isArray,Tw=/(?:-?\.?\d|\.)+/gi,J7=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,Th=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,eS=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,eG=/[+-]=-?[.\d]+/,tG=/[^,'"\[\]\s]+/gi,Ose=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,Qt,Ha,xw,$A,wn={},E0={},rG,iG=function(e){return(E0=ec(e,wn))&&en},WA=function(e,t){return console.warn("Invalid property",e,"set to",t,"Missing plugin? gsap.registerPlugin()")},dv=function(e,t){return!t&&console.warn(e)},nG=function(e,t){return e&&(wn[e]=t)&&E0&&(E0[e]=t)||wn},pv=function(){return 0},Nse={suppressEvents:!0,isStart:!0,kill:!1},Ay={suppressEvents:!0,kill:!1},Bse={suppressEvents:!0},qA={},qo=[],ww={},aG,cn={},tS={},TL=30,Dy=[],jA="",XA=function(e){var t=e[0],i,n;if(ds(t)||ur(t)||(e=[e]),!(i=(t._gsap||{}).harness)){for(n=Dy.length;n--&&!Dy[n].targetTest(t););i=Dy[n]}for(n=e.length;n--;)e[n]&&(e[n]._gsap||(e[n]._gsap=new IG(e[n],i)))||e.splice(n,1);return e},Fu=function(e){return e._gsap||XA(Wn(e))[0]._gsap},sG=function(e,t,i){return(i=e[t])&&ur(i)?e[t]():GA(i)&&e.getAttribute&&e.getAttribute(t)||i},Ki=function(e,t){return(e=e.split(",")).forEach(t)||e},mr=function(e){return Math.round(e*1e5)/1e5||0},Gr=function(e){return Math.round(e*1e7)/1e7||0},Oh=function(e,t){var i=t.charAt(0),n=parseFloat(t.substr(2));return e=parseFloat(e),i==="+"?e+n:i==="-"?e-n:i==="*"?e*n:e/n},Fse=function(e,t){for(var i=t.length,n=0;e.indexOf(t[n])<0&&++n<i;);return n<i},I0=function(){var e=qo.length,t=qo.slice(0),i,n;for(ww={},qo.length=0,i=0;i<e;i++)n=t[i],n&&n._lazy&&(n.render(n._lazy[0],n._lazy[1],!0)._lazy=0)},oG=function(e,t,i,n){qo.length&&!ui&&I0(),e.render(t,i,ui&&t<0&&(e._initted||e._startAt)),qo.length&&!ui&&I0()},lG=function(e){var t=parseFloat(e);return(t||t===0)&&(e+"").match(tG).length<2?t:qr(e)?e.trim():e},uG=function(e){return e},Zn=function(e,t){for(var i in t)i in e||(e[i]=t[i]);return e},Use=function(e){return function(t,i){for(var n in i)n in t||n==="duration"&&e||n==="ease"||(t[n]=i[n])}},ec=function(e,t){for(var i in t)e[i]=t[i];return e},xL=function r(e,t){for(var i in t)i!=="__proto__"&&i!=="constructor"&&i!=="prototype"&&(e[i]=ds(t[i])?r(e[i]||(e[i]={}),t[i]):t[i]);return e},P0=function(e,t){var i={},n;for(n in e)n in t||(i[n]=e[n]);return i},Op=function(e){var t=e.parent||Qt,i=e.keyframes?Use(ci(e.keyframes)):Zn;if(Yi(e.inherit))for(;t;)i(e,t.vars.defaults),t=t.parent||t._dp;return e},Vse=function(e,t){for(var i=e.length,n=i===t.length;n&&i--&&e[i]===t[i];);return i<0},cG=function(e,t,i,n,a){var s=e[n],o;if(a)for(o=t[a];s&&s[a]>o;)s=s._prev;return s?(t._next=s._next,s._next=t):(t._next=e[i],e[i]=t),t._next?t._next._prev=t:e[n]=t,t._prev=s,t.parent=t._dp=e,t},f1=function(e,t,i,n){i===void 0&&(i="_first"),n===void 0&&(n="_last");var a=t._prev,s=t._next;a?a._next=s:e[i]===t&&(e[i]=s),s?s._prev=a:e[n]===t&&(e[n]=a),t._next=t._prev=t.parent=null},il=function(e,t){e.parent&&(!t||e.parent.autoRemoveChildren)&&e.parent.remove&&e.parent.remove(e),e._act=0},Uu=function(e,t){if(e&&(!t||t._end>e._dur||t._start<0))for(var i=e;i;)i._dirty=1,i=i.parent;return e},zse=function(e){for(var t=e.parent;t&&t.parent;)t._dirty=1,t.totalDuration(),t=t.parent;return e},Cw=function(e,t,i,n){return e._startAt&&(ui?e._startAt.revert(Ay):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(t,!0,n))},Gse=function r(e){return!e||e._ts&&r(e.parent)},wL=function(e){return e._repeat?hf(e._tTime,e=e.duration()+e._rDelay)*e:0},hf=function(e,t){var i=Math.floor(e/=t);return e&&i===e?i-1:i},M0=function(e,t){return(e-t._start)*t._ts+(t._ts>=0?0:t._dirty?t.totalDuration():t._tDur)},d1=function(e){return e._end=Gr(e._start+(e._tDur/Math.abs(e._ts||e._rts||Ht)||0))},p1=function(e,t){var i=e._dp;return i&&i.smoothChildTiming&&e._ts&&(e._start=Gr(i._time-(e._ts>0?t/e._ts:((e._dirty?e.totalDuration():e._tDur)-t)/-e._ts)),d1(e),i._dirty||Uu(i,e)),e},hG=function(e,t){var i;if((t._time||!t._dur&&t._initted||t._start<e._time&&(t._dur||!t.add))&&(i=M0(e.rawTime(),t),(!t._dur||fg(0,t.totalDuration(),i)-t._tTime>Ht)&&t.render(i,!0)),Uu(e,t)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur<e.duration())for(i=e;i._dp;)i.rawTime()>=0&&i.totalTime(i._tTime),i=i._dp;e._zTime=-Ht}},qa=function(e,t,i,n){return t.parent&&il(t),t._start=Gr((Ks(i)?i:i||e!==Qt?Nn(e,i,t):e._time)+t._delay),t._end=Gr(t._start+(t.totalDuration()/Math.abs(t.timeScale())||0)),cG(e,t,"_first","_last",e._sort?"_start":0),Aw(t)||(e._recent=t),n||hG(e,t),e._ts<0&&p1(e,e._tTime),e},fG=function(e,t){return(wn.ScrollTrigger||WA("scrollTrigger",t))&&wn.ScrollTrigger.create(t,e)},dG=function(e,t,i,n,a){if(KA(e,t,a),!e._initted)return 1;if(!i&&e._pt&&!ui&&(e._dur&&e.vars.lazy!==!1||!e._dur&&e.vars.lazy)&&aG!==fn.frame)return qo.push(e),e._lazy=[a,n],1},Hse=function r(e){var t=e.parent;return t&&t._ts&&t._initted&&!t._lock&&(t.rawTime()<0||r(t))},Aw=function(e){var t=e.data;return t==="isFromStart"||t==="isStart"},$se=function(e,t,i,n){var a=e.ratio,s=t<0||!t&&(!e._start&&Hse(e)&&!(!e._initted&&Aw(e))||(e._ts<0||e._dp._ts<0)&&!Aw(e))?0:1,o=e._rDelay,l=0,u,c,h;if(o&&e._repeat&&(l=fg(0,e._tDur,t),c=hf(l,o),e._yoyo&&c&1&&(s=1-s),c!==hf(e._tTime,o)&&(a=1-s,e.vars.repeatRefresh&&e._initted&&e.invalidate())),s!==a||ui||n||e._zTime===Ht||!t&&e._zTime){if(!e._initted&&dG(e,t,n,i,l))return;for(h=e._zTime,e._zTime=t||(i?Ht:0),i||(i=t&&!h),e.ratio=s,e._from&&(s=1-s),e._time=0,e._tTime=l,u=e._pt;u;)u.r(s,u.d),u=u._next;t<0&&Cw(e,t,i,!0),e._onUpdate&&!i&&gn(e,"onUpdate"),l&&e._repeat&&!i&&e.parent&&gn(e,"onRepeat"),(t>=e._tDur||t<0)&&e.ratio===s&&(s&&il(e,1),!i&&!ui&&(gn(e,s?"onComplete":"onReverseComplete",!0),e._prom&&e._prom()))}else e._zTime||(e._zTime=t)},Wse=function(e,t,i){var n;if(i>t)for(n=e._first;n&&n._start<=i;){if(n.data==="isPause"&&n._start>t)return n;n=n._next}else for(n=e._last;n&&n._start>=i;){if(n.data==="isPause"&&n._start<t)return n;n=n._prev}},ff=function(e,t,i,n){var a=e._repeat,s=Gr(t)||0,o=e._tTime/e._tDur;return o&&!n&&(e._time*=s/e._dur),e._dur=s,e._tDur=a?a<0?1e10:Gr(s*(a+1)+e._rDelay*a):s,o>0&&!n&&p1(e,e._tTime=e._tDur*o),e.parent&&d1(e),i||Uu(e.parent,e),e},CL=function(e){return e instanceof Pi?Uu(e):ff(e,e._dur)},qse={_start:0,endTime:pv,totalDuration:pv},Nn=function r(e,t,i){var n=e.labels,a=e._recent||qse,s=e.duration()>=$n?a.endTime(!1):e._dur,o,l,u;return qr(t)&&(isNaN(t)||t in n)?(l=t.charAt(0),u=t.substr(-1)==="%",o=t.indexOf("="),l==="<"||l===">"?(o>=0&&(t=t.replace(/=/,"")),(l==="<"?a._start:a.endTime(a._repeat>=0))+(parseFloat(t.substr(1))||0)*(u?(o<0?a:i).totalDuration()/100:1)):o<0?(t in n||(n[t]=s),n[t]):(l=parseFloat(t.charAt(o-1)+t.substr(o+1)),u&&i&&(l=l/100*(ci(i)?i[0]:i).totalDuration()),o>1?r(e,t.substr(0,o-1),i)+l:s+l)):t==null?s:+t},Np=function(e,t,i){var n=Ks(t[1]),a=(n?2:1)+(e<2?0:1),s=t[a],o,l;if(n&&(s.duration=t[1]),s.parent=i,e){for(o=s,l=i;l&&!("immediateRender"in o);)o=l.vars.defaults||{},l=Yi(l.vars.inherit)&&l.parent;s.immediateRender=Yi(o.immediateRender),e<2?s.runBackwards=1:s.startAt=t[a-1]}return new wr(t[0],s,t[a+1])},dl=function(e,t){return e||e===0?t(e):t},fg=function(e,t,i){return i<e?e:i>t?t:i},si=function(e,t){return!qr(e)||!(t=Ose.exec(e))?"":t[1]},jse=function(e,t,i){return dl(i,function(n){return fg(e,t,n)})},Dw=[].slice,pG=function(e,t){return e&&ds(e)&&"length"in e&&(!t&&!e.length||e.length-1 in e&&ds(e[0]))&&!e.nodeType&&e!==Ha},Xse=function(e,t,i){return i===void 0&&(i=[]),e.forEach(function(n){var a;return qr(n)&&!t||pG(n,1)?(a=i).push.apply(a,Wn(n)):i.push(n)})||i},Wn=function(e,t,i){return Xt&&!t&&Xt.selector?Xt.selector(e):qr(e)&&!i&&(xw||!df())?Dw.call((t||$A).querySelectorAll(e),0):ci(e)?Xse(e,i):pG(e)?Dw.call(e,0):e?[e]:[]},Ew=function(e){return e=Wn(e)[0]||dv("Invalid scope")||{},function(t){var i=e.current||e.nativeElement||e;return Wn(t,i.querySelectorAll?i:i===e?dv("Invalid scope")||$A.createElement("div"):e)}},vG=function(e){return e.sort(function(){return .5-Math.random()})},gG=function(e){if(ur(e))return e;var t=ds(e)?e:{each:e},i=Vu(t.ease),n=t.from||0,a=parseFloat(t.base)||0,s={},o=n>0&&n<1,l=isNaN(n)||o,u=t.axis,c=n,h=n;return qr(n)?c=h={center:.5,edges:.5,end:1}[n]||0:!o&&l&&(c=n[0],h=n[1]),function(d,f,p){var v=(p||t).length,g=s[v],m,y,_,b,T,x,C,D,I;if(!g){if(I=t.grid==="auto"?0:(t.grid||[1,$n])[1],!I){for(C=-$n;C<(C=p[I++].getBoundingClientRect().left)&&I<v;);I<v&&I--}for(g=s[v]=[],m=l?Math.min(I,v)*c-.5:n%I,y=I===$n?0:l?v*h/I-.5:n/I|0,C=0,D=$n,x=0;x<v;x++)_=x%I-m,b=y-(x/I|0),g[x]=T=u?Math.abs(u==="y"?b:_):Z7(_*_+b*b),T>C&&(C=T),T<D&&(D=T);n==="random"&&vG(g),g.max=C-D,g.min=D,g.v=v=(parseFloat(t.amount)||parseFloat(t.each)*(I>v?v-1:u?u==="y"?v/I:I:Math.max(I,v/I))||0)*(n==="edges"?-1:1),g.b=v<0?a-v:a,g.u=si(t.amount||t.each)||0,i=i&&v<0?AG(i):i}return v=(g[d]-g.min)/g.max||0,Gr(g.b+(i?i(v):v)*g.v)+g.u}},Iw=function(e){var t=Math.pow(10,((e+"").split(".")[1]||"").length);return function(i){var n=Gr(Math.round(parseFloat(i)/e)*e*t);return(n-n%1)/t+(Ks(i)?0:si(i))}},mG=function(e,t){var i=ci(e),n,a;return!i&&ds(e)&&(n=i=e.radius||$n,e.values?(e=Wn(e.values),(a=!Ks(e[0]))&&(n*=n)):e=Iw(e.increment)),dl(t,i?ur(e)?function(s){return a=e(s),Math.abs(a-s)<=n?a:s}:function(s){for(var o=parseFloat(a?s.x:s),l=parseFloat(a?s.y:0),u=$n,c=0,h=e.length,d,f;h--;)a?(d=e[h].x-o,f=e[h].y-l,d=d*d+f*f):d=Math.abs(e[h]-o),d<u&&(u=d,c=h);return c=!n||u<=n?e[c]:s,a||c===s||Ks(s)?c:c+si(s)}:Iw(e))},yG=function(e,t,i,n){return dl(ci(e)?!t:i===!0?!!(i=0):!n,function(){return ci(e)?e[~~(Math.random()*e.length)]:(i=i||1e-5)&&(n=i<1?Math.pow(10,(i+"").length-2):1)&&Math.floor(Math.round((e-i/2+Math.random()*(t-e+i*.99))/i)*i*n)/n})},Yse=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return function(n){return t.reduce(function(a,s){return s(a)},n)}},Kse=function(e,t){return function(i){return e(parseFloat(i))+(t||si(i))}},Zse=function(e,t,i){return bG(e,t,0,1,i)},_G=function(e,t,i){return dl(i,function(n){return e[~~t(n)]})},Qse=function r(e,t,i){var n=t-e;return ci(e)?_G(e,r(0,e.length),t):dl(i,function(a){return(n+(a-e)%n)%n+e})},Jse=function r(e,t,i){var n=t-e,a=n*2;return ci(e)?_G(e,r(0,e.length-1),t):dl(i,function(s){return s=(a+(s-e)%a)%a||0,e+(s>n?a-s:s)})},vv=function(e){for(var t=0,i="",n,a,s,o;~(n=e.indexOf("random(",t));)s=e.indexOf(")",n),o=e.charAt(n+7)==="[",a=e.substr(n+7,s-n-7).match(o?tG:Tw),i+=e.substr(t,n-t)+yG(o?a:+a[0],o?0:+a[1],+a[2]||1e-5),t=s+1;return i+e.substr(t,e.length-t)},bG=function(e,t,i,n,a){var s=t-e,o=n-i;return dl(a,function(l){return i+((l-e)/s*o||0)})},eoe=function r(e,t,i,n){var a=isNaN(e+t)?0:function(f){return(1-f)*e+f*t};if(!a){var s=qr(e),o={},l,u,c,h,d;if(i===!0&&(n=1)&&(i=null),s)e={p:e},t={p:t};else if(ci(e)&&!ci(t)){for(c=[],h=e.length,d=h-2,u=1;u<h;u++)c.push(r(e[u-1],e[u]));h--,a=function(p){p*=h;var v=Math.min(d,~~p);return c[v](p-v)},i=t}else n||(e=ec(ci(e)?[]:{},e));if(!c){for(l in t)YA.call(o,e,l,"get",t[l]);a=function(p){return JA(p,o)||(s?e.p:e)}}}return dl(i,a)},AL=function(e,t,i){var n=e.labels,a=$n,s,o,l;for(s in n)o=n[s]-t,o<0==!!i&&o&&a>(o=Math.abs(o))&&(l=s,a=o);return l},gn=function(e,t,i){var n=e.vars,a=n[t],s=Xt,o=e._ctx,l,u,c;if(a)return l=n[t+"Params"],u=n.callbackScope||e,i&&qo.length&&I0(),o&&(Xt=o),c=l?a.apply(u,l):a.call(u),Xt=s,c},up=function(e){return il(e),e.scrollTrigger&&e.scrollTrigger.kill(!!ui),e.progress()<1&&gn(e,"onInterrupt"),e},xh,SG=[],TG=function(e){if(e)if(e=!e.name&&e.default||e,HA()||e.headless){var t=e.name,i=ur(e),n=t&&!i&&e.init?function(){this._props=[]}:e,a={init:pv,render:JA,add:YA,kill:goe,modifier:voe,rawVars:0},s={targetTest:0,get:0,getSetter:QA,aliases:{},register:0};if(df(),e!==n){if(cn[t])return;Zn(n,Zn(P0(e,a),s)),ec(n.prototype,ec(a,P0(e,s))),cn[n.prop=t]=n,e.targetTest&&(Dy.push(n),qA[t]=1),t=(t==="css"?"CSS":t.charAt(0).toUpperCase()+t.substr(1))+"Plugin"}nG(t,n),e.register&&e.register(en,n,Zi)}else SG.push(e)},Ut=255,cp={aqua:[0,Ut,Ut],lime:[0,Ut,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,Ut],navy:[0,0,128],white:[Ut,Ut,Ut],olive:[128,128,0],yellow:[Ut,Ut,0],orange:[Ut,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[Ut,0,0],pink:[Ut,192,203],cyan:[0,Ut,Ut],transparent:[Ut,Ut,Ut,0]},rS=function(e,t,i){return e+=e<0?1:e>1?-1:0,(e*6<1?t+(i-t)*e*6:e<.5?i:e*3<2?t+(i-t)*(2/3-e)*6:t)*Ut+.5|0},xG=function(e,t,i){var n=e?Ks(e)?[e>>16,e>>8&Ut,e&Ut]:0:cp.black,a,s,o,l,u,c,h,d,f,p;if(!n){if(e.substr(-1)===","&&(e=e.substr(0,e.length-1)),cp[e])n=cp[e];else if(e.charAt(0)==="#"){if(e.length<6&&(a=e.charAt(1),s=e.charAt(2),o=e.charAt(3),e="#"+a+a+s+s+o+o+(e.length===5?e.charAt(4)+e.charAt(4):"")),e.length===9)return n=parseInt(e.substr(1,6),16),[n>>16,n>>8&Ut,n&Ut,parseInt(e.substr(7),16)/255];e=parseInt(e.substr(1),16),n=[e>>16,e>>8&Ut,e&Ut]}else if(e.substr(0,3)==="hsl"){if(n=p=e.match(Tw),!t)l=+n[0]%360/360,u=+n[1]/100,c=+n[2]/100,s=c<=.5?c*(u+1):c+u-c*u,a=c*2-s,n.length>3&&(n[3]*=1),n[0]=rS(l+1/3,a,s),n[1]=rS(l,a,s),n[2]=rS(l-1/3,a,s);else if(~e.indexOf("="))return n=e.match(J7),i&&n.length<4&&(n[3]=1),n}else n=e.match(Tw)||cp.transparent;n=n.map(Number)}return t&&!p&&(a=n[0]/Ut,s=n[1]/Ut,o=n[2]/Ut,h=Math.max(a,s,o),d=Math.min(a,s,o),c=(h+d)/2,h===d?l=u=0:(f=h-d,u=c>.5?f/(2-h-d):f/(h+d),l=h===a?(s-o)/f+(s<o?6:0):h===s?(o-a)/f+2:(a-s)/f+4,l*=60),n[0]=~~(l+.5),n[1]=~~(u*100+.5),n[2]=~~(c*100+.5)),i&&n.length<4&&(n[3]=1),n},wG=function(e){var t=[],i=[],n=-1;return e.split(jo).forEach(function(a){var s=a.match(Th)||[];t.push.apply(t,s),i.push(n+=s.length+1)}),t.c=i,t},DL=function(e,t,i){var n="",a=(e+n).match(jo),s=t?"hsla(":"rgba(",o=0,l,u,c,h;if(!a)return e;if(a=a.map(function(d){return(d=xG(d,t,1))&&s+(t?d[0]+","+d[1]+"%,"+d[2]+"%,"+d[3]:d.join(","))+")"}),i&&(c=wG(e),l=i.c,l.join(n)!==c.c.join(n)))for(u=e.replace(jo,"1").split(Th),h=u.length-1;o<h;o++)n+=u[o]+(~l.indexOf(o)?a.shift()||s+"0,0,0,0)":(c.length?c:a.length?a:i).shift());if(!u)for(u=e.split(jo),h=u.length-1;o<h;o++)n+=u[o]+a[o];return n+u[h]},jo=function(){var r="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",e;for(e in cp)r+="|"+e+"\\b";return new RegExp(r+")","gi")}(),toe=/hsl[a]?\(/,CG=function(e){var t=e.join(" "),i;if(jo.lastIndex=0,jo.test(t))return i=toe.test(t),e[1]=DL(e[1],i),e[0]=DL(e[0],i,wG(e[1])),!0},gv,fn=function(){var r=Date.now,e=500,t=33,i=r(),n=i,a=1e3/240,s=a,o=[],l,u,c,h,d,f,p=function v(g){var m=r()-n,y=g===!0,_,b,T,x;if((m>e||m<0)&&(i+=m-t),n+=m,T=n-i,_=T-s,(_>0||y)&&(x=++h.frame,d=T-h.time*1e3,h.time=T=T/1e3,s+=_+(_>=a?4:a-_),b=1),y||(l=u(v)),b)for(f=0;f<o.length;f++)o[f](T,d,x,g)};return h={time:0,frame:0,tick:function(){p(!0)},deltaRatio:function(g){return d/(1e3/(g||60))},wake:function(){rG&&(!xw&&HA()&&(Ha=xw=window,$A=Ha.document||{},wn.gsap=en,(Ha.gsapVersions||(Ha.gsapVersions=[])).push(en.version),iG(E0||Ha.GreenSockGlobals||!Ha.gsap&&Ha||{}),SG.forEach(TG)),c=typeof requestAnimationFrame<"u"&&requestAnimationFrame,l&&h.sleep(),u=c||function(g){return setTimeout(g,s-h.time*1e3+1|0)},gv=1,p(2))},sleep:function(){(c?cancelAnimationFrame:clearTimeout)(l),gv=0,u=pv},lagSmoothing:function(g,m){e=g||1/0,t=Math.min(m||33,e)},fps:function(g){a=1e3/(g||240),s=h.time*1e3+a},add:function(g,m,y){var _=m?function(b,T,x,C){g(b,T,x,C),h.remove(_)}:g;return h.remove(g),o[y?"unshift":"push"](_),df(),_},remove:function(g,m){~(m=o.indexOf(g))&&o.splice(m,1)&&f>=m&&f--},_listeners:o},h}(),df=function(){return!gv&&fn.wake()},bt={},roe=/^[\d.\-M][\d.\-,\s]/,ioe=/["']/g,noe=function(e){for(var t={},i=e.substr(1,e.length-3).split(":"),n=i[0],a=1,s=i.length,o,l,u;a<s;a++)l=i[a],o=a!==s-1?l.lastIndexOf(","):l.length,u=l.substr(0,o),t[n]=isNaN(u)?u.replace(ioe,"").trim():+u,n=l.substr(o+1).trim();return t},aoe=function(e){var t=e.indexOf("(")+1,i=e.indexOf(")"),n=e.indexOf("(",t);return e.substring(t,~n&&n<i?e.indexOf(")",i+1):i)},soe=function(e){var t=(e+"").split("("),i=bt[t[0]];return i&&t.length>1&&i.config?i.config.apply(null,~e.indexOf("{")?[noe(t[1])]:aoe(e).split(",").map(lG)):bt._CE&&roe.test(e)?bt._CE("",e):i},AG=function(e){return function(t){return 1-e(1-t)}},DG=function r(e,t){for(var i=e._first,n;i;)i instanceof Pi?r(i,t):i.vars.yoyoEase&&(!i._yoyo||!i._repeat)&&i._yoyo!==t&&(i.timeline?r(i.timeline,t):(n=i._ease,i._ease=i._yEase,i._yEase=n,i._yoyo=t)),i=i._next},Vu=function(e,t){return e&&(ur(e)?e:bt[e]||soe(e))||t},pc=function(e,t,i,n){i===void 0&&(i=function(l){return 1-t(1-l)}),n===void 0&&(n=function(l){return l<.5?t(l*2)/2:1-t((1-l)*2)/2});var a={easeIn:t,easeOut:i,easeInOut:n},s;return Ki(e,function(o){bt[o]=wn[o]=a,bt[s=o.toLowerCase()]=i;for(var l in a)bt[s+(l==="easeIn"?".in":l==="easeOut"?".out":".inOut")]=bt[o+"."+l]=a[l]}),a},EG=function(e){return function(t){return t<.5?(1-e(1-t*2))/2:.5+e((t-.5)*2)/2}},iS=function r(e,t,i){var n=t>=1?t:1,a=(i||(e?.3:.45))/(t<1?t:1),s=a/Sw*(Math.asin(1/n)||0),o=function(c){return c===1?1:n*Math.pow(2,-10*c)*Rse((c-s)*a)+1},l=e==="out"?o:e==="in"?function(u){return 1-o(1-u)}:EG(o);return a=Sw/a,l.config=function(u,c){return r(e,u,c)},l},nS=function r(e,t){t===void 0&&(t=1.70158);var i=function(s){return s?--s*s*((t+1)*s+t)+1:0},n=e==="out"?i:e==="in"?function(a){return 1-i(1-a)}:EG(i);return n.config=function(a){return r(e,a)},n};Ki("Linear,Quad,Cubic,Quart,Quint,Strong",function(r,e){var t=e<5?e+1:e;pc(r+",Power"+(t-1),e?function(i){return Math.pow(i,t)}:function(i){return i},function(i){return 1-Math.pow(1-i,t)},function(i){return i<.5?Math.pow(i*2,t)/2:1-Math.pow((1-i)*2,t)/2})});bt.Linear.easeNone=bt.none=bt.Linear.easeIn;pc("Elastic",iS("in"),iS("out"),iS());(function(r,e){var t=1/e,i=2*t,n=2.5*t,a=function(o){return o<t?r*o*o:o<i?r*Math.pow(o-1.5/e,2)+.75:o<n?r*(o-=2.25/e)*o+.9375:r*Math.pow(o-2.625/e,2)+.984375};pc("Bounce",function(s){return 1-a(1-s)},a)})(7.5625,2.75);pc("Expo",function(r){return r?Math.pow(2,10*(r-1)):0});pc("Circ",function(r){return-(Z7(1-r*r)-1)});pc("Sine",function(r){return r===1?1:-kse(r*Mse)+1});pc("Back",nS("in"),nS("out"),nS());bt.SteppedEase=bt.steps=wn.SteppedEase={config:function(e,t){e===void 0&&(e=1);var i=1/e,n=e+(t?0:1),a=t?1:0,s=1-Ht;return function(o){return((n*fg(0,s,o)|0)+a)*i}}};cf.ease=bt["quad.out"];Ki("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(r){return jA+=r+","+r+"Params,"});var IG=function(e,t){this.id=Lse++,e._gsap=this,this.target=e,this.harness=t,this.get=t?t.get:sG,this.set=t?t.getSetter:QA},mv=function(){function r(t){this.vars=t,this._delay=+t.delay||0,(this._repeat=t.repeat===1/0?-2:t.repeat||0)&&(this._rDelay=t.repeatDelay||0,this._yoyo=!!t.yoyo||!!t.yoyoEase),this._ts=1,ff(this,+t.duration,1,1),this.data=t.data,Xt&&(this._ctx=Xt,Xt.data.push(this)),gv||fn.wake()}var e=r.prototype;return e.delay=function(i){return i||i===0?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+i-this._delay),this._delay=i,this):this._delay},e.duration=function(i){return arguments.length?this.totalDuration(this._repeat>0?i+(i+this._rDelay)*this._repeat:i):this.totalDuration()&&this._dur},e.totalDuration=function(i){return arguments.length?(this._dirty=0,ff(this,this._repeat<0?i:(i-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(i,n){if(df(),!arguments.length)return this._tTime;var a=this._dp;if(a&&a.smoothChildTiming&&this._ts){for(p1(this,i),!a._dp||a.parent||hG(a,this);a&&a.parent;)a.parent._time!==a._start+(a._ts>=0?a._tTime/a._ts:(a.totalDuration()-a._tTime)/-a._ts)&&a.totalTime(a._tTime,!0),a=a.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&i<this._tDur||this._ts<0&&i>0||!this._tDur&&!i)&&qa(this._dp,this,this._start-this._delay)}return(this._tTime!==i||!this._dur&&!n||this._initted&&Math.abs(this._zTime)===Ht||!i&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=i),oG(this,i,n)),this},e.time=function(i,n){return arguments.length?this.totalTime(Math.min(this.totalDuration(),i+wL(this))%(this._dur+this._rDelay)||(i?this._dur:0),n):this._time},e.totalProgress=function(i,n){return arguments.length?this.totalTime(this.totalDuration()*i,n):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>0?1:0},e.progress=function(i,n){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-i:i)+wL(this),n):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},e.iteration=function(i,n){var a=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(i-1)*a,n):this._repeat?hf(this._tTime,a)+1:1},e.timeScale=function(i,n){if(!arguments.length)return this._rts===-Ht?0:this._rts;if(this._rts===i)return this;var a=this.parent&&this._ts?M0(this.parent._time,this):this._tTime;return this._rts=+i||0,this._ts=this._ps||i===-Ht?0:this._rts,this.totalTime(fg(-Math.abs(this._delay),this._tDur,a),n!==!1),d1(this),zse(this)},e.paused=function(i){return arguments.length?(this._ps!==i&&(this._ps=i,i?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(df(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==Ht&&(this._tTime-=Ht)))),this):this._ps},e.startTime=function(i){if(arguments.length){this._start=i;var n=this.parent||this._dp;return n&&(n._sort||!this.parent)&&qa(n,this,i-this._delay),this}return this._start},e.endTime=function(i){return this._start+(Yi(i)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},e.rawTime=function(i){var n=this.parent||this._dp;return n?i&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?M0(n.rawTime(i),this):this._tTime:this._tTime},e.revert=function(i){i===void 0&&(i=Bse);var n=ui;return ui=i,(this._initted||this._startAt)&&(this.timeline&&this.timeline.revert(i),this.totalTime(-.01,i.suppressEvents)),this.data!=="nested"&&i.kill!==!1&&this.kill(),ui=n,this},e.globalTime=function(i){for(var n=this,a=arguments.length?i:n.rawTime();n;)a=n._start+a/(Math.abs(n._ts)||1),n=n._dp;return!this.parent&&this._sat?this._sat.globalTime(i):a},e.repeat=function(i){return arguments.length?(this._repeat=i===1/0?-2:i,CL(this)):this._repeat===-2?1/0:this._repeat},e.repeatDelay=function(i){if(arguments.length){var n=this._time;return this._rDelay=i,CL(this),n?this.time(n):this}return this._rDelay},e.yoyo=function(i){return arguments.length?(this._yoyo=i,this):this._yoyo},e.seek=function(i,n){return this.totalTime(Nn(this,i),Yi(n))},e.restart=function(i,n){return this.play().totalTime(i?-this._delay:0,Yi(n))},e.play=function(i,n){return i!=null&&this.seek(i,n),this.reversed(!1).paused(!1)},e.reverse=function(i,n){return i!=null&&this.seek(i||this.totalDuration(),n),this.reversed(!0).paused(!1)},e.pause=function(i,n){return i!=null&&this.seek(i,n),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(i){return arguments.length?(!!i!==this.reversed()&&this.timeScale(-this._rts||(i?-Ht:0)),this):this._rts<0},e.invalidate=function(){return this._initted=this._act=0,this._zTime=-Ht,this},e.isActive=function(){var i=this.parent||this._dp,n=this._start,a;return!!(!i||this._ts&&this._initted&&i.isActive()&&(a=i.rawTime(!0))>=n&&a<this.endTime(!0)-Ht)},e.eventCallback=function(i,n,a){var s=this.vars;return arguments.length>1?(n?(s[i]=n,a&&(s[i+"Params"]=a),i==="onUpdate"&&(this._onUpdate=n)):delete s[i],this):s[i]},e.then=function(i){var n=this;return new Promise(function(a){var s=ur(i)?i:uG,o=function(){var u=n.then;n.then=null,ur(s)&&(s=s(n))&&(s.then||s===n)&&(n.then=u),a(s),n.then=u};n._initted&&n.totalProgress()===1&&n._ts>=0||!n._tTime&&n._ts<0?o():n._prom=o})},e.kill=function(){up(this)},r}();Zn(mv.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-Ht,_prom:0,_ps:!1,_rts:1});var Pi=function(r){K7(e,r);function e(i,n){var a;return i===void 0&&(i={}),a=r.call(this,i)||this,a.labels={},a.smoothChildTiming=!!i.smoothChildTiming,a.autoRemoveChildren=!!i.autoRemoveChildren,a._sort=Yi(i.sortChildren),Qt&&qa(i.parent||Qt,Es(a),n),i.reversed&&a.reverse(),i.paused&&a.paused(!0),i.scrollTrigger&&fG(Es(a),i.scrollTrigger),a}var t=e.prototype;return t.to=function(n,a,s){return Np(0,arguments,this),this},t.from=function(n,a,s){return Np(1,arguments,this),this},t.fromTo=function(n,a,s,o){return Np(2,arguments,this),this},t.set=function(n,a,s){return a.duration=0,a.parent=this,Op(a).repeatDelay||(a.repeat=0),a.immediateRender=!!a.immediateRender,new wr(n,a,Nn(this,s),1),this},t.call=function(n,a,s){return qa(this,wr.delayedCall(0,n,a),s)},t.staggerTo=function(n,a,s,o,l,u,c){return s.duration=a,s.stagger=s.stagger||o,s.onComplete=u,s.onCompleteParams=c,s.parent=this,new wr(n,s,Nn(this,l)),this},t.staggerFrom=function(n,a,s,o,l,u,c){return s.runBackwards=1,Op(s).immediateRender=Yi(s.immediateRender),this.staggerTo(n,a,s,o,l,u,c)},t.staggerFromTo=function(n,a,s,o,l,u,c,h){return o.startAt=s,Op(o).immediateRender=Yi(o.immediateRender),this.staggerTo(n,a,o,l,u,c,h)},t.render=function(n,a,s){var o=this._time,l=this._dirty?this.totalDuration():this._tDur,u=this._dur,c=n<=0?0:Gr(n),h=this._zTime<0!=n<0&&(this._initted||!u),d,f,p,v,g,m,y,_,b,T,x,C;if(this!==Qt&&c>l&&n>=0&&(c=l),c!==this._tTime||s||h){if(o!==this._time&&u&&(c+=this._time-o,n+=this._time-o),d=c,b=this._start,_=this._ts,m=!_,h&&(u||(o=this._zTime),(n||!a)&&(this._zTime=n)),this._repeat){if(x=this._yoyo,g=u+this._rDelay,this._repeat<-1&&n<0)return this.totalTime(g*100+n,a,s);if(d=Gr(c%g),c===l?(v=this._repeat,d=u):(v=~~(c/g),v&&v===c/g&&(d=u,v--),d>u&&(d=u)),T=hf(this._tTime,g),!o&&this._tTime&&T!==v&&this._tTime-T*g-this._dur<=0&&(T=v),x&&v&1&&(d=u-d,C=1),v!==T&&!this._lock){var D=x&&T&1,I=D===(x&&v&1);if(v<T&&(D=!D),o=D?0:c%u?u:c,this._lock=1,this.render(o||(C?0:Gr(v*g)),a,!u)._lock=0,this._tTime=c,!a&&this.parent&&gn(this,"onRepeat"),this.vars.repeatRefresh&&!C&&(this.invalidate()._lock=1),o&&o!==this._time||m!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(u=this._dur,l=this._tDur,I&&(this._lock=2,o=D?u:-1e-4,this.render(o,!0),this.vars.repeatRefresh&&!C&&this.invalidate()),this._lock=0,!this._ts&&!m)return this;DG(this,C)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(y=Wse(this,Gr(o),Gr(d)),y&&(c-=d-(d=y._start))),this._tTime=c,this._time=d,this._act=!_,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=n,o=0),!o&&d&&!a&&!v&&(gn(this,"onStart"),this._tTime!==c))return this;if(d>=o&&n>=0)for(f=this._first;f;){if(p=f._next,(f._act||d>=f._start)&&f._ts&&y!==f){if(f.parent!==this)return this.render(n,a,s);if(f.render(f._ts>0?(d-f._start)*f._ts:(f._dirty?f.totalDuration():f._tDur)+(d-f._start)*f._ts,a,s),d!==this._time||!this._ts&&!m){y=0,p&&(c+=this._zTime=-Ht);break}}f=p}else{f=this._last;for(var M=n<0?n:d;f;){if(p=f._prev,(f._act||M<=f._end)&&f._ts&&y!==f){if(f.parent!==this)return this.render(n,a,s);if(f.render(f._ts>0?(M-f._start)*f._ts:(f._dirty?f.totalDuration():f._tDur)+(M-f._start)*f._ts,a,s||ui&&(f._initted||f._startAt)),d!==this._time||!this._ts&&!m){y=0,p&&(c+=this._zTime=M?-Ht:Ht);break}}f=p}}if(y&&!a&&(this.pause(),y.render(d>=o?0:-Ht)._zTime=d>=o?1:-1,this._ts))return this._start=b,d1(this),this.render(n,a,s);this._onUpdate&&!a&&gn(this,"onUpdate",!0),(c===l&&this._tTime>=this.totalDuration()||!c&&o)&&(b===this._start||Math.abs(_)!==Math.abs(this._ts))&&(this._lock||((n||!u)&&(c===l&&this._ts>0||!c&&this._ts<0)&&il(this,1),!a&&!(n<0&&!o)&&(c||o||!l)&&(gn(this,c===l&&n>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(c<l&&this.timeScale()>0)&&this._prom())))}return this},t.add=function(n,a){var s=this;if(Ks(a)||(a=Nn(this,a,n)),!(n instanceof mv)){if(ci(n))return n.forEach(function(o){return s.add(o,a)}),this;if(qr(n))return this.addLabel(n,a);if(ur(n))n=wr.delayedCall(0,n);else return this}return this!==n?qa(this,n,a):this},t.getChildren=function(n,a,s,o){n===void 0&&(n=!0),a===void 0&&(a=!0),s===void 0&&(s=!0),o===void 0&&(o=-$n);for(var l=[],u=this._first;u;)u._start>=o&&(u instanceof wr?a&&l.push(u):(s&&l.push(u),n&&l.push.apply(l,u.getChildren(!0,a,s)))),u=u._next;return l},t.getById=function(n){for(var a=this.getChildren(1,1,1),s=a.length;s--;)if(a[s].vars.id===n)return a[s]},t.remove=function(n){return qr(n)?this.removeLabel(n):ur(n)?this.killTweensOf(n):(f1(this,n),n===this._recent&&(this._recent=this._last),Uu(this))},t.totalTime=function(n,a){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=Gr(fn.time-(this._ts>0?n/this._ts:(this.totalDuration()-n)/-this._ts))),r.prototype.totalTime.call(this,n,a),this._forcing=0,this):this._tTime},t.addLabel=function(n,a){return this.labels[n]=Nn(this,a),this},t.removeLabel=function(n){return delete this.labels[n],this},t.addPause=function(n,a,s){var o=wr.delayedCall(0,a||pv,s);return o.data="isPause",this._hasPause=1,qa(this,o,Nn(this,n))},t.removePause=function(n){var a=this._first;for(n=Nn(this,n);a;)a._start===n&&a.data==="isPause"&&il(a),a=a._next},t.killTweensOf=function(n,a,s){for(var o=this.getTweensOf(n,s),l=o.length;l--;)Oo!==o[l]&&o[l].kill(n,a);return this},t.getTweensOf=function(n,a){for(var s=[],o=Wn(n),l=this._first,u=Ks(a),c;l;)l instanceof wr?Fse(l._targets,o)&&(u?(!Oo||l._initted&&l._ts)&&l.globalTime(0)<=a&&l.globalTime(l.totalDuration())>a:!a||l.isActive())&&s.push(l):(c=l.getTweensOf(o,a)).length&&s.push.apply(s,c),l=l._next;return s},t.tweenTo=function(n,a){a=a||{};var s=this,o=Nn(s,n),l=a,u=l.startAt,c=l.onStart,h=l.onStartParams,d=l.immediateRender,f,p=wr.to(s,Zn({ease:a.ease||"none",lazy:!1,immediateRender:!1,time:o,overwrite:"auto",duration:a.duration||Math.abs((o-(u&&"time"in u?u.time:s._time))/s.timeScale())||Ht,onStart:function(){if(s.pause(),!f){var g=a.duration||Math.abs((o-(u&&"time"in u?u.time:s._time))/s.timeScale());p._dur!==g&&ff(p,g,0,1).render(p._time,!0,!0),f=1}c&&c.apply(p,h||[])}},a));return d?p.render(0):p},t.tweenFromTo=function(n,a,s){return this.tweenTo(a,Zn({startAt:{time:Nn(this,n)}},s))},t.recent=function(){return this._recent},t.nextLabel=function(n){return n===void 0&&(n=this._time),AL(this,Nn(this,n))},t.previousLabel=function(n){return n===void 0&&(n=this._time),AL(this,Nn(this,n),1)},t.currentLabel=function(n){return arguments.length?this.seek(n,!0):this.previousLabel(this._time+Ht)},t.shiftChildren=function(n,a,s){s===void 0&&(s=0);for(var o=this._first,l=this.labels,u;o;)o._start>=s&&(o._start+=n,o._end+=n),o=o._next;if(a)for(u in l)l[u]>=s&&(l[u]+=n);return Uu(this)},t.invalidate=function(n){var a=this._first;for(this._lock=0;a;)a.invalidate(n),a=a._next;return r.prototype.invalidate.call(this,n)},t.clear=function(n){n===void 0&&(n=!0);for(var a=this._first,s;a;)s=a._next,this.remove(a),a=s;return this._dp&&(this._time=this._tTime=this._pTime=0),n&&(this.labels={}),Uu(this)},t.totalDuration=function(n){var a=0,s=this,o=s._last,l=$n,u,c,h;if(arguments.length)return s.timeScale((s._repeat<0?s.duration():s.totalDuration())/(s.reversed()?-n:n));if(s._dirty){for(h=s.parent;o;)u=o._prev,o._dirty&&o.totalDuration(),c=o._start,c>l&&s._sort&&o._ts&&!s._lock?(s._lock=1,qa(s,o,c-o._delay,1)._lock=0):l=c,c<0&&o._ts&&(a-=c,(!h&&!s._dp||h&&h.smoothChildTiming)&&(s._start+=c/s._ts,s._time-=c,s._tTime-=c),s.shiftChildren(-c,!1,-1/0),l=0),o._end>a&&o._ts&&(a=o._end),o=u;ff(s,s===Qt&&s._time>a?s._time:a,1,1),s._dirty=0}return s._tDur},e.updateRoot=function(n){if(Qt._ts&&(oG(Qt,M0(n,Qt)),aG=fn.frame),fn.frame>=TL){TL+=bn.autoSleep||120;var a=Qt._first;if((!a||!a._ts)&&bn.autoSleep&&fn._listeners.length<2){for(;a&&!a._ts;)a=a._next;a||fn.sleep()}}},e}(mv);Zn(Pi.prototype,{_lock:0,_hasPause:0,_forcing:0});var ooe=function(e,t,i,n,a,s,o){var l=new Zi(this._pt,e,t,0,1,OG,null,a),u=0,c=0,h,d,f,p,v,g,m,y;for(l.b=i,l.e=n,i+="",n+="",(m=~n.indexOf("random("))&&(n=vv(n)),s&&(y=[i,n],s(y,e,t),i=y[0],n=y[1]),d=i.match(eS)||[];h=eS.exec(n);)p=h[0],v=n.substring(u,h.index),f?f=(f+1)%5:v.substr(-5)==="rgba("&&(f=1),p!==d[c++]&&(g=parseFloat(d[c-1])||0,l._pt={_next:l._pt,p:v||c===1?v:",",s:g,c:p.charAt(1)==="="?Oh(g,p)-g:parseFloat(p)-g,m:f&&f<4?Math.round:0},u=eS.lastIndex);return l.c=u<n.length?n.substring(u,n.length):"",l.fp=o,(eG.test(n)||m)&&(l.e=0),this._pt=l,l},YA=function(e,t,i,n,a,s,o,l,u,c){ur(n)&&(n=n(a||0,e,s));var h=e[t],d=i!=="get"?i:ur(h)?u?e[t.indexOf("set")||!ur(e["get"+t.substr(3)])?t:"get"+t.substr(3)](u):e[t]():h,f=ur(h)?u?foe:kG:ZA,p;if(qr(n)&&(~n.indexOf("random(")&&(n=vv(n)),n.charAt(1)==="="&&(p=Oh(d,n)+(si(d)||0),(p||p===0)&&(n=p))),!c||d!==n||Pw)return!isNaN(d*n)&&n!==""?(p=new Zi(this._pt,e,t,+d||0,n-(d||0),typeof h=="boolean"?poe:RG,0,f),u&&(p.fp=u),o&&p.modifier(o,this,e),this._pt=p):(!h&&!(t in e)&&WA(t,n),ooe.call(this,e,t,d,n,f,l||bn.stringFilter,u))},loe=function(e,t,i,n,a){if(ur(e)&&(e=Bp(e,a,t,i,n)),!ds(e)||e.style&&e.nodeType||ci(e)||Q7(e))return qr(e)?Bp(e,a,t,i,n):e;var s={},o;for(o in e)s[o]=Bp(e[o],a,t,i,n);return s},PG=function(e,t,i,n,a,s){var o,l,u,c;if(cn[e]&&(o=new cn[e]).init(a,o.rawVars?t[e]:loe(t[e],n,a,s,i),i,n,s)!==!1&&(i._pt=l=new Zi(i._pt,a,e,0,1,o.render,o,0,o.priority),i!==xh))for(u=i._ptLookup[i._targets.indexOf(a)],c=o._props.length;c--;)u[o._props[c]]=l;return o},Oo,Pw,KA=function r(e,t,i){var n=e.vars,a=n.ease,s=n.startAt,o=n.immediateRender,l=n.lazy,u=n.onUpdate,c=n.runBackwards,h=n.yoyoEase,d=n.keyframes,f=n.autoRevert,p=e._dur,v=e._startAt,g=e._targets,m=e.parent,y=m&&m.data==="nested"?m.vars.targets:g,_=e._overwrite==="auto"&&!zA,b=e.timeline,T,x,C,D,I,M,L,N,O,B,F,U,$;if(b&&(!d||!a)&&(a="none"),e._ease=Vu(a,cf.ease),e._yEase=h?AG(Vu(h===!0?a:h,cf.ease)):0,h&&e._yoyo&&!e._repeat&&(h=e._yEase,e._yEase=e._ease,e._ease=h),e._from=!b&&!!n.runBackwards,!b||d&&!n.stagger){if(N=g[0]?Fu(g[0]).harness:0,U=N&&n[N.prop],T=P0(n,qA),v&&(v._zTime<0&&v.progress(1),t<0&&c&&o&&!f?v.render(-1,!0):v.revert(c&&p?Ay:Nse),v._lazy=0),s){if(il(e._startAt=wr.set(g,Zn({data:"isStart",overwrite:!1,parent:m,immediateRender:!0,lazy:!v&&Yi(l),startAt:null,delay:0,onUpdate:u&&function(){return gn(e,"onUpdate")},stagger:0},s))),e._startAt._dp=0,e._startAt._sat=e,t<0&&(ui||!o&&!f)&&e._startAt.revert(Ay),o&&p&&t<=0&&i<=0){t&&(e._zTime=t);return}}else if(c&&p&&!v){if(t&&(o=!1),C=Zn({overwrite:!1,data:"isFromStart",lazy:o&&!v&&Yi(l),immediateRender:o,stagger:0,parent:m},T),U&&(C[N.prop]=U),il(e._startAt=wr.set(g,C)),e._startAt._dp=0,e._startAt._sat=e,t<0&&(ui?e._startAt.revert(Ay):e._startAt.render(-1,!0)),e._zTime=t,!o)r(e._startAt,Ht,Ht);else if(!t)return}for(e._pt=e._ptCache=0,l=p&&Yi(l)||l&&!p,x=0;x<g.length;x++){if(I=g[x],L=I._gsap||XA(g)[x]._gsap,e._ptLookup[x]=B={},ww[L.id]&&qo.length&&I0(),F=y===g?x:y.indexOf(I),N&&(O=new N).init(I,U||T,e,F,y)!==!1&&(e._pt=D=new Zi(e._pt,I,O.name,0,1,O.render,O,0,O.priority),O._props.forEach(function(q){B[q]=D}),O.priority&&(M=1)),!N||U)for(C in T)cn[C]&&(O=PG(C,T,e,F,I,y))?O.priority&&(M=1):B[C]=D=YA.call(e,I,C,"get",T[C],F,y,0,n.stringFilter);e._op&&e._op[x]&&e.kill(I,e._op[x]),_&&e._pt&&(Oo=e,Qt.killTweensOf(I,B,e.globalTime(t)),$=!e.parent,Oo=0),e._pt&&l&&(ww[L.id]=1)}M&&NG(e),e._onInit&&e._onInit(e)}e._onUpdate=u,e._initted=(!e._op||e._pt)&&!$,d&&t<=0&&b.render($n,!0,!0)},uoe=function(e,t,i,n,a,s,o,l){var u=(e._pt&&e._ptCache||(e._ptCache={}))[t],c,h,d,f;if(!u)for(u=e._ptCache[t]=[],d=e._ptLookup,f=e._targets.length;f--;){if(c=d[f][t],c&&c.d&&c.d._pt)for(c=c.d._pt;c&&c.p!==t&&c.fp!==t;)c=c._next;if(!c)return Pw=1,e.vars[t]="+=0",KA(e,o),Pw=0,l?dv(t+" not eligible for reset"):1;u.push(c)}for(f=u.length;f--;)h=u[f],c=h._pt||h,c.s=(n||n===0)&&!a?n:c.s+(n||0)+s*c.c,c.c=i-c.s,h.e&&(h.e=mr(i)+si(h.e)),h.b&&(h.b=c.s+si(h.b))},coe=function(e,t){var i=e[0]?Fu(e[0]).harness:0,n=i&&i.aliases,a,s,o,l;if(!n)return t;a=ec({},t);for(s in n)if(s in a)for(l=n[s].split(","),o=l.length;o--;)a[l[o]]=a[s];return a},hoe=function(e,t,i,n){var a=t.ease||n||"power1.inOut",s,o;if(ci(t))o=i[e]||(i[e]=[]),t.forEach(function(l,u){return o.push({t:u/(t.length-1)*100,v:l,e:a})});else for(s in t)o=i[s]||(i[s]=[]),s==="ease"||o.push({t:parseFloat(e),v:t[s],e:a})},Bp=function(e,t,i,n,a){return ur(e)?e.call(t,i,n,a):qr(e)&&~e.indexOf("random(")?vv(e):e},MG=jA+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",LG={};Ki(MG+",id,stagger,delay,duration,paused,scrollTrigger",function(r){return LG[r]=1});var wr=function(r){K7(e,r);function e(i,n,a,s){var o;typeof n=="number"&&(a.duration=n,n=a,a=null),o=r.call(this,s?n:Op(n))||this;var l=o.vars,u=l.duration,c=l.delay,h=l.immediateRender,d=l.stagger,f=l.overwrite,p=l.keyframes,v=l.defaults,g=l.scrollTrigger,m=l.yoyoEase,y=n.parent||Qt,_=(ci(i)||Q7(i)?Ks(i[0]):"length"in n)?[i]:Wn(i),b,T,x,C,D,I,M,L;if(o._targets=_.length?XA(_):dv("GSAP target "+i+" not found. https://gsap.com",!bn.nullTargetWarn)||[],o._ptLookup=[],o._overwrite=f,p||d||vm(u)||vm(c)){if(n=o.vars,b=o.timeline=new Pi({data:"nested",defaults:v||{},targets:y&&y.data==="nested"?y.vars.targets:_}),b.kill(),b.parent=b._dp=Es(o),b._start=0,d||vm(u)||vm(c)){if(C=_.length,M=d&&gG(d),ds(d))for(D in d)~MG.indexOf(D)&&(L||(L={}),L[D]=d[D]);for(T=0;T<C;T++)x=P0(n,LG),x.stagger=0,m&&(x.yoyoEase=m),L&&ec(x,L),I=_[T],x.duration=+Bp(u,Es(o),T,I,_),x.delay=(+Bp(c,Es(o),T,I,_)||0)-o._delay,!d&&C===1&&x.delay&&(o._delay=c=x.delay,o._start+=c,x.delay=0),b.to(I,x,M?M(T,I,_):0),b._ease=bt.none;b.duration()?u=c=0:o.timeline=0}else if(p){Op(Zn(b.vars.defaults,{ease:"none"})),b._ease=Vu(p.ease||n.ease||"none");var N=0,O,B,F;if(ci(p))p.forEach(function(U){return b.to(_,U,">")}),b.duration();else{x={};for(D in p)D==="ease"||D==="easeEach"||hoe(D,p[D],x,p.easeEach);for(D in x)for(O=x[D].sort(function(U,$){return U.t-$.t}),N=0,T=0;T<O.length;T++)B=O[T],F={ease:B.e,duration:(B.t-(T?O[T-1].t:0))/100*u},F[D]=B.v,b.to(_,F,N),N+=F.duration;b.duration()<u&&b.to({},{duration:u-b.duration()})}}u||o.duration(u=b.duration())}else o.timeline=0;return f===!0&&!zA&&(Oo=Es(o),Qt.killTweensOf(_),Oo=0),qa(y,Es(o),a),n.reversed&&o.reverse(),n.paused&&o.paused(!0),(h||!u&&!p&&o._start===Gr(y._time)&&Yi(h)&&Gse(Es(o))&&y.data!=="nested")&&(o._tTime=-Ht,o.render(Math.max(0,-c)||0)),g&&fG(Es(o),g),o}var t=e.prototype;return t.render=function(n,a,s){var o=this._time,l=this._tDur,u=this._dur,c=n<0,h=n>l-Ht&&!c?l:n<Ht?0:n,d,f,p,v,g,m,y,_,b;if(!u)$se(this,n,a,s);else if(h!==this._tTime||!n||s||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==c){if(d=h,_=this.timeline,this._repeat){if(v=u+this._rDelay,this._repeat<-1&&c)return this.totalTime(v*100+n,a,s);if(d=Gr(h%v),h===l?(p=this._repeat,d=u):(p=~~(h/v),p&&p===Gr(h/v)&&(d=u,p--),d>u&&(d=u)),m=this._yoyo&&p&1,m&&(b=this._yEase,d=u-d),g=hf(this._tTime,v),d===o&&!s&&this._initted&&p===g)return this._tTime=h,this;p!==g&&(_&&this._yEase&&DG(_,m),this.vars.repeatRefresh&&!m&&!this._lock&&this._time!==v&&this._initted&&(this._lock=s=1,this.render(Gr(v*p),!0).invalidate()._lock=0))}if(!this._initted){if(dG(this,c?n:d,s,a,h))return this._tTime=0,this;if(o!==this._time&&!(s&&this.vars.repeatRefresh&&p!==g))return this;if(u!==this._dur)return this.render(n,a,s)}if(this._tTime=h,this._time=d,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=y=(b||this._ease)(d/u),this._from&&(this.ratio=y=1-y),d&&!o&&!a&&!p&&(gn(this,"onStart"),this._tTime!==h))return this;for(f=this._pt;f;)f.r(y,f.d),f=f._next;_&&_.render(n<0?n:_._dur*_._ease(d/this._dur),a,s)||this._startAt&&(this._zTime=n),this._onUpdate&&!a&&(c&&Cw(this,n,a,s),gn(this,"onUpdate")),this._repeat&&p!==g&&this.vars.onRepeat&&!a&&this.parent&&gn(this,"onRepeat"),(h===this._tDur||!h)&&this._tTime===h&&(c&&!this._onUpdate&&Cw(this,n,!0,!0),(n||!u)&&(h===this._tDur&&this._ts>0||!h&&this._ts<0)&&il(this,1),!a&&!(c&&!o)&&(h||o||m)&&(gn(this,h===l?"onComplete":"onReverseComplete",!0),this._prom&&!(h<l&&this.timeScale()>0)&&this._prom()))}return this},t.targets=function(){return this._targets},t.invalidate=function(n){return(!n||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(n),r.prototype.invalidate.call(this,n)},t.resetTo=function(n,a,s,o,l){gv||fn.wake(),this._ts||this.play();var u=Math.min(this._dur,(this._dp._time-this._start)*this._ts),c;return this._initted||KA(this,u),c=this._ease(u/this._dur),uoe(this,n,a,s,o,c,u,l)?this.resetTo(n,a,s,o,1):(p1(this,0),this.parent||cG(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},t.kill=function(n,a){if(a===void 0&&(a="all"),!n&&(!a||a==="all"))return this._lazy=this._pt=0,this.parent?up(this):this;if(this.timeline){var s=this.timeline.totalDuration();return this.timeline.killTweensOf(n,a,Oo&&Oo.vars.overwrite!==!0)._first||up(this),this.parent&&s!==this.timeline.totalDuration()&&ff(this,this._dur*this.timeline._tDur/s,0,1),this}var o=this._targets,l=n?Wn(n):o,u=this._ptLookup,c=this._pt,h,d,f,p,v,g,m;if((!a||a==="all")&&Vse(o,l))return a==="all"&&(this._pt=0),up(this);for(h=this._op=this._op||[],a!=="all"&&(qr(a)&&(v={},Ki(a,function(y){return v[y]=1}),a=v),a=coe(o,a)),m=o.length;m--;)if(~l.indexOf(o[m])){d=u[m],a==="all"?(h[m]=a,p=d,f={}):(f=h[m]=h[m]||{},p=a);for(v in p)g=d&&d[v],g&&((!("kill"in g.d)||g.d.kill(v)===!0)&&f1(this,g,"_pt"),delete d[v]),f!=="all"&&(f[v]=1)}return this._initted&&!this._pt&&c&&up(this),this},e.to=function(n,a){return new e(n,a,arguments[2])},e.from=function(n,a){return Np(1,arguments)},e.delayedCall=function(n,a,s,o){return new e(a,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:n,onComplete:a,onReverseComplete:a,onCompleteParams:s,onReverseCompleteParams:s,callbackScope:o})},e.fromTo=function(n,a,s){return Np(2,arguments)},e.set=function(n,a){return a.duration=0,a.repeatDelay||(a.repeat=0),new e(n,a)},e.killTweensOf=function(n,a,s){return Qt.killTweensOf(n,a,s)},e}(mv);Zn(wr.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0});Ki("staggerTo,staggerFrom,staggerFromTo",function(r){wr[r]=function(){var e=new Pi,t=Dw.call(arguments,0);return t.splice(r==="staggerFromTo"?5:4,0,0),e[r].apply(e,t)}});var ZA=function(e,t,i){return e[t]=i},kG=function(e,t,i){return e[t](i)},foe=function(e,t,i,n){return e[t](n.fp,i)},doe=function(e,t,i){return e.setAttribute(t,i)},QA=function(e,t){return ur(e[t])?kG:GA(e[t])&&e.setAttribute?doe:ZA},RG=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e6)/1e6,t)},poe=function(e,t){return t.set(t.t,t.p,!!(t.s+t.c*e),t)},OG=function(e,t){var i=t._pt,n="";if(!e&&t.b)n=t.b;else if(e===1&&t.e)n=t.e;else{for(;i;)n=i.p+(i.m?i.m(i.s+i.c*e):Math.round((i.s+i.c*e)*1e4)/1e4)+n,i=i._next;n+=t.c}t.set(t.t,t.p,n,t)},JA=function(e,t){for(var i=t._pt;i;)i.r(e,i.d),i=i._next},voe=function(e,t,i,n){for(var a=this._pt,s;a;)s=a._next,a.p===n&&a.modifier(e,t,i),a=s},goe=function(e){for(var t=this._pt,i,n;t;)n=t._next,t.p===e&&!t.op||t.op===e?f1(this,t,"_pt"):t.dep||(i=1),t=n;return!i},moe=function(e,t,i,n){n.mSet(e,t,n.m.call(n.tween,i,n.mt),n)},NG=function(e){for(var t=e._pt,i,n,a,s;t;){for(i=t._next,n=a;n&&n.pr>t.pr;)n=n._next;(t._prev=n?n._prev:s)?t._prev._next=t:a=t,(t._next=n)?n._prev=t:s=t,t=i}e._pt=a},Zi=function(){function r(t,i,n,a,s,o,l,u,c){this.t=i,this.s=a,this.c=s,this.p=n,this.r=o||RG,this.d=l||this,this.set=u||ZA,this.pr=c||0,this._next=t,t&&(t._prev=this)}var e=r.prototype;return e.modifier=function(i,n,a){this.mSet=this.mSet||this.set,this.set=moe,this.m=i,this.mt=a,this.tween=n},r}();Ki(jA+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",function(r){return qA[r]=1});wn.TweenMax=wn.TweenLite=wr;wn.TimelineLite=wn.TimelineMax=Pi;Qt=new Pi({sortChildren:!1,defaults:cf,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0});bn.stringFilter=CG;var zu=[],Ey={},yoe=[],EL=0,_oe=0,aS=function(e){return(Ey[e]||yoe).map(function(t){return t()})},Mw=function(){var e=Date.now(),t=[];e-EL>2&&(aS("matchMediaInit"),zu.forEach(function(i){var n=i.queries,a=i.conditions,s,o,l,u;for(o in n)s=Ha.matchMedia(n[o]).matches,s&&(l=1),s!==a[o]&&(a[o]=s,u=1);u&&(i.revert(),l&&t.push(i))}),aS("matchMediaRevert"),t.forEach(function(i){return i.onMatch(i,function(n){return i.add(null,n)})}),EL=e,aS("matchMedia"))},BG=function(){function r(t,i){this.selector=i&&Ew(i),this.data=[],this._r=[],this.isReverted=!1,this.id=_oe++,t&&this.add(t)}var e=r.prototype;return e.add=function(i,n,a){ur(i)&&(a=n,n=i,i=ur);var s=this,o=function(){var u=Xt,c=s.selector,h;return u&&u!==s&&u.data.push(s),a&&(s.selector=Ew(a)),Xt=s,h=n.apply(s,arguments),ur(h)&&s._r.push(h),Xt=u,s.selector=c,s.isReverted=!1,h};return s.last=o,i===ur?o(s,function(l){return s.add(null,l)}):i?s[i]=o:o},e.ignore=function(i){var n=Xt;Xt=null,i(this),Xt=n},e.getTweens=function(){var i=[];return this.data.forEach(function(n){return n instanceof r?i.push.apply(i,n.getTweens()):n instanceof wr&&!(n.parent&&n.parent.data==="nested")&&i.push(n)}),i},e.clear=function(){this._r.length=this.data.length=0},e.kill=function(i,n){var a=this;if(i?function(){for(var o=a.getTweens(),l=a.data.length,u;l--;)u=a.data[l],u.data==="isFlip"&&(u.revert(),u.getChildren(!0,!0,!1).forEach(function(c){return o.splice(o.indexOf(c),1)}));for(o.map(function(c){return{g:c._dur||c._delay||c._sat&&!c._sat.vars.immediateRender?c.globalTime(0):-1/0,t:c}}).sort(function(c,h){return h.g-c.g||-1/0}).forEach(function(c){return c.t.revert(i)}),l=a.data.length;l--;)u=a.data[l],u instanceof Pi?u.data!=="nested"&&(u.scrollTrigger&&u.scrollTrigger.revert(),u.kill()):!(u instanceof wr)&&u.revert&&u.revert(i);a._r.forEach(function(c){return c(i,a)}),a.isReverted=!0}():this.data.forEach(function(o){return o.kill&&o.kill()}),this.clear(),n)for(var s=zu.length;s--;)zu[s].id===this.id&&zu.splice(s,1)},e.revert=function(i){this.kill(i||{})},r}(),boe=function(){function r(t){this.contexts=[],this.scope=t,Xt&&Xt.data.push(this)}var e=r.prototype;return e.add=function(i,n,a){ds(i)||(i={matches:i});var s=new BG(0,a||this.scope),o=s.conditions={},l,u,c;Xt&&!s.selector&&(s.selector=Xt.selector),this.contexts.push(s),n=s.add("onMatch",n),s.queries=i;for(u in i)u==="all"?c=1:(l=Ha.matchMedia(i[u]),l&&(zu.indexOf(s)<0&&zu.push(s),(o[u]=l.matches)&&(c=1),l.addListener?l.addListener(Mw):l.addEventListener("change",Mw)));return c&&n(s,function(h){return s.add(null,h)}),this},e.revert=function(i){this.kill(i||{})},e.kill=function(i){this.contexts.forEach(function(n){return n.kill(i,!0)})},r}(),L0={registerPlugin:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];t.forEach(function(n){return TG(n)})},timeline:function(e){return new Pi(e)},getTweensOf:function(e,t){return Qt.getTweensOf(e,t)},getProperty:function(e,t,i,n){qr(e)&&(e=Wn(e)[0]);var a=Fu(e||{}).get,s=i?uG:lG;return i==="native"&&(i=""),e&&(t?s((cn[t]&&cn[t].get||a)(e,t,i,n)):function(o,l,u){return s((cn[o]&&cn[o].get||a)(e,o,l,u))})},quickSetter:function(e,t,i){if(e=Wn(e),e.length>1){var n=e.map(function(c){return en.quickSetter(c,t,i)}),a=n.length;return function(c){for(var h=a;h--;)n[h](c)}}e=e[0]||{};var s=cn[t],o=Fu(e),l=o.harness&&(o.harness.aliases||{})[t]||t,u=s?function(c){var h=new s;xh._pt=0,h.init(e,i?c+i:c,xh,0,[e]),h.render(1,h),xh._pt&&JA(1,xh)}:o.set(e,l);return s?u:function(c){return u(e,l,i?c+i:c,o,1)}},quickTo:function(e,t,i){var n,a=en.to(e,ec((n={},n[t]="+=0.1",n.paused=!0,n),i||{})),s=function(l,u,c){return a.resetTo(t,l,u,c)};return s.tween=a,s},isTweening:function(e){return Qt.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=Vu(e.ease,cf.ease)),xL(cf,e||{})},config:function(e){return xL(bn,e||{})},registerEffect:function(e){var t=e.name,i=e.effect,n=e.plugins,a=e.defaults,s=e.extendTimeline;(n||"").split(",").forEach(function(o){return o&&!cn[o]&&!wn[o]&&dv(t+" effect requires "+o+" plugin.")}),tS[t]=function(o,l,u){return i(Wn(o),Zn(l||{},a),u)},s&&(Pi.prototype[t]=function(o,l,u){return this.add(tS[t](o,ds(l)?l:(u=l)&&{},this),u)})},registerEase:function(e,t){bt[e]=Vu(t)},parseEase:function(e,t){return arguments.length?Vu(e,t):bt},getById:function(e){return Qt.getById(e)},exportRoot:function(e,t){e===void 0&&(e={});var i=new Pi(e),n,a;for(i.smoothChildTiming=Yi(e.smoothChildTiming),Qt.remove(i),i._dp=0,i._time=i._tTime=Qt._time,n=Qt._first;n;)a=n._next,(t||!(!n._dur&&n instanceof wr&&n.vars.onComplete===n._targets[0]))&&qa(i,n,n._start-n._delay),n=a;return qa(Qt,i,0),i},context:function(e,t){return e?new BG(e,t):Xt},matchMedia:function(e){return new boe(e)},matchMediaRefresh:function(){return zu.forEach(function(e){var t=e.conditions,i,n;for(n in t)t[n]&&(t[n]=!1,i=1);i&&e.revert()})||Mw()},addEventListener:function(e,t){var i=Ey[e]||(Ey[e]=[]);~i.indexOf(t)||i.push(t)},removeEventListener:function(e,t){var i=Ey[e],n=i&&i.indexOf(t);n>=0&&i.splice(n,1)},utils:{wrap:Qse,wrapYoyo:Jse,distribute:gG,random:yG,snap:mG,normalize:Zse,getUnit:si,clamp:jse,splitColor:xG,toArray:Wn,selector:Ew,mapRange:bG,pipe:Yse,unitize:Kse,interpolate:eoe,shuffle:vG},install:iG,effects:tS,ticker:fn,updateRoot:Pi.updateRoot,plugins:cn,globalTimeline:Qt,core:{PropTween:Zi,globals:nG,Tween:wr,Timeline:Pi,Animation:mv,getCache:Fu,_removeLinkedListItem:f1,reverting:function(){return ui},context:function(e){return e&&Xt&&(Xt.data.push(e),e._ctx=Xt),Xt},suppressOverwrites:function(e){return zA=e}}};Ki("to,from,fromTo,delayedCall,set,killTweensOf",function(r){return L0[r]=wr[r]});fn.add(Pi.updateRoot);xh=L0.to({},{duration:0});var Soe=function(e,t){for(var i=e._pt;i&&i.p!==t&&i.op!==t&&i.fp!==t;)i=i._next;return i},Toe=function(e,t){var i=e._targets,n,a,s;for(n in t)for(a=i.length;a--;)s=e._ptLookup[a][n],s&&(s=s.d)&&(s._pt&&(s=Soe(s,n)),s&&s.modifier&&s.modifier(t[n],e,i[a],n))},sS=function(e,t){return{name:e,rawVars:1,init:function(n,a,s){s._onInit=function(o){var l,u;if(qr(a)&&(l={},Ki(a,function(c){return l[c]=1}),a=l),t){l={};for(u in a)l[u]=t(a[u]);a=l}Toe(o,a)}}}},en=L0.registerPlugin({name:"attr",init:function(e,t,i,n,a){var s,o,l;this.tween=i;for(s in t)l=e.getAttribute(s)||"",o=this.add(e,"setAttribute",(l||0)+"",t[s],n,a,0,0,s),o.op=s,o.b=l,this._props.push(s)},render:function(e,t){for(var i=t._pt;i;)ui?i.set(i.t,i.p,i.b,i):i.r(e,i.d),i=i._next}},{name:"endArray",init:function(e,t){for(var i=t.length;i--;)this.add(e,i,e[i]||0,t[i],0,0,0,0,0,1)}},sS("roundProps",Iw),sS("modifiers"),sS("snap",mG))||L0;wr.version=Pi.version=en.version="3.12.5";rG=1;HA()&&df();bt.Power0;bt.Power1;bt.Power2;bt.Power3;bt.Power4;bt.Linear;bt.Quad;bt.Cubic;bt.Quart;bt.Quint;bt.Strong;bt.Elastic;bt.Back;bt.SteppedEase;bt.Bounce;bt.Sine;bt.Expo;bt.Circ;/*!
|
||
* CSSPlugin 3.12.5
|
||
* https://gsap.com
|
||
*
|
||
* Copyright 2008-2024, GreenSock. All rights reserved.
|
||
* Subject to the terms at https://gsap.com/standard-license or for
|
||
* Club GSAP members, the agreement issued with that membership.
|
||
* @author: Jack Doyle, jack@greensock.com
|
||
*/var IL,No,Nh,eD,Tu,PL,tD,xoe=function(){return typeof window<"u"},Zs={},au=180/Math.PI,Bh=Math.PI/180,Uc=Math.atan2,ML=1e8,rD=/([A-Z])/g,woe=/(left|right|width|margin|padding|x)/i,Coe=/[\s,\(]\S/,Ja={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},Lw=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},Aoe=function(e,t){return t.set(t.t,t.p,e===1?t.e:Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},Doe=function(e,t){return t.set(t.t,t.p,e?Math.round((t.s+t.c*e)*1e4)/1e4+t.u:t.b,t)},Eoe=function(e,t){var i=t.s+t.c*e;t.set(t.t,t.p,~~(i+(i<0?-.5:.5))+t.u,t)},FG=function(e,t){return t.set(t.t,t.p,e?t.e:t.b,t)},UG=function(e,t){return t.set(t.t,t.p,e!==1?t.b:t.e,t)},Ioe=function(e,t,i){return e.style[t]=i},Poe=function(e,t,i){return e.style.setProperty(t,i)},Moe=function(e,t,i){return e._gsap[t]=i},Loe=function(e,t,i){return e._gsap.scaleX=e._gsap.scaleY=i},koe=function(e,t,i,n,a){var s=e._gsap;s.scaleX=s.scaleY=i,s.renderTransform(a,s)},Roe=function(e,t,i,n,a){var s=e._gsap;s[t]=i,s.renderTransform(a,s)},Jt="transform",Qi=Jt+"Origin",Ooe=function r(e,t){var i=this,n=this.target,a=n.style,s=n._gsap;if(e in Zs&&a){if(this.tfm=this.tfm||{},e!=="transform")e=Ja[e]||e,~e.indexOf(",")?e.split(",").forEach(function(o){return i.tfm[o]=Ms(n,o)}):this.tfm[e]=s.x?s[e]:Ms(n,e),e===Qi&&(this.tfm.zOrigin=s.zOrigin);else return Ja.transform.split(",").forEach(function(o){return r.call(i,o,t)});if(this.props.indexOf(Jt)>=0)return;s.svg&&(this.svgo=n.getAttribute("data-svg-origin"),this.props.push(Qi,t,"")),e=Jt}(a||t)&&this.props.push(e,t,a[e])},VG=function(e){e.translate&&(e.removeProperty("translate"),e.removeProperty("scale"),e.removeProperty("rotate"))},Noe=function(){var e=this.props,t=this.target,i=t.style,n=t._gsap,a,s;for(a=0;a<e.length;a+=3)e[a+1]?t[e[a]]=e[a+2]:e[a+2]?i[e[a]]=e[a+2]:i.removeProperty(e[a].substr(0,2)==="--"?e[a]:e[a].replace(rD,"-$1").toLowerCase());if(this.tfm){for(s in this.tfm)n[s]=this.tfm[s];n.svg&&(n.renderTransform(),t.setAttribute("data-svg-origin",this.svgo||"")),a=tD(),(!a||!a.isStart)&&!i[Jt]&&(VG(i),n.zOrigin&&i[Qi]&&(i[Qi]+=" "+n.zOrigin+"px",n.zOrigin=0,n.renderTransform()),n.uncache=1)}},zG=function(e,t){var i={target:e,props:[],revert:Noe,save:Ooe};return e._gsap||en.core.getCache(e),t&&t.split(",").forEach(function(n){return i.save(n)}),i},GG,kw=function(e,t){var i=No.createElementNS?No.createElementNS((t||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),e):No.createElement(e);return i&&i.style?i:No.createElement(e)},as=function r(e,t,i){var n=getComputedStyle(e);return n[t]||n.getPropertyValue(t.replace(rD,"-$1").toLowerCase())||n.getPropertyValue(t)||!i&&r(e,pf(t)||t,1)||""},LL="O,Moz,ms,Ms,Webkit".split(","),pf=function(e,t,i){var n=t||Tu,a=n.style,s=5;if(e in a&&!i)return e;for(e=e.charAt(0).toUpperCase()+e.substr(1);s--&&!(LL[s]+e in a););return s<0?null:(s===3?"ms":s>=0?LL[s]:"")+e},Rw=function(){xoe()&&window.document&&(IL=window,No=IL.document,Nh=No.documentElement,Tu=kw("div")||{style:{}},kw("div"),Jt=pf(Jt),Qi=Jt+"Origin",Tu.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",GG=!!pf("perspective"),tD=en.core.reverting,eD=1)},oS=function r(e){var t=kw("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),i=this.parentNode,n=this.nextSibling,a=this.style.cssText,s;if(Nh.appendChild(t),t.appendChild(this),this.style.display="block",e)try{s=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=r}catch{}else this._gsapBBox&&(s=this._gsapBBox());return i&&(n?i.insertBefore(this,n):i.appendChild(this)),Nh.removeChild(t),this.style.cssText=a,s},kL=function(e,t){for(var i=t.length;i--;)if(e.hasAttribute(t[i]))return e.getAttribute(t[i])},HG=function(e){var t;try{t=e.getBBox()}catch{t=oS.call(e,!0)}return t&&(t.width||t.height)||e.getBBox===oS||(t=oS.call(e,!0)),t&&!t.width&&!t.x&&!t.y?{x:+kL(e,["x","cx","x1"])||0,y:+kL(e,["y","cy","y1"])||0,width:0,height:0}:t},$G=function(e){return!!(e.getCTM&&(!e.parentNode||e.ownerSVGElement)&&HG(e))},tc=function(e,t){if(t){var i=e.style,n;t in Zs&&t!==Qi&&(t=Jt),i.removeProperty?(n=t.substr(0,2),(n==="ms"||t.substr(0,6)==="webkit")&&(t="-"+t),i.removeProperty(n==="--"?t:t.replace(rD,"-$1").toLowerCase())):i.removeAttribute(t)}},Bo=function(e,t,i,n,a,s){var o=new Zi(e._pt,t,i,0,1,s?UG:FG);return e._pt=o,o.b=n,o.e=a,e._props.push(i),o},RL={deg:1,rad:1,turn:1},Boe={grid:1,flex:1},nl=function r(e,t,i,n){var a=parseFloat(i)||0,s=(i+"").trim().substr((a+"").length)||"px",o=Tu.style,l=woe.test(t),u=e.tagName.toLowerCase()==="svg",c=(u?"client":"offset")+(l?"Width":"Height"),h=100,d=n==="px",f=n==="%",p,v,g,m;if(n===s||!a||RL[n]||RL[s])return a;if(s!=="px"&&!d&&(a=r(e,t,i,"px")),m=e.getCTM&&$G(e),(f||s==="%")&&(Zs[t]||~t.indexOf("adius")))return p=m?e.getBBox()[l?"width":"height"]:e[c],mr(f?a/p*h:a/100*p);if(o[l?"width":"height"]=h+(d?s:n),v=~t.indexOf("adius")||n==="em"&&e.appendChild&&!u?e:e.parentNode,m&&(v=(e.ownerSVGElement||{}).parentNode),(!v||v===No||!v.appendChild)&&(v=No.body),g=v._gsap,g&&f&&g.width&&l&&g.time===fn.time&&!g.uncache)return mr(a/g.width*h);if(f&&(t==="height"||t==="width")){var y=e.style[t];e.style[t]=h+n,p=e[c],y?e.style[t]=y:tc(e,t)}else(f||s==="%")&&!Boe[as(v,"display")]&&(o.position=as(e,"position")),v===e&&(o.position="static"),v.appendChild(Tu),p=Tu[c],v.removeChild(Tu),o.position="absolute";return l&&f&&(g=Fu(v),g.time=fn.time,g.width=v[c]),mr(d?p*a/h:p&&a?h/p*a:0)},Ms=function(e,t,i,n){var a;return eD||Rw(),t in Ja&&t!=="transform"&&(t=Ja[t],~t.indexOf(",")&&(t=t.split(",")[0])),Zs[t]&&t!=="transform"?(a=_v(e,n),a=t!=="transformOrigin"?a[t]:a.svg?a.origin:R0(as(e,Qi))+" "+a.zOrigin+"px"):(a=e.style[t],(!a||a==="auto"||n||~(a+"").indexOf("calc("))&&(a=k0[t]&&k0[t](e,t,i)||as(e,t)||sG(e,t)||(t==="opacity"?1:0))),i&&!~(a+"").trim().indexOf(" ")?nl(e,t,a,i)+i:a},Foe=function(e,t,i,n){if(!i||i==="none"){var a=pf(t,e,1),s=a&&as(e,a,1);s&&s!==i?(t=a,i=s):t==="borderColor"&&(i=as(e,"borderTopColor"))}var o=new Zi(this._pt,e.style,t,0,1,OG),l=0,u=0,c,h,d,f,p,v,g,m,y,_,b,T;if(o.b=i,o.e=n,i+="",n+="",n==="auto"&&(v=e.style[t],e.style[t]=n,n=as(e,t)||n,v?e.style[t]=v:tc(e,t)),c=[i,n],CG(c),i=c[0],n=c[1],d=i.match(Th)||[],T=n.match(Th)||[],T.length){for(;h=Th.exec(n);)g=h[0],y=n.substring(l,h.index),p?p=(p+1)%5:(y.substr(-5)==="rgba("||y.substr(-5)==="hsla(")&&(p=1),g!==(v=d[u++]||"")&&(f=parseFloat(v)||0,b=v.substr((f+"").length),g.charAt(1)==="="&&(g=Oh(f,g)+b),m=parseFloat(g),_=g.substr((m+"").length),l=Th.lastIndex-_.length,_||(_=_||bn.units[t]||b,l===n.length&&(n+=_,o.e+=_)),b!==_&&(f=nl(e,t,v,_)||0),o._pt={_next:o._pt,p:y||u===1?y:",",s:f,c:m-f,m:p&&p<4||t==="zIndex"?Math.round:0});o.c=l<n.length?n.substring(l,n.length):""}else o.r=t==="display"&&n==="none"?UG:FG;return eG.test(n)&&(o.e=0),this._pt=o,o},OL={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},Uoe=function(e){var t=e.split(" "),i=t[0],n=t[1]||"50%";return(i==="top"||i==="bottom"||n==="left"||n==="right")&&(e=i,i=n,n=e),t[0]=OL[i]||i,t[1]=OL[n]||n,t.join(" ")},Voe=function(e,t){if(t.tween&&t.tween._time===t.tween._dur){var i=t.t,n=i.style,a=t.u,s=i._gsap,o,l,u;if(a==="all"||a===!0)n.cssText="",l=1;else for(a=a.split(","),u=a.length;--u>-1;)o=a[u],Zs[o]&&(l=1,o=o==="transformOrigin"?Qi:Jt),tc(i,o);l&&(tc(i,Jt),s&&(s.svg&&i.removeAttribute("transform"),_v(i,1),s.uncache=1,VG(n)))}},k0={clearProps:function(e,t,i,n,a){if(a.data!=="isFromStart"){var s=e._pt=new Zi(e._pt,t,i,0,0,Voe);return s.u=n,s.pr=-10,s.tween=a,e._props.push(i),1}}},yv=[1,0,0,1,0,0],WG={},qG=function(e){return e==="matrix(1, 0, 0, 1, 0, 0)"||e==="none"||!e},NL=function(e){var t=as(e,Jt);return qG(t)?yv:t.substr(7).match(J7).map(mr)},iD=function(e,t){var i=e._gsap||Fu(e),n=e.style,a=NL(e),s,o,l,u;return i.svg&&e.getAttribute("transform")?(l=e.transform.baseVal.consolidate().matrix,a=[l.a,l.b,l.c,l.d,l.e,l.f],a.join(",")==="1,0,0,1,0,0"?yv:a):(a===yv&&!e.offsetParent&&e!==Nh&&!i.svg&&(l=n.display,n.display="block",s=e.parentNode,(!s||!e.offsetParent)&&(u=1,o=e.nextElementSibling,Nh.appendChild(e)),a=NL(e),l?n.display=l:tc(e,"display"),u&&(o?s.insertBefore(e,o):s?s.appendChild(e):Nh.removeChild(e))),t&&a.length>6?[a[0],a[1],a[4],a[5],a[12],a[13]]:a)},Ow=function(e,t,i,n,a,s){var o=e._gsap,l=a||iD(e,!0),u=o.xOrigin||0,c=o.yOrigin||0,h=o.xOffset||0,d=o.yOffset||0,f=l[0],p=l[1],v=l[2],g=l[3],m=l[4],y=l[5],_=t.split(" "),b=parseFloat(_[0])||0,T=parseFloat(_[1])||0,x,C,D,I;i?l!==yv&&(C=f*g-p*v)&&(D=b*(g/C)+T*(-v/C)+(v*y-g*m)/C,I=b*(-p/C)+T*(f/C)-(f*y-p*m)/C,b=D,T=I):(x=HG(e),b=x.x+(~_[0].indexOf("%")?b/100*x.width:b),T=x.y+(~(_[1]||_[0]).indexOf("%")?T/100*x.height:T)),n||n!==!1&&o.smooth?(m=b-u,y=T-c,o.xOffset=h+(m*f+y*v)-m,o.yOffset=d+(m*p+y*g)-y):o.xOffset=o.yOffset=0,o.xOrigin=b,o.yOrigin=T,o.smooth=!!n,o.origin=t,o.originIsAbsolute=!!i,e.style[Qi]="0px 0px",s&&(Bo(s,o,"xOrigin",u,b),Bo(s,o,"yOrigin",c,T),Bo(s,o,"xOffset",h,o.xOffset),Bo(s,o,"yOffset",d,o.yOffset)),e.setAttribute("data-svg-origin",b+" "+T)},_v=function(e,t){var i=e._gsap||new IG(e);if("x"in i&&!t&&!i.uncache)return i;var n=e.style,a=i.scaleX<0,s="px",o="deg",l=getComputedStyle(e),u=as(e,Qi)||"0",c,h,d,f,p,v,g,m,y,_,b,T,x,C,D,I,M,L,N,O,B,F,U,$,q,Z,te,J,oe,he,ue,Ie;return c=h=d=v=g=m=y=_=b=0,f=p=1,i.svg=!!(e.getCTM&&$G(e)),l.translate&&((l.translate!=="none"||l.scale!=="none"||l.rotate!=="none")&&(n[Jt]=(l.translate!=="none"?"translate3d("+(l.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(l.rotate!=="none"?"rotate("+l.rotate+") ":"")+(l.scale!=="none"?"scale("+l.scale.split(" ").join(",")+") ":"")+(l[Jt]!=="none"?l[Jt]:"")),n.scale=n.rotate=n.translate="none"),C=iD(e,i.svg),i.svg&&(i.uncache?(q=e.getBBox(),u=i.xOrigin-q.x+"px "+(i.yOrigin-q.y)+"px",$=""):$=!t&&e.getAttribute("data-svg-origin"),Ow(e,$||u,!!$||i.originIsAbsolute,i.smooth!==!1,C)),T=i.xOrigin||0,x=i.yOrigin||0,C!==yv&&(L=C[0],N=C[1],O=C[2],B=C[3],c=F=C[4],h=U=C[5],C.length===6?(f=Math.sqrt(L*L+N*N),p=Math.sqrt(B*B+O*O),v=L||N?Uc(N,L)*au:0,y=O||B?Uc(O,B)*au+v:0,y&&(p*=Math.abs(Math.cos(y*Bh))),i.svg&&(c-=T-(T*L+x*O),h-=x-(T*N+x*B))):(Ie=C[6],he=C[7],te=C[8],J=C[9],oe=C[10],ue=C[11],c=C[12],h=C[13],d=C[14],D=Uc(Ie,oe),g=D*au,D&&(I=Math.cos(-D),M=Math.sin(-D),$=F*I+te*M,q=U*I+J*M,Z=Ie*I+oe*M,te=F*-M+te*I,J=U*-M+J*I,oe=Ie*-M+oe*I,ue=he*-M+ue*I,F=$,U=q,Ie=Z),D=Uc(-O,oe),m=D*au,D&&(I=Math.cos(-D),M=Math.sin(-D),$=L*I-te*M,q=N*I-J*M,Z=O*I-oe*M,ue=B*M+ue*I,L=$,N=q,O=Z),D=Uc(N,L),v=D*au,D&&(I=Math.cos(D),M=Math.sin(D),$=L*I+N*M,q=F*I+U*M,N=N*I-L*M,U=U*I-F*M,L=$,F=q),g&&Math.abs(g)+Math.abs(v)>359.9&&(g=v=0,m=180-m),f=mr(Math.sqrt(L*L+N*N+O*O)),p=mr(Math.sqrt(U*U+Ie*Ie)),D=Uc(F,U),y=Math.abs(D)>2e-4?D*au:0,b=ue?1/(ue<0?-ue:ue):0),i.svg&&($=e.getAttribute("transform"),i.forceCSS=e.setAttribute("transform","")||!qG(as(e,Jt)),$&&e.setAttribute("transform",$))),Math.abs(y)>90&&Math.abs(y)<270&&(a?(f*=-1,y+=v<=0?180:-180,v+=v<=0?180:-180):(p*=-1,y+=y<=0?180:-180)),t=t||i.uncache,i.x=c-((i.xPercent=c&&(!t&&i.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-c)?-50:0)))?e.offsetWidth*i.xPercent/100:0)+s,i.y=h-((i.yPercent=h&&(!t&&i.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-h)?-50:0)))?e.offsetHeight*i.yPercent/100:0)+s,i.z=d+s,i.scaleX=mr(f),i.scaleY=mr(p),i.rotation=mr(v)+o,i.rotationX=mr(g)+o,i.rotationY=mr(m)+o,i.skewX=y+o,i.skewY=_+o,i.transformPerspective=b+s,(i.zOrigin=parseFloat(u.split(" ")[2])||!t&&i.zOrigin||0)&&(n[Qi]=R0(u)),i.xOffset=i.yOffset=0,i.force3D=bn.force3D,i.renderTransform=i.svg?Goe:GG?jG:zoe,i.uncache=0,i},R0=function(e){return(e=e.split(" "))[0]+" "+e[1]},lS=function(e,t,i){var n=si(t);return mr(parseFloat(t)+parseFloat(nl(e,"x",i+"px",n)))+n},zoe=function(e,t){t.z="0px",t.rotationY=t.rotationX="0deg",t.force3D=0,jG(e,t)},Pl="0deg",Cd="0px",Ml=") ",jG=function(e,t){var i=t||this,n=i.xPercent,a=i.yPercent,s=i.x,o=i.y,l=i.z,u=i.rotation,c=i.rotationY,h=i.rotationX,d=i.skewX,f=i.skewY,p=i.scaleX,v=i.scaleY,g=i.transformPerspective,m=i.force3D,y=i.target,_=i.zOrigin,b="",T=m==="auto"&&e&&e!==1||m===!0;if(_&&(h!==Pl||c!==Pl)){var x=parseFloat(c)*Bh,C=Math.sin(x),D=Math.cos(x),I;x=parseFloat(h)*Bh,I=Math.cos(x),s=lS(y,s,C*I*-_),o=lS(y,o,-Math.sin(x)*-_),l=lS(y,l,D*I*-_+_)}g!==Cd&&(b+="perspective("+g+Ml),(n||a)&&(b+="translate("+n+"%, "+a+"%) "),(T||s!==Cd||o!==Cd||l!==Cd)&&(b+=l!==Cd||T?"translate3d("+s+", "+o+", "+l+") ":"translate("+s+", "+o+Ml),u!==Pl&&(b+="rotate("+u+Ml),c!==Pl&&(b+="rotateY("+c+Ml),h!==Pl&&(b+="rotateX("+h+Ml),(d!==Pl||f!==Pl)&&(b+="skew("+d+", "+f+Ml),(p!==1||v!==1)&&(b+="scale("+p+", "+v+Ml),y.style[Jt]=b||"translate(0, 0)"},Goe=function(e,t){var i=t||this,n=i.xPercent,a=i.yPercent,s=i.x,o=i.y,l=i.rotation,u=i.skewX,c=i.skewY,h=i.scaleX,d=i.scaleY,f=i.target,p=i.xOrigin,v=i.yOrigin,g=i.xOffset,m=i.yOffset,y=i.forceCSS,_=parseFloat(s),b=parseFloat(o),T,x,C,D,I;l=parseFloat(l),u=parseFloat(u),c=parseFloat(c),c&&(c=parseFloat(c),u+=c,l+=c),l||u?(l*=Bh,u*=Bh,T=Math.cos(l)*h,x=Math.sin(l)*h,C=Math.sin(l-u)*-d,D=Math.cos(l-u)*d,u&&(c*=Bh,I=Math.tan(u-c),I=Math.sqrt(1+I*I),C*=I,D*=I,c&&(I=Math.tan(c),I=Math.sqrt(1+I*I),T*=I,x*=I)),T=mr(T),x=mr(x),C=mr(C),D=mr(D)):(T=h,D=d,x=C=0),(_&&!~(s+"").indexOf("px")||b&&!~(o+"").indexOf("px"))&&(_=nl(f,"x",s,"px"),b=nl(f,"y",o,"px")),(p||v||g||m)&&(_=mr(_+p-(p*T+v*C)+g),b=mr(b+v-(p*x+v*D)+m)),(n||a)&&(I=f.getBBox(),_=mr(_+n/100*I.width),b=mr(b+a/100*I.height)),I="matrix("+T+","+x+","+C+","+D+","+_+","+b+")",f.setAttribute("transform",I),y&&(f.style[Jt]=I)},Hoe=function(e,t,i,n,a){var s=360,o=qr(a),l=parseFloat(a)*(o&&~a.indexOf("rad")?au:1),u=l-n,c=n+u+"deg",h,d;return o&&(h=a.split("_")[1],h==="short"&&(u%=s,u!==u%(s/2)&&(u+=u<0?s:-s)),h==="cw"&&u<0?u=(u+s*ML)%s-~~(u/s)*s:h==="ccw"&&u>0&&(u=(u-s*ML)%s-~~(u/s)*s)),e._pt=d=new Zi(e._pt,t,i,n,u,Aoe),d.e=c,d.u="deg",e._props.push(i),d},BL=function(e,t){for(var i in t)e[i]=t[i];return e},$oe=function(e,t,i){var n=BL({},i._gsap),a="perspective,force3D,transformOrigin,svgOrigin",s=i.style,o,l,u,c,h,d,f,p;n.svg?(u=i.getAttribute("transform"),i.setAttribute("transform",""),s[Jt]=t,o=_v(i,1),tc(i,Jt),i.setAttribute("transform",u)):(u=getComputedStyle(i)[Jt],s[Jt]=t,o=_v(i,1),s[Jt]=u);for(l in Zs)u=n[l],c=o[l],u!==c&&a.indexOf(l)<0&&(f=si(u),p=si(c),h=f!==p?nl(i,l,u,p):parseFloat(u),d=parseFloat(c),e._pt=new Zi(e._pt,o,l,h,d-h,Lw),e._pt.u=p||0,e._props.push(l));BL(o,n)};Ki("padding,margin,Width,Radius",function(r,e){var t="Top",i="Right",n="Bottom",a="Left",s=(e<3?[t,i,n,a]:[t+a,t+i,n+i,n+a]).map(function(o){return e<2?r+o:"border"+o+r});k0[e>1?"border"+r:r]=function(o,l,u,c,h){var d,f;if(arguments.length<4)return d=s.map(function(p){return Ms(o,p,u)}),f=d.join(" "),f.split(d[0]).length===5?d[0]:f;d=(c+"").split(" "),f={},s.forEach(function(p,v){return f[p]=d[v]=d[v]||d[(v-1)/2|0]}),o.init(l,f,h)}});var XG={name:"css",register:Rw,targetTest:function(e){return e.style&&e.nodeType},init:function(e,t,i,n,a){var s=this._props,o=e.style,l=i.vars.startAt,u,c,h,d,f,p,v,g,m,y,_,b,T,x,C,D;eD||Rw(),this.styles=this.styles||zG(e),D=this.styles.props,this.tween=i;for(v in t)if(v!=="autoRound"&&(c=t[v],!(cn[v]&&PG(v,t,i,n,e,a)))){if(f=typeof c,p=k0[v],f==="function"&&(c=c.call(i,n,e,a),f=typeof c),f==="string"&&~c.indexOf("random(")&&(c=vv(c)),p)p(this,e,v,c,i)&&(C=1);else if(v.substr(0,2)==="--")u=(getComputedStyle(e).getPropertyValue(v)+"").trim(),c+="",jo.lastIndex=0,jo.test(u)||(g=si(u),m=si(c)),m?g!==m&&(u=nl(e,v,u,m)+m):g&&(c+=g),this.add(o,"setProperty",u,c,n,a,0,0,v),s.push(v),D.push(v,0,o[v]);else if(f!=="undefined"){if(l&&v in l?(u=typeof l[v]=="function"?l[v].call(i,n,e,a):l[v],qr(u)&&~u.indexOf("random(")&&(u=vv(u)),si(u+"")||u==="auto"||(u+=bn.units[v]||si(Ms(e,v))||""),(u+"").charAt(1)==="="&&(u=Ms(e,v))):u=Ms(e,v),d=parseFloat(u),y=f==="string"&&c.charAt(1)==="="&&c.substr(0,2),y&&(c=c.substr(2)),h=parseFloat(c),v in Ja&&(v==="autoAlpha"&&(d===1&&Ms(e,"visibility")==="hidden"&&h&&(d=0),D.push("visibility",0,o.visibility),Bo(this,o,"visibility",d?"inherit":"hidden",h?"inherit":"hidden",!h)),v!=="scale"&&v!=="transform"&&(v=Ja[v],~v.indexOf(",")&&(v=v.split(",")[0]))),_=v in Zs,_){if(this.styles.save(v),b||(T=e._gsap,T.renderTransform&&!t.parseTransform||_v(e,t.parseTransform),x=t.smoothOrigin!==!1&&T.smooth,b=this._pt=new Zi(this._pt,o,Jt,0,1,T.renderTransform,T,0,-1),b.dep=1),v==="scale")this._pt=new Zi(this._pt,T,"scaleY",T.scaleY,(y?Oh(T.scaleY,y+h):h)-T.scaleY||0,Lw),this._pt.u=0,s.push("scaleY",v),v+="X";else if(v==="transformOrigin"){D.push(Qi,0,o[Qi]),c=Uoe(c),T.svg?Ow(e,c,0,x,0,this):(m=parseFloat(c.split(" ")[2])||0,m!==T.zOrigin&&Bo(this,T,"zOrigin",T.zOrigin,m),Bo(this,o,v,R0(u),R0(c)));continue}else if(v==="svgOrigin"){Ow(e,c,1,x,0,this);continue}else if(v in WG){Hoe(this,T,v,d,y?Oh(d,y+c):c);continue}else if(v==="smoothOrigin"){Bo(this,T,"smooth",T.smooth,c);continue}else if(v==="force3D"){T[v]=c;continue}else if(v==="transform"){$oe(this,c,e);continue}}else v in o||(v=pf(v)||v);if(_||(h||h===0)&&(d||d===0)&&!Coe.test(c)&&v in o)g=(u+"").substr((d+"").length),h||(h=0),m=si(c)||(v in bn.units?bn.units[v]:g),g!==m&&(d=nl(e,v,u,m)),this._pt=new Zi(this._pt,_?T:o,v,d,(y?Oh(d,y+h):h)-d,!_&&(m==="px"||v==="zIndex")&&t.autoRound!==!1?Eoe:Lw),this._pt.u=m||0,g!==m&&m!=="%"&&(this._pt.b=u,this._pt.r=Doe);else if(v in o)Foe.call(this,e,v,u,y?y+c:c);else if(v in e)this.add(e,v,u||e[v],y?y+c:c,n,a);else if(v!=="parseTransform"){WA(v,c);continue}_||(v in o?D.push(v,0,o[v]):D.push(v,1,u||e[v])),s.push(v)}}C&&NG(this)},render:function(e,t){if(t.tween._time||!tD())for(var i=t._pt;i;)i.r(e,i.d),i=i._next;else t.styles.revert()},get:Ms,aliases:Ja,getSetter:function(e,t,i){var n=Ja[t];return n&&n.indexOf(",")<0&&(t=n),t in Zs&&t!==Qi&&(e._gsap.x||Ms(e,"x"))?i&&PL===i?t==="scale"?Loe:Moe:(PL=i||{})&&(t==="scale"?koe:Roe):e.style&&!GA(e.style[t])?Ioe:~t.indexOf("-")?Poe:QA(e,t)},core:{_removeProperty:tc,_getMatrix:iD}};en.utils.checkPrefix=pf;en.core.getStyleSaver=zG;(function(r,e,t,i){var n=Ki(r+","+e+","+t,function(a){Zs[a]=1});Ki(e,function(a){bn.units[a]="deg",WG[a]=1}),Ja[n[13]]=r+","+e,Ki(i,function(a){var s=a.split(":");Ja[s[1]]=n[s[0]]})})("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY");Ki("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(r){bn.units[r]="px"});en.registerPlugin(XG);var nD=en.registerPlugin(XG)||en;nD.core.Tween;/*!
|
||
* matrix 3.12.5
|
||
* https://gsap.com
|
||
*
|
||
* Copyright 2008-2024, GreenSock. All rights reserved.
|
||
* Subject to the terms at https://gsap.com/standard-license or for
|
||
* Club GSAP members, the agreement issued with that membership.
|
||
* @author: Jack Doyle, jack@greensock.com
|
||
*/var Os,Gu,aD,v1,hp,Iy,O0,Fp,ga="transform",Nw=ga+"Origin",YG,KG=function(e){var t=e.ownerDocument||e;for(!(ga in e.style)&&("msTransform"in e.style)&&(ga="msTransform",Nw=ga+"Origin");t.parentNode&&(t=t.parentNode););if(Gu=window,O0=new rc,t){Os=t,aD=t.documentElement,v1=t.body,Fp=Os.createElementNS("http://www.w3.org/2000/svg","g"),Fp.style.transform="none";var i=t.createElement("div"),n=t.createElement("div"),a=t&&(t.body||t.firstElementChild);a&&a.appendChild&&(a.appendChild(i),i.appendChild(n),i.setAttribute("style","position:static;transform:translate3d(0,0,1px)"),YG=n.offsetParent!==i,a.removeChild(i))}return t},Woe=function(e){for(var t,i;e&&e!==v1;)i=e._gsap,i&&i.uncache&&i.get(e,"x"),i&&!i.scaleX&&!i.scaleY&&i.renderTransform&&(i.scaleX=i.scaleY=1e-4,i.renderTransform(1,i),t?t.push(i):t=[i]),e=e.parentNode;return t},ZG=[],QG=[],qoe=function(){return Gu.pageYOffset||Os.scrollTop||aD.scrollTop||v1.scrollTop||0},joe=function(){return Gu.pageXOffset||Os.scrollLeft||aD.scrollLeft||v1.scrollLeft||0},sD=function(e){return e.ownerSVGElement||((e.tagName+"").toLowerCase()==="svg"?e:null)},Xoe=function r(e){if(Gu.getComputedStyle(e).position==="fixed")return!0;if(e=e.parentNode,e&&e.nodeType===1)return r(e)},uS=function r(e,t){if(e.parentNode&&(Os||KG(e))){var i=sD(e),n=i?i.getAttribute("xmlns")||"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",a=i?t?"rect":"g":"div",s=t!==2?0:100,o=t===3?100:0,l="position:absolute;display:block;pointer-events:none;margin:0;padding:0;",u=Os.createElementNS?Os.createElementNS(n.replace(/^https/,"http"),a):Os.createElement(a);return t&&(i?(Iy||(Iy=r(e)),u.setAttribute("width",.01),u.setAttribute("height",.01),u.setAttribute("transform","translate("+s+","+o+")"),Iy.appendChild(u)):(hp||(hp=r(e),hp.style.cssText=l),u.style.cssText=l+"width:0.1px;height:0.1px;top:"+o+"px;left:"+s+"px",hp.appendChild(u))),u}throw"Need document and parent."},Yoe=function(e){for(var t=new rc,i=0;i<e.numberOfItems;i++)t.multiply(e.getItem(i).matrix);return t},Koe=function(e){var t=e.getCTM(),i;return t||(i=e.style[ga],e.style[ga]="none",e.appendChild(Fp),t=Fp.getCTM(),e.removeChild(Fp),i?e.style[ga]=i:e.style.removeProperty(ga.replace(/([A-Z])/g,"-$1").toLowerCase())),t||O0.clone()},Zoe=function(e,t){var i=sD(e),n=e===i,a=i?ZG:QG,s=e.parentNode,o,l,u,c,h,d;if(e===Gu)return e;if(a.length||a.push(uS(e,1),uS(e,2),uS(e,3)),o=i?Iy:hp,i)n?(u=Koe(e),c=-u.e/u.a,h=-u.f/u.d,l=O0):e.getBBox?(u=e.getBBox(),l=e.transform?e.transform.baseVal:{},l=l.numberOfItems?l.numberOfItems>1?Yoe(l):l.getItem(0).matrix:O0,c=l.a*u.x+l.c*u.y,h=l.b*u.x+l.d*u.y):(l=new rc,c=h=0),(n?i:s).appendChild(o),o.setAttribute("transform","matrix("+l.a+","+l.b+","+l.c+","+l.d+","+(l.e+c)+","+(l.f+h)+")");else{if(c=h=0,YG)for(l=e.offsetParent,u=e;u&&(u=u.parentNode)&&u!==l&&u.parentNode;)(Gu.getComputedStyle(u)[ga]+"").length>4&&(c=u.offsetLeft,h=u.offsetTop,u=0);if(d=Gu.getComputedStyle(e),d.position!=="absolute"&&d.position!=="fixed")for(l=e.offsetParent;s&&s!==l;)c+=s.scrollLeft||0,h+=s.scrollTop||0,s=s.parentNode;u=o.style,u.top=e.offsetTop-h+"px",u.left=e.offsetLeft-c+"px",u[ga]=d[ga],u[Nw]=d[Nw],u.position=d.position==="fixed"?"fixed":"absolute",e.parentNode.appendChild(o)}return o},cS=function(e,t,i,n,a,s,o){return e.a=t,e.b=i,e.c=n,e.d=a,e.e=s,e.f=o,e},rc=function(){function r(t,i,n,a,s,o){t===void 0&&(t=1),i===void 0&&(i=0),n===void 0&&(n=0),a===void 0&&(a=1),s===void 0&&(s=0),o===void 0&&(o=0),cS(this,t,i,n,a,s,o)}var e=r.prototype;return e.inverse=function(){var i=this.a,n=this.b,a=this.c,s=this.d,o=this.e,l=this.f,u=i*s-n*a||1e-10;return cS(this,s/u,-n/u,-a/u,i/u,(a*l-s*o)/u,-(i*l-n*o)/u)},e.multiply=function(i){var n=this.a,a=this.b,s=this.c,o=this.d,l=this.e,u=this.f,c=i.a,h=i.c,d=i.b,f=i.d,p=i.e,v=i.f;return cS(this,c*n+d*s,c*a+d*o,h*n+f*s,h*a+f*o,l+p*n+v*s,u+p*a+v*o)},e.clone=function(){return new r(this.a,this.b,this.c,this.d,this.e,this.f)},e.equals=function(i){var n=this.a,a=this.b,s=this.c,o=this.d,l=this.e,u=this.f;return n===i.a&&a===i.b&&s===i.c&&o===i.d&&l===i.e&&u===i.f},e.apply=function(i,n){n===void 0&&(n={});var a=i.x,s=i.y,o=this.a,l=this.b,u=this.c,c=this.d,h=this.e,d=this.f;return n.x=a*o+s*u+h||0,n.y=a*l+s*c+d||0,n},r}();function pu(r,e,t,i){if(!r||!r.parentNode||(Os||KG(r)).documentElement===r)return new rc;var n=Woe(r),a=sD(r),s=a?ZG:QG,o=Zoe(r),l=s[0].getBoundingClientRect(),u=s[1].getBoundingClientRect(),c=s[2].getBoundingClientRect(),h=o.parentNode,d=Xoe(r),f=new rc((u.left-l.left)/100,(u.top-l.top)/100,(c.left-l.left)/100,(c.top-l.top)/100,l.left+(d?0:joe()),l.top+(d?0:qoe()));if(h.removeChild(o),n)for(l=n.length;l--;)u=n[l],u.scaleX=u.scaleY=0,u.renderTransform(1,u);return e?f.inverse():f}function FL(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function Qoe(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.__proto__=e}var mt,Vt,dn,Sa,Ns,hS,Ls,Bw,fp,Fo,JG,Fw,bv,oD,dp,ca,pp,Py,e9,Uw,N0=0,t9=function(){return typeof window<"u"},r9=function(){return mt||t9()&&(mt=window.gsap)&&mt.registerPlugin&&mt},Lo=function(e){return typeof e=="function"},Up=function(e){return typeof e=="object"},va=function(e){return typeof e>"u"},My=function(){return!1},Vp="transform",Vw="transformOrigin",yo=function(e){return Math.round(e*1e4)/1e4},Ad=Array.isArray,gm=function(e,t){var i=dn.createElementNS?dn.createElementNS("http://www.w3.org/1999/xhtml".replace(/^https/,"http"),e):dn.createElement(e);return i.style?i:dn.createElement(e)},UL=180/Math.PI,Ll=1e20,Joe=new rc,_o=Date.now||function(){return new Date().getTime()},Hu=[],Fh={},ele=0,tle=/^(?:a|input|textarea|button|select)$/i,VL=0,Vc={},Ds={},i9=function(e,t){var i={},n;for(n in e)i[n]=t?e[n]*t:e[n];return i},rle=function(e,t){for(var i in t)i in e||(e[i]=t[i]);return e},zL=function r(e,t){for(var i=e.length,n;i--;)t?e[i].style.touchAction=t:e[i].style.removeProperty("touch-action"),n=e[i].children,n&&n.length&&r(n,t)},n9=function(){return Hu.forEach(function(e){return e()})},ile=function(e){Hu.push(e),Hu.length===1&&mt.ticker.add(n9)},GL=function(){return!Hu.length&&mt.ticker.remove(n9)},HL=function(e){for(var t=Hu.length;t--;)Hu[t]===e&&Hu.splice(t,1);mt.to(GL,{overwrite:!0,delay:15,duration:0,onComplete:GL,data:"_draggable"})},nle=function(e,t){for(var i in t)i in e||(e[i]=t[i]);return e},Mr=function(e,t,i,n){if(e.addEventListener){var a=bv[t];n=n||(JG?{passive:!1}:null),e.addEventListener(a||t,i,n),a&&t!==a&&e.addEventListener(t,i,n)}},Tr=function(e,t,i,n){if(e.removeEventListener){var a=bv[t];e.removeEventListener(a||t,i,n),a&&t!==a&&e.removeEventListener(t,i,n)}},In=function(e){e.preventDefault&&e.preventDefault(),e.preventManipulation&&e.preventManipulation()},ale=function(e,t){for(var i=e.length;i--;)if(e[i].identifier===t)return!0},sle=function r(e){oD=e.touches&&N0<e.touches.length,Tr(e.target,"touchend",r)},$L=function(e){oD=e.touches&&N0<e.touches.length,Mr(e.target,"touchend",sle)},Uh=function(e){return Vt.pageYOffset||e.scrollTop||e.documentElement.scrollTop||e.body.scrollTop||0},Vh=function(e){return Vt.pageXOffset||e.scrollLeft||e.documentElement.scrollLeft||e.body.scrollLeft||0},WL=function r(e,t){Mr(e,"scroll",t),vf(e.parentNode)||r(e.parentNode,t)},qL=function r(e,t){Tr(e,"scroll",t),vf(e.parentNode)||r(e.parentNode,t)},vf=function(e){return!e||e===Sa||e.nodeType===9||e===dn.body||e===Vt||!e.nodeType||!e.parentNode},jL=function(e,t){var i=t==="x"?"Width":"Height",n="scroll"+i,a="client"+i;return Math.max(0,vf(e)?Math.max(Sa[n],Ns[n])-(Vt["inner"+i]||Sa[a]||Ns[a]):e[n]-e[a])},fS=function r(e,t){var i=jL(e,"x"),n=jL(e,"y");vf(e)?e=Ds:r(e.parentNode,t),e._gsMaxScrollX=i,e._gsMaxScrollY=n,t||(e._gsScrollX=e.scrollLeft||0,e._gsScrollY=e.scrollTop||0)},dS=function(e,t,i){var n=e.style;n&&(va(n[t])&&(t=fp(t,e)||t),i==null?n.removeProperty&&n.removeProperty(t.replace(/([A-Z])/g,"-$1").toLowerCase()):n[t]=i)},Sv=function(e){return Vt.getComputedStyle(e instanceof Element?e:e.host||(e.parentNode||{}).host||e)},kl={},zc=function(e){if(e===Vt)return kl.left=kl.top=0,kl.width=kl.right=Sa.clientWidth||e.innerWidth||Ns.clientWidth||0,kl.height=kl.bottom=(e.innerHeight||0)-20<Sa.clientHeight?Sa.clientHeight:e.innerHeight||Ns.clientHeight||0,kl;var t=e.ownerDocument||dn,i=va(e.pageX)?!e.nodeType&&!va(e.left)&&!va(e.top)?e:Fo(e)[0].getBoundingClientRect():{left:e.pageX-Vh(t),top:e.pageY-Uh(t),right:e.pageX-Vh(t)+1,bottom:e.pageY-Uh(t)+1};return va(i.right)&&!va(i.width)?(i.right=i.left+i.width,i.bottom=i.top+i.height):va(i.width)&&(i={width:i.right-i.left,height:i.bottom-i.top,right:i.right,left:i.left,bottom:i.bottom,top:i.top}),i},pr=function(e,t,i){var n=e.vars,a=n[i],s=e._listeners[t],o;return Lo(a)&&(o=a.apply(n.callbackScope||e,n[i+"Params"]||[e.pointerEvent])),s&&e.dispatchEvent(t)===!1&&(o=!1),o},XL=function(e,t){var i=Fo(e)[0],n,a,s;return!i.nodeType&&i!==Vt?va(e.left)?(a=e.min||e.minX||e.minRotation||0,n=e.min||e.minY||0,{left:a,top:n,width:(e.max||e.maxX||e.maxRotation||0)-a,height:(e.max||e.maxY||0)-n}):(s={x:0,y:0},{left:e.left-s.x,top:e.top-s.y,width:e.width,height:e.height}):ole(i,t)},Pn={},ole=function(e,t){t=Fo(t)[0];var i=e.getBBox&&e.ownerSVGElement,n=e.ownerDocument||dn,a,s,o,l,u,c,h,d,f,p,v,g,m;if(e===Vt)o=Uh(n),a=Vh(n),s=a+(n.documentElement.clientWidth||e.innerWidth||n.body.clientWidth||0),l=o+((e.innerHeight||0)-20<n.documentElement.clientHeight?n.documentElement.clientHeight:e.innerHeight||n.body.clientHeight||0);else{if(t===Vt||va(t))return e.getBoundingClientRect();a=o=0,i?(p=e.getBBox(),v=p.width,g=p.height):(e.viewBox&&(p=e.viewBox.baseVal)&&(a=p.x||0,o=p.y||0,v=p.width,g=p.height),v||(m=Sv(e),p=m.boxSizing==="border-box",v=(parseFloat(m.width)||e.clientWidth||0)+(p?0:parseFloat(m.borderLeftWidth)+parseFloat(m.borderRightWidth)),g=(parseFloat(m.height)||e.clientHeight||0)+(p?0:parseFloat(m.borderTopWidth)+parseFloat(m.borderBottomWidth)))),s=v,l=g}return e===t?{left:a,top:o,width:s-a,height:l-o}:(u=pu(t,!0).multiply(pu(e)),c=u.apply({x:a,y:o}),h=u.apply({x:s,y:o}),d=u.apply({x:s,y:l}),f=u.apply({x:a,y:l}),a=Math.min(c.x,h.x,d.x,f.x),o=Math.min(c.y,h.y,d.y,f.y),{left:a,top:o,width:Math.max(c.x,h.x,d.x,f.x)-a,height:Math.max(c.y,h.y,d.y,f.y)-o})},pS=function(e,t,i,n,a,s){var o={},l,u,c;if(t)if(a!==1&&t instanceof Array){if(o.end=l=[],c=t.length,Up(t[0]))for(u=0;u<c;u++)l[u]=i9(t[u],a);else for(u=0;u<c;u++)l[u]=t[u]*a;i+=1.1,n-=1.1}else Lo(t)?o.end=function(h){var d=t.call(e,h),f,p;if(a!==1)if(Up(d)){f={};for(p in d)f[p]=d[p]*a;d=f}else d*=a;return d}:o.end=t;return(i||i===0)&&(o.max=i),(n||n===0)&&(o.min=n),s&&(o.velocity=0),o},lle=function r(e){var t;return!e||!e.getAttribute||e===Ns?!1:(t=e.getAttribute("data-clickable"))==="true"||t!=="false"&&(tle.test(e.nodeName+"")||e.getAttribute("contentEditable")==="true")?!0:r(e.parentNode)},mm=function(e,t){for(var i=e.length,n;i--;)n=e[i],n.ondragstart=n.onselectstart=t?null:My,mt.set(n,{lazy:!0,userSelect:t?"text":"none"})},ule=function r(e){if(Sv(e).position==="fixed")return!0;if(e=e.parentNode,e&&e.nodeType===1)return r(e)},a9,zw,cle=function(e,t){e=mt.utils.toArray(e)[0],t=t||{};var i=document.createElement("div"),n=i.style,a=e.firstChild,s=0,o=0,l=e.scrollTop,u=e.scrollLeft,c=e.scrollWidth,h=e.scrollHeight,d=0,f=0,p=0,v,g,m,y,_,b;a9&&t.force3D!==!1?(_="translate3d(",b="px,0px)"):Vp&&(_="translate(",b="px)"),this.scrollTop=function(T,x){if(!arguments.length)return-this.top();this.top(-T,x)},this.scrollLeft=function(T,x){if(!arguments.length)return-this.left();this.left(-T,x)},this.left=function(T,x){if(!arguments.length)return-(e.scrollLeft+o);var C=e.scrollLeft-u,D=o;if((C>2||C<-2)&&!x){u=e.scrollLeft,mt.killTweensOf(this,{left:1,scrollLeft:1}),this.left(-u),t.onKill&&t.onKill();return}T=-T,T<0?(o=T-.5|0,T=0):T>f?(o=T-f|0,T=f):o=0,(o||D)&&(this._skip||(n[Vp]=_+-o+"px,"+-s+b),o+d>=0&&(n.paddingRight=o+d+"px")),e.scrollLeft=T|0,u=e.scrollLeft},this.top=function(T,x){if(!arguments.length)return-(e.scrollTop+s);var C=e.scrollTop-l,D=s;if((C>2||C<-2)&&!x){l=e.scrollTop,mt.killTweensOf(this,{top:1,scrollTop:1}),this.top(-l),t.onKill&&t.onKill();return}T=-T,T<0?(s=T-.5|0,T=0):T>p?(s=T-p|0,T=p):s=0,(s||D)&&(this._skip||(n[Vp]=_+-o+"px,"+-s+b)),e.scrollTop=T|0,l=e.scrollTop},this.maxScrollTop=function(){return p},this.maxScrollLeft=function(){return f},this.disable=function(){for(a=i.firstChild;a;)y=a.nextSibling,e.appendChild(a),a=y;e===i.parentNode&&e.removeChild(i)},this.enable=function(){if(a=e.firstChild,a!==i){for(;a;)y=a.nextSibling,i.appendChild(a),a=y;e.appendChild(i),this.calibrate()}},this.calibrate=function(T){var x=e.clientWidth===v,C,D,I;l=e.scrollTop,u=e.scrollLeft,!(x&&e.clientHeight===g&&i.offsetHeight===m&&c===e.scrollWidth&&h===e.scrollHeight&&!T)&&((s||o)&&(D=this.left(),I=this.top(),this.left(-e.scrollLeft),this.top(-e.scrollTop)),C=Sv(e),(!x||T)&&(n.display="block",n.width="auto",n.paddingRight="0px",d=Math.max(0,e.scrollWidth-e.clientWidth),d&&(d+=parseFloat(C.paddingLeft)+(zw?parseFloat(C.paddingRight):0))),n.display="inline-block",n.position="relative",n.overflow="visible",n.verticalAlign="top",n.boxSizing="content-box",n.width="100%",n.paddingRight=d+"px",zw&&(n.paddingBottom=C.paddingBottom),v=e.clientWidth,g=e.clientHeight,c=e.scrollWidth,h=e.scrollHeight,f=e.scrollWidth-v,p=e.scrollHeight-g,m=i.offsetHeight,n.display="block",(D||I)&&(this.left(D),this.top(I)))},this.content=i,this.element=e,this._skip=!1,this.enable()},vS=function(e){if(t9()&&document.body){var t=window&&window.navigator;Vt=window,dn=document,Sa=dn.documentElement,Ns=dn.body,hS=gm("div"),Py=!!window.PointerEvent,Ls=gm("div"),Ls.style.cssText="visibility:hidden;height:1px;top:-1px;pointer-events:none;position:relative;clear:both;cursor:grab",pp=Ls.style.cursor==="grab"?"grab":"move",dp=t&&t.userAgent.toLowerCase().indexOf("android")!==-1,Fw="ontouchstart"in Sa&&"orientation"in Vt||t&&(t.MaxTouchPoints>0||t.msMaxTouchPoints>0),zw=function(){var i=gm("div"),n=gm("div"),a=n.style,s=Ns,o;return a.display="inline-block",a.position="relative",i.style.cssText="width:90px;height:40px;padding:10px;overflow:auto;visibility:hidden",i.appendChild(n),s.appendChild(i),o=n.offsetHeight+18>i.scrollHeight,s.removeChild(i),o}(),bv=function(i){for(var n=i.split(","),a=("onpointerdown"in hS?"pointerdown,pointermove,pointerup,pointercancel":"onmspointerdown"in hS?"MSPointerDown,MSPointerMove,MSPointerUp,MSPointerCancel":i).split(","),s={},o=4;--o>-1;)s[n[o]]=a[o],s[a[o]]=n[o];try{Sa.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){JG=1}}))}catch{}return s}("touchstart,touchmove,touchend,touchcancel"),Mr(dn,"touchcancel",My),Mr(Vt,"touchmove",My),Ns&&Ns.addEventListener("touchstart",My),Mr(dn,"contextmenu",function(){for(var i in Fh)Fh[i].isPressed&&Fh[i].endDrag()}),mt=Bw=r9()}mt?(ca=mt.plugins.inertia,e9=mt.core.context||function(){},fp=mt.utils.checkPrefix,Vp=fp(Vp),Vw=fp(Vw),Fo=mt.utils.toArray,Uw=mt.core.getStyleSaver,a9=!!fp("perspective")):e&&console.warn("Please gsap.registerPlugin(Draggable)")},hle=function(){function r(t){this._listeners={},this.target=t||this}var e=r.prototype;return e.addEventListener=function(i,n){var a=this._listeners[i]||(this._listeners[i]=[]);~a.indexOf(n)||a.push(n)},e.removeEventListener=function(i,n){var a=this._listeners[i],s=a&&a.indexOf(n);s>=0&&a.splice(s,1)},e.dispatchEvent=function(i){var n=this,a;return(this._listeners[i]||[]).forEach(function(s){return s.call(n,{type:i,target:n.target})===!1&&(a=!1)}),a},r}(),ic=function(r){Qoe(e,r);function e(t,i){var n;n=r.call(this)||this,Bw||vS(1),t=Fo(t)[0],n.styles=Uw&&Uw(t,"transform,left,top"),ca||(ca=mt.plugins.inertia),n.vars=i=i9(i||{}),n.target=t,n.x=n.y=n.rotation=0,n.dragResistance=parseFloat(i.dragResistance)||0,n.edgeResistance=isNaN(i.edgeResistance)?1:parseFloat(i.edgeResistance)||0,n.lockAxis=i.lockAxis,n.autoScroll=i.autoScroll||0,n.lockedAxis=null,n.allowEventDefault=!!i.allowEventDefault,mt.getProperty(t,"x");var a=(i.type||"x,y").toLowerCase(),s=~a.indexOf("x")||~a.indexOf("y"),o=a.indexOf("rotation")!==-1,l=o?"rotation":s?"x":"left",u=s?"y":"top",c=!!(~a.indexOf("x")||~a.indexOf("left")||a==="scroll"),h=!!(~a.indexOf("y")||~a.indexOf("top")||a==="scroll"),d=i.minimumMovement||2,f=FL(n),p=Fo(i.trigger||i.handle||t),v={},g=0,m=!1,y=i.autoScrollMarginTop||40,_=i.autoScrollMarginRight||40,b=i.autoScrollMarginBottom||40,T=i.autoScrollMarginLeft||40,x=i.clickableTest||lle,C=0,D=t._gsap||mt.core.getCache(t),I=ule(t),M=function(X,fe){return parseFloat(D.get(t,X,fe))},L=t.ownerDocument||dn,N,O,B,F,U,$,q,Z,te,J,oe,he,ue,Ie,Oe,Ue,me,ze,Pe,_e,Me,St,Re,Ge,Lt,At,Dt,nr,ht,nn,Sr,lo,uo,xc=function(X){return In(X),X.stopImmediatePropagation&&X.stopImmediatePropagation(),!1},Ni=function Ve(X){if(f.autoScroll&&f.isDragging&&(m||me)){var fe=t,re=f.autoScroll*15,ve,Se,De,st,Ne,xt,Ke,Et;for(m=!1,Ds.scrollTop=Vt.pageYOffset!=null?Vt.pageYOffset:L.documentElement.scrollTop!=null?L.documentElement.scrollTop:L.body.scrollTop,Ds.scrollLeft=Vt.pageXOffset!=null?Vt.pageXOffset:L.documentElement.scrollLeft!=null?L.documentElement.scrollLeft:L.body.scrollLeft,st=f.pointerX-Ds.scrollLeft,Ne=f.pointerY-Ds.scrollTop;fe&&!Se;)Se=vf(fe.parentNode),ve=Se?Ds:fe.parentNode,De=Se?{bottom:Math.max(Sa.clientHeight,Vt.innerHeight||0),right:Math.max(Sa.clientWidth,Vt.innerWidth||0),left:0,top:0}:ve.getBoundingClientRect(),xt=Ke=0,h&&(Et=ve._gsMaxScrollY-ve.scrollTop,Et<0?Ke=Et:Ne>De.bottom-b&&Et?(m=!0,Ke=Math.min(Et,re*(1-Math.max(0,De.bottom-Ne)/b)|0)):Ne<De.top+y&&ve.scrollTop&&(m=!0,Ke=-Math.min(ve.scrollTop,re*(1-Math.max(0,Ne-De.top)/y)|0)),Ke&&(ve.scrollTop+=Ke)),c&&(Et=ve._gsMaxScrollX-ve.scrollLeft,Et<0?xt=Et:st>De.right-_&&Et?(m=!0,xt=Math.min(Et,re*(1-Math.max(0,De.right-st)/_)|0)):st<De.left+T&&ve.scrollLeft&&(m=!0,xt=-Math.min(ve.scrollLeft,re*(1-Math.max(0,st-De.left)/T)|0)),xt&&(ve.scrollLeft+=xt)),Se&&(xt||Ke)&&(Vt.scrollTo(ve.scrollLeft,ve.scrollTop),xl(f.pointerX+xt,f.pointerY+Ke)),fe=ve}if(me){var Zt=f.x,hr=f.y;o?(f.deltaX=Zt-parseFloat(D.rotation),f.rotation=Zt,D.rotation=Zt+"deg",D.renderTransform(1,D)):O?(h&&(f.deltaY=hr-O.top(),O.top(hr)),c&&(f.deltaX=Zt-O.left(),O.left(Zt))):s?(h&&(f.deltaY=hr-parseFloat(D.y),D.y=hr+"px"),c&&(f.deltaX=Zt-parseFloat(D.x),D.x=Zt+"px"),D.renderTransform(1,D)):(h&&(f.deltaY=hr-parseFloat(t.style.top||0),t.style.top=hr+"px"),c&&(f.deltaX=Zt-parseFloat(t.style.left||0),t.style.left=Zt+"px")),Z&&!X&&!nr&&(nr=!0,pr(f,"drag","onDrag")===!1&&(c&&(f.x-=f.deltaX),h&&(f.y-=f.deltaY),Ve(!0)),nr=!1)}me=!1},An=function(X,fe){var re=f.x,ve=f.y,Se,De;t._gsap||(D=mt.core.getCache(t)),D.uncache&&mt.getProperty(t,"x"),s?(f.x=parseFloat(D.x),f.y=parseFloat(D.y)):o?f.x=f.rotation=parseFloat(D.rotation):O?(f.y=O.top(),f.x=O.left()):(f.y=parseFloat(t.style.top||(De=Sv(t))&&De.top)||0,f.x=parseFloat(t.style.left||(De||{}).left)||0),(Pe||_e||Me)&&!fe&&(f.isDragging||f.isThrowing)&&(Me&&(Vc.x=f.x,Vc.y=f.y,Se=Me(Vc),Se.x!==f.x&&(f.x=Se.x,me=!0),Se.y!==f.y&&(f.y=Se.y,me=!0)),Pe&&(Se=Pe(f.x),Se!==f.x&&(f.x=Se,o&&(f.rotation=Se),me=!0)),_e&&(Se=_e(f.y),Se!==f.y&&(f.y=Se),me=!0)),me&&Ni(!0),X||(f.deltaX=f.x-re,f.deltaY=f.y-ve,pr(f,"throwupdate","onThrowUpdate"))},_l=function(X,fe,re,ve){return fe==null&&(fe=-Ll),re==null&&(re=Ll),Lo(X)?function(Se){var De=f.isPressed?1-f.edgeResistance:1;return X.call(f,(Se>re?re+(Se-re)*De:Se<fe?fe+(Se-fe)*De:Se)*ve)*ve}:Ad(X)?function(Se){for(var De=X.length,st=0,Ne=Ll,xt,Ke;--De>-1;)xt=X[De],Ke=xt-Se,Ke<0&&(Ke=-Ke),Ke<Ne&&xt>=fe&&xt<=re&&(st=De,Ne=Ke);return X[st]}:isNaN(X)?function(Se){return Se}:function(){return X*ve}},Ng=function(X,fe,re,ve,Se,De,st){return De=De&&De<Ll?De*De:Ll,Lo(X)?function(Ne){var xt=f.isPressed?1-f.edgeResistance:1,Ke=Ne.x,Et=Ne.y,Zt,hr,Er;return Ne.x=Ke=Ke>re?re+(Ke-re)*xt:Ke<fe?fe+(Ke-fe)*xt:Ke,Ne.y=Et=Et>Se?Se+(Et-Se)*xt:Et<ve?ve+(Et-ve)*xt:Et,Zt=X.call(f,Ne),Zt!==Ne&&(Ne.x=Zt.x,Ne.y=Zt.y),st!==1&&(Ne.x*=st,Ne.y*=st),De<Ll&&(hr=Ne.x-Ke,Er=Ne.y-Et,hr*hr+Er*Er>De&&(Ne.x=Ke,Ne.y=Et)),Ne}:Ad(X)?function(Ne){for(var xt=X.length,Ke=0,Et=Ll,Zt,hr,Er,jr;--xt>-1;)Er=X[xt],Zt=Er.x-Ne.x,hr=Er.y-Ne.y,jr=Zt*Zt+hr*hr,jr<Et&&(Ke=xt,Et=jr);return Et<=De?X[Ke]:Ne}:function(Ne){return Ne}},wc=function(){var X,fe,re,ve;q=!1,O?(O.calibrate(),f.minX=oe=-O.maxScrollLeft(),f.minY=ue=-O.maxScrollTop(),f.maxX=J=f.maxY=he=0,q=!0):i.bounds&&(X=XL(i.bounds,t.parentNode),o?(f.minX=oe=X.left,f.maxX=J=X.left+X.width,f.minY=ue=f.maxY=he=0):!va(i.bounds.maxX)||!va(i.bounds.maxY)?(X=i.bounds,f.minX=oe=X.minX,f.minY=ue=X.minY,f.maxX=J=X.maxX,f.maxY=he=X.maxY):(fe=XL(t,t.parentNode),f.minX=oe=Math.round(M(l,"px")+X.left-fe.left),f.minY=ue=Math.round(M(u,"px")+X.top-fe.top),f.maxX=J=Math.round(oe+(X.width-fe.width)),f.maxY=he=Math.round(ue+(X.height-fe.height))),oe>J&&(f.minX=J,f.maxX=J=oe,oe=f.minX),ue>he&&(f.minY=he,f.maxY=he=ue,ue=f.minY),o&&(f.minRotation=oe,f.maxRotation=J),q=!0),i.liveSnap&&(re=i.liveSnap===!0?i.snap||{}:i.liveSnap,ve=Ad(re)||Lo(re),o?(Pe=_l(ve?re:re.rotation,oe,J,1),_e=null):re.points?Me=Ng(ve?re:re.points,oe,J,ue,he,re.radius,O?-1:1):(c&&(Pe=_l(ve?re:re.x||re.left||re.scrollLeft,oe,J,O?-1:1)),h&&(_e=_l(ve?re:re.y||re.top||re.scrollTop,ue,he,O?-1:1))))},Bg=function(){f.isThrowing=!1,pr(f,"throwcomplete","onThrowComplete")},Ft=function(){f.isThrowing=!1},nd=function(X,fe){var re,ve,Se,De;X&&ca?(X===!0&&(re=i.snap||i.liveSnap||{},ve=Ad(re)||Lo(re),X={resistance:(i.throwResistance||i.resistance||1e3)/(o?10:1)},o?X.rotation=pS(f,ve?re:re.rotation,J,oe,1,fe):(c&&(X[l]=pS(f,ve?re:re.points||re.x||re.left,J,oe,O?-1:1,fe||f.lockedAxis==="x")),h&&(X[u]=pS(f,ve?re:re.points||re.y||re.top,he,ue,O?-1:1,fe||f.lockedAxis==="y")),(re.points||Ad(re)&&Up(re[0]))&&(X.linkedProps=l+","+u,X.radius=re.radius))),f.isThrowing=!0,De=isNaN(i.overshootTolerance)?i.edgeResistance===1?0:1-f.edgeResistance+.2:i.overshootTolerance,X.duration||(X.duration={max:Math.max(i.minDuration||0,"maxDuration"in i?i.maxDuration:2),min:isNaN(i.minDuration)?De===0||Up(X)&&X.resistance>1e3?0:.5:i.minDuration,overshoot:De}),f.tween=Se=mt.to(O||t,{inertia:X,data:"_draggable",inherit:!1,onComplete:Bg,onInterrupt:Ft,onUpdate:i.fastMode?pr:An,onUpdateParams:i.fastMode?[f,"onthrowupdate","onThrowUpdate"]:re&&re.radius?[!1,!0]:[]}),i.fastMode||(O&&(O._skip=!0),Se.render(1e9,!0,!0),An(!0,!0),f.endX=f.x,f.endY=f.y,o&&(f.endRotation=f.x),Se.play(0),An(!0,!0),O&&(O._skip=!1))):q&&f.applyBounds()},bl=function(X){var fe=Ge,re;Ge=pu(t.parentNode,!0),X&&f.isPressed&&!Ge.equals(fe||new rc)&&(re=fe.inverse().apply({x:B,y:F}),Ge.apply(re,re),B=re.x,F=re.y),Ge.equals(Joe)&&(Ge=null)},Cc=function(){var X=1-f.edgeResistance,fe=I?Vh(L):0,re=I?Uh(L):0,ve,Se,De;s&&(D.x=M(l,"px")+"px",D.y=M(u,"px")+"px",D.renderTransform()),bl(!1),Pn.x=f.pointerX-fe,Pn.y=f.pointerY-re,Ge&&Ge.apply(Pn,Pn),B=Pn.x,F=Pn.y,me&&(xl(f.pointerX,f.pointerY),Ni(!0)),lo=pu(t),O?(wc(),$=O.top(),U=O.left()):(Sl()?(An(!0,!0),wc()):f.applyBounds(),o?(ve=t.ownerSVGElement?[D.xOrigin-t.getBBox().x,D.yOrigin-t.getBBox().y]:(Sv(t)[Vw]||"0 0").split(" "),Ue=f.rotationOrigin=pu(t).apply({x:parseFloat(ve[0])||0,y:parseFloat(ve[1])||0}),An(!0,!0),Se=f.pointerX-Ue.x-fe,De=Ue.y-f.pointerY+re,U=f.x,$=f.y=Math.atan2(De,Se)*UL):($=M(u,"px"),U=M(l,"px"))),q&&X&&(U>J?U=J+(U-J)/X:U<oe&&(U=oe-(oe-U)/X),o||($>he?$=he+($-he)/X:$<ue&&($=ue-(ue-$)/X))),f.startX=U=yo(U),f.startY=$=yo($)},Sl=function(){return f.tween&&f.tween.isActive()},ob=function(){Ls.parentNode&&!Sl()&&!f.isDragging&&Ls.parentNode.removeChild(Ls)},Tl=function(X,fe){var re;if(!N||f.isPressed||!X||(X.type==="mousedown"||X.type==="pointerdown")&&!fe&&_o()-C<30&&bv[f.pointerEvent.type]){Sr&&X&&N&&In(X);return}if(Lt=Sl(),uo=!1,f.pointerEvent=X,bv[X.type]?(Re=~X.type.indexOf("touch")?X.currentTarget||X.target:L,Mr(Re,"touchend",an),Mr(Re,"touchmove",Ss),Mr(Re,"touchcancel",an),Mr(L,"touchstart",$L)):(Re=null,Mr(L,"mousemove",Ss)),Dt=null,(!Py||!Re)&&(Mr(L,"mouseup",an),X&&X.target&&Mr(X.target,"mouseup",an)),St=x.call(f,X.target)&&i.dragClickables===!1&&!fe,St){Mr(X.target,"change",an),pr(f,"pressInit","onPressInit"),pr(f,"press","onPress"),mm(p,!0),Sr=!1;return}if(At=!Re||c===h||f.vars.allowNativeTouchScrolling===!1||f.vars.allowContextMenu&&X&&(X.ctrlKey||X.which>2)?!1:c?"y":"x",Sr=!At&&!f.allowEventDefault,Sr&&(In(X),Mr(Vt,"touchforcechange",In)),X.changedTouches?(X=Ie=X.changedTouches[0],Oe=X.identifier):X.pointerId?Oe=X.pointerId:Ie=Oe=null,N0++,ile(Ni),F=f.pointerY=X.pageY,B=f.pointerX=X.pageX,pr(f,"pressInit","onPressInit"),(At||f.autoScroll)&&fS(t.parentNode),t.parentNode&&f.autoScroll&&!O&&!o&&t.parentNode._gsMaxScrollX&&!Ls.parentNode&&!t.getBBox&&(Ls.style.width=t.parentNode.scrollWidth+"px",t.parentNode.appendChild(Ls)),Cc(),f.tween&&f.tween.kill(),f.isThrowing=!1,mt.killTweensOf(O||t,v,!0),O&&mt.killTweensOf(t,{scrollTo:1},!0),f.tween=f.lockedAxis=null,(i.zIndexBoost||!o&&!O&&i.zIndexBoost!==!1)&&(t.style.zIndex=e.zIndex++),f.isPressed=!0,Z=!!(i.onDrag||f._listeners.drag),te=!!(i.onMove||f._listeners.move),i.cursor!==!1||i.activeCursor)for(re=p.length;--re>-1;)mt.set(p[re],{cursor:i.activeCursor||i.cursor||(pp==="grab"?"grabbing":pp)});pr(f,"press","onPress")},Ss=function(X){var fe=X,re,ve,Se,De,st,Ne;if(!N||oD||!f.isPressed||!X){Sr&&X&&N&&In(X);return}if(f.pointerEvent=X,re=X.changedTouches,re){if(X=re[0],X!==Ie&&X.identifier!==Oe){for(De=re.length;--De>-1&&(X=re[De]).identifier!==Oe&&X.target!==t;);if(De<0)return}}else if(X.pointerId&&Oe&&X.pointerId!==Oe)return;if(Re&&At&&!Dt&&(Pn.x=X.pageX-(I?Vh(L):0),Pn.y=X.pageY-(I?Uh(L):0),Ge&&Ge.apply(Pn,Pn),ve=Pn.x,Se=Pn.y,st=Math.abs(ve-B),Ne=Math.abs(Se-F),(st!==Ne&&(st>d||Ne>d)||dp&&At===Dt)&&(Dt=st>Ne&&c?"x":"y",At&&Dt!==At&&Mr(Vt,"touchforcechange",In),f.vars.lockAxisOnTouchScroll!==!1&&c&&h&&(f.lockedAxis=Dt==="x"?"y":"x",Lo(f.vars.onLockAxis)&&f.vars.onLockAxis.call(f,fe)),dp&&At===Dt))){an(fe);return}!f.allowEventDefault&&(!At||Dt&&At!==Dt)&&fe.cancelable!==!1?(In(fe),Sr=!0):Sr&&(Sr=!1),f.autoScroll&&(m=!0),xl(X.pageX,X.pageY,te)},xl=function(X,fe,re){var ve=1-f.dragResistance,Se=1-f.edgeResistance,De=f.pointerX,st=f.pointerY,Ne=$,xt=f.x,Ke=f.y,Et=f.endX,Zt=f.endY,hr=f.endRotation,Er=me,jr,dt,Ir,Gt,co,sn;f.pointerX=X,f.pointerY=fe,I&&(X-=Vh(L),fe-=Uh(L)),o?(Gt=Math.atan2(Ue.y-fe,X-Ue.x)*UL,co=f.y-Gt,co>180?($-=360,f.y=Gt):co<-180&&($+=360,f.y=Gt),f.x!==U||Math.abs($-Gt)>d?(f.y=Gt,Ir=U+($-Gt)*ve):Ir=U):(Ge&&(sn=X*Ge.a+fe*Ge.c+Ge.e,fe=X*Ge.b+fe*Ge.d+Ge.f,X=sn),dt=fe-F,jr=X-B,dt<d&&dt>-d&&(dt=0),jr<d&&jr>-d&&(jr=0),(f.lockAxis||f.lockedAxis)&&(jr||dt)&&(sn=f.lockedAxis,sn||(f.lockedAxis=sn=c&&Math.abs(jr)>Math.abs(dt)?"y":h?"x":null,sn&&Lo(f.vars.onLockAxis)&&f.vars.onLockAxis.call(f,f.pointerEvent)),sn==="y"?dt=0:sn==="x"&&(jr=0)),Ir=yo(U+jr*ve),Gt=yo($+dt*ve)),(Pe||_e||Me)&&(f.x!==Ir||f.y!==Gt&&!o)&&(Me&&(Vc.x=Ir,Vc.y=Gt,sn=Me(Vc),Ir=yo(sn.x),Gt=yo(sn.y)),Pe&&(Ir=yo(Pe(Ir))),_e&&(Gt=yo(_e(Gt)))),q&&(Ir>J?Ir=J+Math.round((Ir-J)*Se):Ir<oe&&(Ir=oe+Math.round((Ir-oe)*Se)),o||(Gt>he?Gt=Math.round(he+(Gt-he)*Se):Gt<ue&&(Gt=Math.round(ue+(Gt-ue)*Se)))),(f.x!==Ir||f.y!==Gt&&!o)&&(o?(f.endRotation=f.x=f.endX=Ir,me=!0):(h&&(f.y=f.endY=Gt,me=!0),c&&(f.x=f.endX=Ir,me=!0)),!re||pr(f,"move","onMove")!==!1?!f.isDragging&&f.isPressed&&(f.isDragging=uo=!0,pr(f,"dragstart","onDragStart")):(f.pointerX=De,f.pointerY=st,$=Ne,f.x=xt,f.y=Ke,f.endX=Et,f.endY=Zt,f.endRotation=hr,me=Er))},an=function Ve(X,fe){if(!N||!f.isPressed||X&&Oe!=null&&!fe&&(X.pointerId&&X.pointerId!==Oe&&X.target!==t||X.changedTouches&&!ale(X.changedTouches,Oe))){Sr&&X&&N&&In(X);return}f.isPressed=!1;var re=X,ve=f.isDragging,Se=f.vars.allowContextMenu&&X&&(X.ctrlKey||X.which>2),De=mt.delayedCall(.001,ob),st,Ne,xt,Ke,Et;if(Re?(Tr(Re,"touchend",Ve),Tr(Re,"touchmove",Ss),Tr(Re,"touchcancel",Ve),Tr(L,"touchstart",$L)):Tr(L,"mousemove",Ss),Tr(Vt,"touchforcechange",In),(!Py||!Re)&&(Tr(L,"mouseup",Ve),X&&X.target&&Tr(X.target,"mouseup",Ve)),me=!1,ve&&(g=VL=_o(),f.isDragging=!1),HL(Ni),St&&!Se){X&&(Tr(X.target,"change",Ve),f.pointerEvent=re),mm(p,!1),pr(f,"release","onRelease"),pr(f,"click","onClick"),St=!1;return}for(Ne=p.length;--Ne>-1;)dS(p[Ne],"cursor",i.cursor||(i.cursor!==!1?pp:null));if(N0--,X){if(st=X.changedTouches,st&&(X=st[0],X!==Ie&&X.identifier!==Oe)){for(Ne=st.length;--Ne>-1&&(X=st[Ne]).identifier!==Oe&&X.target!==t;);if(Ne<0&&!fe)return}f.pointerEvent=re,f.pointerX=X.pageX,f.pointerY=X.pageY}return Se&&re?(In(re),Sr=!0,pr(f,"release","onRelease")):re&&!ve?(Sr=!1,Lt&&(i.snap||i.bounds)&&nd(i.inertia||i.throwProps),pr(f,"release","onRelease"),(!dp||re.type!=="touchmove")&&re.type.indexOf("cancel")===-1&&(pr(f,"click","onClick"),_o()-C<300&&pr(f,"doubleclick","onDoubleClick"),Ke=re.target||t,C=_o(),Et=function(){C!==ht&&f.enabled()&&!f.isPressed&&!re.defaultPrevented&&(Ke.click?Ke.click():L.createEvent&&(xt=L.createEvent("MouseEvents"),xt.initMouseEvent("click",!0,!0,Vt,1,f.pointerEvent.screenX,f.pointerEvent.screenY,f.pointerX,f.pointerY,!1,!1,!1,!1,0,null),Ke.dispatchEvent(xt)))},!dp&&!re.defaultPrevented&&mt.delayedCall(.05,Et))):(nd(i.inertia||i.throwProps),!f.allowEventDefault&&re&&(i.dragClickables!==!1||!x.call(f,re.target))&&ve&&(!At||Dt&&At===Dt)&&re.cancelable!==!1?(Sr=!0,In(re)):Sr=!1,pr(f,"release","onRelease")),Sl()&&De.duration(f.tween.duration()),ve&&pr(f,"dragend","onDragEnd"),!0},Ac=function(X){if(X&&f.isDragging&&!O){var fe=X.target||t.parentNode,re=fe.scrollLeft-fe._gsScrollX,ve=fe.scrollTop-fe._gsScrollY;(re||ve)&&(Ge?(B-=re*Ge.a+ve*Ge.c,F-=ve*Ge.d+re*Ge.b):(B-=re,F-=ve),fe._gsScrollX+=re,fe._gsScrollY+=ve,xl(f.pointerX,f.pointerY))}},Fg=function(X){var fe=_o(),re=fe-C<100,ve=fe-g<50,Se=re&&ht===C,De=f.pointerEvent&&f.pointerEvent.defaultPrevented,st=re&&nn===C,Ne=X.isTrusted||X.isTrusted==null&&re&&Se;if((Se||ve&&f.vars.suppressClickOnDrag!==!1)&&X.stopImmediatePropagation&&X.stopImmediatePropagation(),re&&!(f.pointerEvent&&f.pointerEvent.defaultPrevented)&&(!Se||Ne&&!st)){Ne&&Se&&(nn=C),ht=C;return}(f.isPressed||ve||re)&&(!Ne||!X.detail||!re||De)&&In(X),!re&&!ve&&!uo&&(X&&X.target&&(f.pointerEvent=X),pr(f,"click","onClick"))},Ug=function(X){return Ge?{x:X.x*Ge.a+X.y*Ge.c+Ge.e,y:X.x*Ge.b+X.y*Ge.d+Ge.f}:{x:X.x,y:X.y}};return ze=e.get(t),ze&&ze.kill(),n.startDrag=function(Ve,X){var fe,re,ve,Se;Tl(Ve||f.pointerEvent,!0),X&&!f.hitTest(Ve||f.pointerEvent)&&(fe=zc(Ve||f.pointerEvent),re=zc(t),ve=Ug({x:fe.left+fe.width/2,y:fe.top+fe.height/2}),Se=Ug({x:re.left+re.width/2,y:re.top+re.height/2}),B-=ve.x-Se.x,F-=ve.y-Se.y),f.isDragging||(f.isDragging=uo=!0,pr(f,"dragstart","onDragStart"))},n.drag=Ss,n.endDrag=function(Ve){return an(Ve||f.pointerEvent,!0)},n.timeSinceDrag=function(){return f.isDragging?0:(_o()-g)/1e3},n.timeSinceClick=function(){return(_o()-C)/1e3},n.hitTest=function(Ve,X){return e.hitTest(f.target,Ve,X)},n.getDirection=function(Ve,X){var fe=Ve==="velocity"&&ca?Ve:Up(Ve)&&!o?"element":"start",re,ve,Se,De,st,Ne;return fe==="element"&&(st=zc(f.target),Ne=zc(Ve)),re=fe==="start"?f.x-U:fe==="velocity"?ca.getVelocity(t,l):st.left+st.width/2-(Ne.left+Ne.width/2),o?re<0?"counter-clockwise":"clockwise":(X=X||2,ve=fe==="start"?f.y-$:fe==="velocity"?ca.getVelocity(t,u):st.top+st.height/2-(Ne.top+Ne.height/2),Se=Math.abs(re/ve),De=Se<1/X?"":re<0?"left":"right",Se<X&&(De!==""&&(De+="-"),De+=ve<0?"up":"down"),De)},n.applyBounds=function(Ve,X){var fe,re,ve,Se,De,st;if(Ve&&i.bounds!==Ve)return i.bounds=Ve,f.update(!0,X);if(An(!0),wc(),q&&!Sl()){if(fe=f.x,re=f.y,fe>J?fe=J:fe<oe&&(fe=oe),re>he?re=he:re<ue&&(re=ue),(f.x!==fe||f.y!==re)&&(ve=!0,f.x=f.endX=fe,o?f.endRotation=fe:f.y=f.endY=re,me=!0,Ni(!0),f.autoScroll&&!f.isDragging))for(fS(t.parentNode),Se=t,Ds.scrollTop=Vt.pageYOffset!=null?Vt.pageYOffset:L.documentElement.scrollTop!=null?L.documentElement.scrollTop:L.body.scrollTop,Ds.scrollLeft=Vt.pageXOffset!=null?Vt.pageXOffset:L.documentElement.scrollLeft!=null?L.documentElement.scrollLeft:L.body.scrollLeft;Se&&!st;)st=vf(Se.parentNode),De=st?Ds:Se.parentNode,h&&De.scrollTop>De._gsMaxScrollY&&(De.scrollTop=De._gsMaxScrollY),c&&De.scrollLeft>De._gsMaxScrollX&&(De.scrollLeft=De._gsMaxScrollX),Se=De;f.isThrowing&&(ve||f.endX>J||f.endX<oe||f.endY>he||f.endY<ue)&&nd(i.inertia||i.throwProps,ve)}return f},n.update=function(Ve,X,fe){if(X&&f.isPressed){var re=pu(t),ve=lo.apply({x:f.x-U,y:f.y-$}),Se=pu(t.parentNode,!0);Se.apply({x:re.e-ve.x,y:re.f-ve.y},ve),f.x-=ve.x-Se.e,f.y-=ve.y-Se.f,Ni(!0),Cc()}var De=f.x,st=f.y;return bl(!X),Ve?f.applyBounds():(me&&fe&&Ni(!0),An(!0)),X&&(xl(f.pointerX,f.pointerY),me&&Ni(!0)),f.isPressed&&!X&&(c&&Math.abs(De-f.x)>.01||h&&Math.abs(st-f.y)>.01&&!o)&&Cc(),f.autoScroll&&(fS(t.parentNode,f.isDragging),m=f.isDragging,Ni(!0),qL(t,Ac),WL(t,Ac)),f},n.enable=function(Ve){var X={lazy:!0},fe,re,ve;if(i.cursor!==!1&&(X.cursor=i.cursor||pp),mt.utils.checkPrefix("touchCallout")&&(X.touchCallout="none"),Ve!=="soft"){for(zL(p,c===h?"none":i.allowNativeTouchScrolling&&t.scrollHeight===t.clientHeight==(t.scrollWidth===t.clientHeight)||i.allowEventDefault?"manipulation":c?"pan-y":"pan-x"),re=p.length;--re>-1;)ve=p[re],Py||Mr(ve,"mousedown",Tl),Mr(ve,"touchstart",Tl),Mr(ve,"click",Fg,!0),mt.set(ve,X),ve.getBBox&&ve.ownerSVGElement&&c!==h&&mt.set(ve.ownerSVGElement,{touchAction:i.allowNativeTouchScrolling||i.allowEventDefault?"manipulation":c?"pan-y":"pan-x"}),i.allowContextMenu||Mr(ve,"contextmenu",xc);mm(p,!1)}return WL(t,Ac),N=!0,ca&&Ve!=="soft"&&ca.track(O||t,s?"x,y":o?"rotation":"top,left"),t._gsDragID=fe="d"+ele++,Fh[fe]=f,O&&(O.enable(),O.element._gsDragID=fe),(i.bounds||o)&&Cc(),i.bounds&&f.applyBounds(),f},n.disable=function(Ve){for(var X=f.isDragging,fe=p.length,re;--fe>-1;)dS(p[fe],"cursor",null);if(Ve!=="soft"){for(zL(p,null),fe=p.length;--fe>-1;)re=p[fe],dS(re,"touchCallout",null),Tr(re,"mousedown",Tl),Tr(re,"touchstart",Tl),Tr(re,"click",Fg,!0),Tr(re,"contextmenu",xc);mm(p,!0),Re&&(Tr(Re,"touchcancel",an),Tr(Re,"touchend",an),Tr(Re,"touchmove",Ss)),Tr(L,"mouseup",an),Tr(L,"mousemove",Ss)}return qL(t,Ac),N=!1,ca&&Ve!=="soft"&&(ca.untrack(O||t,s?"x,y":o?"rotation":"top,left"),f.tween&&f.tween.kill()),O&&O.disable(),HL(Ni),f.isDragging=f.isPressed=St=!1,X&&pr(f,"dragend","onDragEnd"),f},n.enabled=function(Ve,X){return arguments.length?Ve?f.enable(X):f.disable(X):N},n.kill=function(){return f.isThrowing=!1,f.tween&&f.tween.kill(),f.disable(),mt.set(p,{clearProps:"userSelect"}),delete Fh[t._gsDragID],f},n.revert=function(){this.kill(),this.styles&&this.styles.revert()},~a.indexOf("scroll")&&(O=n.scrollProxy=new cle(t,rle({onKill:function(){f.isPressed&&an(null)}},i)),t.style.overflowY=h&&!Fw?"auto":"hidden",t.style.overflowX=c&&!Fw?"auto":"hidden",t=O.content),o?v.rotation=1:(c&&(v[l]=1),h&&(v[u]=1)),D.force3D="force3D"in i?i.force3D:!0,e9(FL(n)),n.enable(),n}return e.register=function(i){mt=i,vS()},e.create=function(i,n){return Bw||vS(!0),Fo(i).map(function(a){return new e(a,n)})},e.get=function(i){return Fh[(Fo(i)[0]||{})._gsDragID]},e.timeSinceDrag=function(){return(_o()-VL)/1e3},e.hitTest=function(i,n,a){if(i===n)return!1;var s=zc(i),o=zc(n),l=s.top,u=s.left,c=s.right,h=s.bottom,d=s.width,f=s.height,p=o.left>c||o.right<u||o.top>h||o.bottom<l,v,g,m;return p||!a?!p:(m=(a+"").indexOf("%")!==-1,a=parseFloat(a)||0,v={left:Math.max(u,o.left),top:Math.max(l,o.top)},v.width=Math.min(c,o.right)-v.left,v.height=Math.min(h,o.bottom)-v.top,v.width<0||v.height<0?!1:m?(a*=.01,g=v.width*v.height,g>=d*f*a||g>=o.width*o.height*a):v.width>a&&v.height>a)},e}(hle);nle(ic.prototype,{pointerX:0,pointerY:0,startX:0,startY:0,deltaX:0,deltaY:0,isDragging:!1,isPressed:!1});ic.zIndex=1e3;ic.version="3.12.5";r9()&&mt.registerPlugin(ic);/*! *****************************************************************************
|
||
Copyright (c) Microsoft Corporation.
|
||
|
||
Permission to use, copy, modify, and/or distribute this software for any
|
||
purpose with or without fee is hereby granted.
|
||
|
||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||
PERFORMANCE OF THIS SOFTWARE.
|
||
***************************************************************************** */var Gw=function(r,e){return Gw=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},Gw(r,e)};function j(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Gw(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var fle=function(){function r(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return r}(),dle=function(){function r(){this.browser=new fle,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<"u"}return r}(),et=new dle;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(et.wxa=!0,et.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?et.worker=!0:typeof navigator>"u"||navigator.userAgent.indexOf("Node.js")===0?(et.node=!0,et.svgSupported=!0):ple(navigator.userAgent,et);function ple(r,e){var t=e.browser,i=r.match(/Firefox\/([\d.]+)/),n=r.match(/MSIE\s([\d.]+)/)||r.match(/Trident\/.+?rv:(([\d.]+))/),a=r.match(/Edge?\/([\d.]+)/),s=/micromessenger/i.test(r);i&&(t.firefox=!0,t.version=i[1]),n&&(t.ie=!0,t.version=n[1]),a&&(t.edge=!0,t.version=a[1],t.newEdge=+a[1].split(".")[0]>18),s&&(t.weChat=!0),e.svgSupported=typeof SVGRect<"u",e.touchEventsSupported="ontouchstart"in window&&!t.ie&&!t.edge,e.pointerEventsSupported="onpointerdown"in window&&(t.edge||t.ie&&+t.version>=11),e.domSupported=typeof document<"u";var o=document.documentElement.style;e.transform3dSupported=(t.ie&&"transition"in o||t.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in o)&&!("OTransition"in o),e.transformSupported=e.transform3dSupported||t.ie&&+t.version>=9}var lD=12,s9="sans-serif",al=lD+"px "+s9,vle=20,gle=100,mle="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function yle(r){var e={};if(typeof JSON>"u")return e;for(var t=0;t<r.length;t++){var i=String.fromCharCode(t+32),n=(r.charCodeAt(t)-vle)/gle;e[i]=n}return e}var _le=yle(mle),Aa={createCanvas:function(){return typeof document<"u"&&document.createElement("canvas")},measureText:function(){var r,e;return function(t,i){if(!r){var n=Aa.createCanvas();r=n&&n.getContext("2d")}if(r)return e!==i&&(e=r.font=i||al),r.measureText(t);t=t||"",i=i||al;var a=/((?:\d+)?\.?\d*)px/.exec(i),s=a&&+a[1]||lD,o=0;if(i.indexOf("mono")>=0)o=s*t.length;else for(var l=0;l<t.length;l++){var u=_le[t[l]];o+=u==null?s:u*s}return{width:o}}}(),loadImage:function(r,e,t){var i=new Image;return i.onload=e,i.onerror=t,i.src=r,i}};function o9(r){for(var e in Aa)r[e]&&(Aa[e]=r[e])}var l9=Qn(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(r,e){return r["[object "+e+"]"]=!0,r},{}),u9=Qn(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(r,e){return r["[object "+e+"Array]"]=!0,r},{}),Bf=Object.prototype.toString,g1=Array.prototype,ble=g1.forEach,Sle=g1.filter,uD=g1.slice,Tle=g1.map,YL=(function(){}).constructor,ym=YL?YL.prototype:null,cD="__proto__",xle=2311;function hD(){return xle++}function m1(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];typeof console<"u"&&console.error.apply(console,r)}function Ee(r){if(r==null||typeof r!="object")return r;var e=r,t=Bf.call(r);if(t==="[object Array]"){if(!zh(r)){e=[];for(var i=0,n=r.length;i<n;i++)e[i]=Ee(r[i])}}else if(u9[t]){if(!zh(r)){var a=r.constructor;if(a.from)e=a.from(r);else{e=new a(r.length);for(var i=0,n=r.length;i<n;i++)e[i]=r[i]}}}else if(!l9[t]&&!zh(r)&&!nc(r)){e={};for(var s in r)r.hasOwnProperty(s)&&s!==cD&&(e[s]=Ee(r[s]))}return e}function He(r,e,t){if(!Ae(e)||!Ae(r))return t?Ee(e):r;for(var i in e)if(e.hasOwnProperty(i)&&i!==cD){var n=r[i],a=e[i];Ae(a)&&Ae(n)&&!ie(a)&&!ie(n)&&!nc(a)&&!nc(n)&&!Hw(a)&&!Hw(n)&&!zh(a)&&!zh(n)?He(n,a,t):(t||!(i in r))&&(r[i]=Ee(e[i]))}return r}function y1(r,e){for(var t=r[0],i=1,n=r.length;i<n;i++)t=He(t,r[i],e);return t}function Q(r,e){if(Object.assign)Object.assign(r,e);else for(var t in e)e.hasOwnProperty(t)&&t!==cD&&(r[t]=e[t]);return r}function Ce(r,e,t){for(var i=rt(e),n=0;n<i.length;n++){var a=i[n];(t?e[a]!=null:r[a]==null)&&(r[a]=e[a])}return r}var wle=Aa.createCanvas;function Xe(r,e){if(r){if(r.indexOf)return r.indexOf(e);for(var t=0,i=r.length;t<i;t++)if(r[t]===e)return t}return-1}function fD(r,e){var t=r.prototype;function i(){}i.prototype=e.prototype,r.prototype=new i;for(var n in t)t.hasOwnProperty(n)&&(r.prototype[n]=t[n]);r.prototype.constructor=r,r.superClass=e}function ir(r,e,t){if(r="prototype"in r?r.prototype:r,e="prototype"in e?e.prototype:e,Object.getOwnPropertyNames)for(var i=Object.getOwnPropertyNames(e),n=0;n<i.length;n++){var a=i[n];a!=="constructor"&&(t?e[a]!=null:r[a]==null)&&(r[a]=e[a])}else Ce(r,e,t)}function Jr(r){return!r||typeof r=="string"?!1:typeof r.length=="number"}function R(r,e,t){if(r&&e)if(r.forEach&&r.forEach===ble)r.forEach(e,t);else if(r.length===+r.length)for(var i=0,n=r.length;i<n;i++)e.call(t,r[i],i,r);else for(var a in r)r.hasOwnProperty(a)&&e.call(t,r[a],a,r)}function ae(r,e,t){if(!r)return[];if(!e)return _1(r);if(r.map&&r.map===Tle)return r.map(e,t);for(var i=[],n=0,a=r.length;n<a;n++)i.push(e.call(t,r[n],n,r));return i}function Qn(r,e,t,i){if(r&&e){for(var n=0,a=r.length;n<a;n++)t=e.call(i,t,r[n],n,r);return t}}function _t(r,e,t){if(!r)return[];if(!e)return _1(r);if(r.filter&&r.filter===Sle)return r.filter(e,t);for(var i=[],n=0,a=r.length;n<a;n++)e.call(t,r[n],n,r)&&i.push(r[n]);return i}function c9(r,e,t){if(r&&e){for(var i=0,n=r.length;i<n;i++)if(e.call(t,r[i],i,r))return r[i]}}function rt(r){if(!r)return[];if(Object.keys)return Object.keys(r);var e=[];for(var t in r)r.hasOwnProperty(t)&&e.push(t);return e}function Cle(r,e){for(var t=[],i=2;i<arguments.length;i++)t[i-2]=arguments[i];return function(){return r.apply(e,t.concat(uD.call(arguments)))}}var ge=ym&&xe(ym.bind)?ym.call.bind(ym.bind):Cle;function Be(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return function(){return r.apply(this,e.concat(uD.call(arguments)))}}function ie(r){return Array.isArray?Array.isArray(r):Bf.call(r)==="[object Array]"}function xe(r){return typeof r=="function"}function de(r){return typeof r=="string"}function B0(r){return Bf.call(r)==="[object String]"}function ut(r){return typeof r=="number"}function Ae(r){var e=typeof r;return e==="function"||!!r&&e==="object"}function Hw(r){return!!l9[Bf.call(r)]}function Ri(r){return!!u9[Bf.call(r)]}function nc(r){return typeof r=="object"&&typeof r.nodeType=="number"&&typeof r.ownerDocument=="object"}function dg(r){return r.colorStops!=null}function h9(r){return r.image!=null}function f9(r){return Bf.call(r)==="[object RegExp]"}function gf(r){return r!==r}function Rr(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];for(var t=0,i=r.length;t<i;t++)if(r[t]!=null)return r[t]}function Fe(r,e){return r??e}function Ta(r,e,t){return r??e??t}function _1(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return uD.apply(r,e)}function b1(r){if(typeof r=="number")return[r,r,r,r];var e=r.length;return e===2?[r[0],r[1],r[0],r[1]]:e===3?[r[0],r[1],r[2],r[1]]:r}function fi(r,e){if(!r)throw new Error(e)}function qn(r){return r==null?null:typeof r.trim=="function"?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var d9="__ec_primitive__";function Tv(r){r[d9]=!0}function zh(r){return r[d9]}var Ale=function(){function r(){this.data={}}return r.prototype.delete=function(e){var t=this.has(e);return t&&delete this.data[e],t},r.prototype.has=function(e){return this.data.hasOwnProperty(e)},r.prototype.get=function(e){return this.data[e]},r.prototype.set=function(e,t){return this.data[e]=t,this},r.prototype.keys=function(){return rt(this.data)},r.prototype.forEach=function(e){var t=this.data;for(var i in t)t.hasOwnProperty(i)&&e(t[i],i)},r}(),p9=typeof Map=="function";function Dle(){return p9?new Map:new Ale}var v9=function(){function r(e){var t=ie(e);this.data=Dle();var i=this;e instanceof r?e.each(n):e&&R(e,n);function n(a,s){t?i.set(a,s):i.set(s,a)}}return r.prototype.hasKey=function(e){return this.data.has(e)},r.prototype.get=function(e){return this.data.get(e)},r.prototype.set=function(e,t){return this.data.set(e,t),t},r.prototype.each=function(e,t){this.data.forEach(function(i,n){e.call(t,i,n)})},r.prototype.keys=function(){var e=this.data.keys();return p9?Array.from(e):e},r.prototype.removeKey=function(e){this.data.delete(e)},r}();function be(r){return new v9(r)}function xv(r,e){for(var t=new r.constructor(r.length+e.length),i=0;i<r.length;i++)t[i]=r[i];for(var n=r.length,i=0;i<e.length;i++)t[i+n]=e[i];return t}function pg(r,e){var t;if(Object.create)t=Object.create(r);else{var i=function(){};i.prototype=r,t=new i}return e&&Q(t,e),t}function dD(r){var e=r.style;e.webkitUserSelect="none",e.userSelect="none",e.webkitTapHighlightColor="rgba(0,0,0,0)",e["-webkit-touch-callout"]="none"}function ye(r,e){return r.hasOwnProperty(e)}function tr(){}var zp=180/Math.PI;const Ele=Object.freeze(Object.defineProperty({__proto__:null,HashMap:v9,RADIAN_TO_DEGREE:zp,assert:fi,bind:ge,clone:Ee,concatArray:xv,createCanvas:wle,createHashMap:be,createObject:pg,curry:Be,defaults:Ce,disableUserSelect:dD,each:R,eqNaN:gf,extend:Q,filter:_t,find:c9,guid:hD,hasOwn:ye,indexOf:Xe,inherits:fD,isArray:ie,isArrayLike:Jr,isBuiltInObject:Hw,isDom:nc,isFunction:xe,isGradientObject:dg,isImagePatternObject:h9,isNumber:ut,isObject:Ae,isPrimitive:zh,isRegExp:f9,isString:de,isStringSafe:B0,isTypedArray:Ri,keys:rt,logError:m1,map:ae,merge:He,mergeAll:y1,mixin:ir,noop:tr,normalizeCssArray:b1,reduce:Qn,retrieve:Rr,retrieve2:Fe,retrieve3:Ta,setAsPrimitive:Tv,slice:_1,trim:qn},Symbol.toStringTag,{value:"Module"}));function pl(r,e){return r==null&&(r=0),e==null&&(e=0),[r,e]}function ni(r,e){return r[0]=e[0],r[1]=e[1],r}function ss(r){return[r[0],r[1]]}function g9(r,e,t){return r[0]=e,r[1]=t,r}function $w(r,e,t){return r[0]=e[0]+t[0],r[1]=e[1]+t[1],r}function F0(r,e,t,i){return r[0]=e[0]+t[0]*i,r[1]=e[1]+t[1]*i,r}function Uo(r,e,t){return r[0]=e[0]-t[0],r[1]=e[1]-t[1],r}function wv(r){return Math.sqrt(pD(r))}var Ile=wv;function pD(r){return r[0]*r[0]+r[1]*r[1]}var Ple=pD;function Mle(r,e,t){return r[0]=e[0]*t[0],r[1]=e[1]*t[1],r}function Lle(r,e,t){return r[0]=e[0]/t[0],r[1]=e[1]/t[1],r}function kle(r,e){return r[0]*e[0]+r[1]*e[1]}function Gp(r,e,t){return r[0]=e[0]*t,r[1]=e[1]*t,r}function vc(r,e){var t=wv(e);return t===0?(r[0]=0,r[1]=0):(r[0]=e[0]/t,r[1]=e[1]/t),r}function U0(r,e){return Math.sqrt((r[0]-e[0])*(r[0]-e[0])+(r[1]-e[1])*(r[1]-e[1]))}var Bs=U0;function m9(r,e){return(r[0]-e[0])*(r[0]-e[0])+(r[1]-e[1])*(r[1]-e[1])}var Xo=m9;function Rle(r,e){return r[0]=-e[0],r[1]=-e[1],r}function Hp(r,e,t,i){return r[0]=e[0]+i*(t[0]-e[0]),r[1]=e[1]+i*(t[1]-e[1]),r}function $r(r,e,t){var i=e[0],n=e[1];return r[0]=t[0]*i+t[2]*n+t[4],r[1]=t[1]*i+t[3]*n+t[5],r}function Fs(r,e,t){return r[0]=Math.min(e[0],t[0]),r[1]=Math.min(e[1],t[1]),r}function Us(r,e,t){return r[0]=Math.max(e[0],t[0]),r[1]=Math.max(e[1],t[1]),r}const Ole=Object.freeze(Object.defineProperty({__proto__:null,add:$w,applyTransform:$r,clone:ss,copy:ni,create:pl,dist:Bs,distSquare:Xo,distance:U0,distanceSquare:m9,div:Lle,dot:kle,len:wv,lenSquare:pD,length:Ile,lengthSquare:Ple,lerp:Hp,max:Us,min:Fs,mul:Mle,negate:Rle,normalize:vc,scale:Gp,scaleAndAdd:F0,set:g9,sub:Uo},Symbol.toStringTag,{value:"Module"}));var Gc=function(){function r(e,t){this.target=e,this.topTarget=t&&t.topTarget}return r}(),Nle=function(){function r(e){this.handler=e,e.on("mousedown",this._dragStart,this),e.on("mousemove",this._drag,this),e.on("mouseup",this._dragEnd,this)}return r.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new Gc(t,e),"dragstart",e.event))},r.prototype._drag=function(e){var t=this._draggingTarget;if(t){var i=e.offsetX,n=e.offsetY,a=i-this._x,s=n-this._y;this._x=i,this._y=n,t.drift(a,s,e),this.handler.dispatchToElement(new Gc(t,e),"drag",e.event);var o=this.handler.findHover(i,n,t).target,l=this._dropTarget;this._dropTarget=o,t!==o&&(l&&o!==l&&this.handler.dispatchToElement(new Gc(l,e),"dragleave",e.event),o&&o!==l&&this.handler.dispatchToElement(new Gc(o,e),"dragenter",e.event))}},r.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new Gc(t,e),"dragend",e.event),this._dropTarget&&this.handler.dispatchToElement(new Gc(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null},r}(),ta=function(){function r(e){e&&(this._$eventProcessor=e)}return r.prototype.on=function(e,t,i,n){this._$handlers||(this._$handlers={});var a=this._$handlers;if(typeof t=="function"&&(n=i,i=t,t=null),!i||!e)return this;var s=this._$eventProcessor;t!=null&&s&&s.normalizeQuery&&(t=s.normalizeQuery(t)),a[e]||(a[e]=[]);for(var o=0;o<a[e].length;o++)if(a[e][o].h===i)return this;var l={h:i,query:t,ctx:n||this,callAtLast:i.zrEventfulCallAtLast},u=a[e].length-1,c=a[e][u];return c&&c.callAtLast?a[e].splice(u,0,l):a[e].push(l),this},r.prototype.isSilent=function(e){var t=this._$handlers;return!t||!t[e]||!t[e].length},r.prototype.off=function(e,t){var i=this._$handlers;if(!i)return this;if(!e)return this._$handlers={},this;if(t){if(i[e]){for(var n=[],a=0,s=i[e].length;a<s;a++)i[e][a].h!==t&&n.push(i[e][a]);i[e]=n}i[e]&&i[e].length===0&&delete i[e]}else delete i[e];return this},r.prototype.trigger=function(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];if(!this._$handlers)return this;var n=this._$handlers[e],a=this._$eventProcessor;if(n)for(var s=t.length,o=n.length,l=0;l<o;l++){var u=n[l];if(!(a&&a.filter&&u.query!=null&&!a.filter(e,u.query)))switch(s){case 0:u.h.call(u.ctx);break;case 1:u.h.call(u.ctx,t[0]);break;case 2:u.h.call(u.ctx,t[0],t[1]);break;default:u.h.apply(u.ctx,t);break}}return a&&a.afterTrigger&&a.afterTrigger(e),this},r.prototype.triggerWithContext=function(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];if(!this._$handlers)return this;var n=this._$handlers[e],a=this._$eventProcessor;if(n)for(var s=t.length,o=t[s-1],l=n.length,u=0;u<l;u++){var c=n[u];if(!(a&&a.filter&&c.query!=null&&!a.filter(e,c.query)))switch(s){case 0:c.h.call(o);break;case 1:c.h.call(o,t[0]);break;case 2:c.h.call(o,t[0],t[1]);break;default:c.h.apply(o,t.slice(1,s-1));break}}return a&&a.afterTrigger&&a.afterTrigger(e),this},r}(),Ble=Math.log(2);function Ww(r,e,t,i,n,a){var s=i+"-"+n,o=r.length;if(a.hasOwnProperty(s))return a[s];if(e===1){var l=Math.round(Math.log((1<<o)-1&~n)/Ble);return r[t][l]}for(var u=i|1<<t,c=t+1;i&1<<c;)c++;for(var h=0,d=0,f=0;d<o;d++){var p=1<<d;p&n||(h+=(f%2?-1:1)*r[t][d]*Ww(r,e-1,c,u,n|p,a),f++)}return a[s]=h,h}function KL(r,e){var t=[[r[0],r[1],1,0,0,0,-e[0]*r[0],-e[0]*r[1]],[0,0,0,r[0],r[1],1,-e[1]*r[0],-e[1]*r[1]],[r[2],r[3],1,0,0,0,-e[2]*r[2],-e[2]*r[3]],[0,0,0,r[2],r[3],1,-e[3]*r[2],-e[3]*r[3]],[r[4],r[5],1,0,0,0,-e[4]*r[4],-e[4]*r[5]],[0,0,0,r[4],r[5],1,-e[5]*r[4],-e[5]*r[5]],[r[6],r[7],1,0,0,0,-e[6]*r[6],-e[6]*r[7]],[0,0,0,r[6],r[7],1,-e[7]*r[6],-e[7]*r[7]]],i={},n=Ww(t,8,0,0,0,i);if(n!==0){for(var a=[],s=0;s<8;s++)for(var o=0;o<8;o++)a[o]==null&&(a[o]=0),a[o]+=((s+o)%2?-1:1)*Ww(t,7,s===0?1:0,1<<s,1<<o,i)/n*e[s];return function(l,u,c){var h=u*a[6]+c*a[7]+1;l[0]=(u*a[0]+c*a[1]+a[2])/h,l[1]=(u*a[3]+c*a[4]+a[5])/h}}}var ZL="___zrEVENTSAVED",gS=[];function Fle(r,e,t,i,n){return qw(gS,e,i,n,!0)&&qw(r,t,gS[0],gS[1])}function qw(r,e,t,i,n){if(e.getBoundingClientRect&&et.domSupported&&!y9(e)){var a=e[ZL]||(e[ZL]={}),s=Ule(e,a),o=Vle(s,a,n);if(o)return o(r,t,i),!0}return!1}function Ule(r,e){var t=e.markers;if(t)return t;t=e.markers=[];for(var i=["left","right"],n=["top","bottom"],a=0;a<4;a++){var s=document.createElement("div"),o=s.style,l=a%2,u=(a>>1)%2;o.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[l]+":0",n[u]+":0",i[1-l]+":auto",n[1-u]+":auto",""].join("!important;"),r.appendChild(s),t.push(s)}return t}function Vle(r,e,t){for(var i=t?"invTrans":"trans",n=e[i],a=e.srcCoords,s=[],o=[],l=!0,u=0;u<4;u++){var c=r[u].getBoundingClientRect(),h=2*u,d=c.left,f=c.top;s.push(d,f),l=l&&a&&d===a[h]&&f===a[h+1],o.push(r[u].offsetLeft,r[u].offsetTop)}return l&&n?n:(e.srcCoords=s,e[i]=t?KL(o,s):KL(s,o))}function y9(r){return r.nodeName.toUpperCase()==="CANVAS"}var zle=/([&<>"'])/g,Gle={"&":"&","<":"<",">":">",'"':""","'":"'"};function Di(r){return r==null?"":(r+"").replace(zle,function(e,t){return Gle[t]})}var Hle=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,mS=[],$le=et.browser.firefox&&+et.browser.version.split(".")[0]<39;function jw(r,e,t,i){return t=t||{},i?QL(r,e,t):$le&&e.layerX!=null&&e.layerX!==e.offsetX?(t.zrX=e.layerX,t.zrY=e.layerY):e.offsetX!=null?(t.zrX=e.offsetX,t.zrY=e.offsetY):QL(r,e,t),t}function QL(r,e,t){if(et.domSupported&&r.getBoundingClientRect){var i=e.clientX,n=e.clientY;if(y9(r)){var a=r.getBoundingClientRect();t.zrX=i-a.left,t.zrY=n-a.top;return}else if(qw(mS,r,i,n)){t.zrX=mS[0],t.zrY=mS[1];return}}t.zrX=t.zrY=0}function vD(r){return r||window.event}function Bn(r,e,t){if(e=vD(e),e.zrX!=null)return e;var i=e.type,n=i&&i.indexOf("touch")>=0;if(n){var s=i!=="touchend"?e.targetTouches[0]:e.changedTouches[0];s&&jw(r,s,e,t)}else{jw(r,e,e,t);var a=Wle(e);e.zrDelta=a?a/120:-(e.detail||0)/3}var o=e.button;return e.which==null&&o!==void 0&&Hle.test(e.type)&&(e.which=o&1?1:o&2?3:o&4?2:0),e}function Wle(r){var e=r.wheelDelta;if(e)return e;var t=r.deltaX,i=r.deltaY;if(t==null||i==null)return e;var n=Math.abs(i!==0?i:t),a=i>0?-1:i<0?1:t>0?-1:1;return 3*n*a}function Xw(r,e,t,i){r.addEventListener(e,t,i)}function qle(r,e,t,i){r.removeEventListener(e,t,i)}var Qs=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0};function JL(r){return r.which===2||r.which===3}var jle=function(){function r(){this._track=[]}return r.prototype.recognize=function(e,t,i){return this._doTrack(e,t,i),this._recognize(e)},r.prototype.clear=function(){return this._track.length=0,this},r.prototype._doTrack=function(e,t,i){var n=e.touches;if(n){for(var a={points:[],touches:[],target:t,event:e},s=0,o=n.length;s<o;s++){var l=n[s],u=jw(i,l,{});a.points.push([u.zrX,u.zrY]),a.touches.push(l)}this._track.push(a)}},r.prototype._recognize=function(e){for(var t in yS)if(yS.hasOwnProperty(t)){var i=yS[t](this._track,e);if(i)return i}},r}();function ek(r){var e=r[1][0]-r[0][0],t=r[1][1]-r[0][1];return Math.sqrt(e*e+t*t)}function Xle(r){return[(r[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2]}var yS={pinch:function(r,e){var t=r.length;if(t){var i=(r[t-1]||{}).points,n=(r[t-2]||{}).points||i;if(n&&n.length>1&&i&&i.length>1){var a=ek(i)/ek(n);!isFinite(a)&&(a=1),e.pinchScale=a;var s=Xle(i);return e.pinchX=s[0],e.pinchY=s[1],{type:"pinch",target:r[0].target,event:e}}}}};function Ji(){return[1,0,0,1,0,0]}function vg(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r}function S1(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4],r[5]=e[5],r}function os(r,e,t){var i=e[0]*t[0]+e[2]*t[1],n=e[1]*t[0]+e[3]*t[1],a=e[0]*t[2]+e[2]*t[3],s=e[1]*t[2]+e[3]*t[3],o=e[0]*t[4]+e[2]*t[5]+e[4],l=e[1]*t[4]+e[3]*t[5]+e[5];return r[0]=i,r[1]=n,r[2]=a,r[3]=s,r[4]=o,r[5]=l,r}function Da(r,e,t){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4]+t[0],r[5]=e[5]+t[1],r}function vl(r,e,t,i){i===void 0&&(i=[0,0]);var n=e[0],a=e[2],s=e[4],o=e[1],l=e[3],u=e[5],c=Math.sin(t),h=Math.cos(t);return r[0]=n*h+o*c,r[1]=-n*c+o*h,r[2]=a*h+l*c,r[3]=-a*c+h*l,r[4]=h*(s-i[0])+c*(u-i[1])+i[0],r[5]=h*(u-i[1])-c*(s-i[0])+i[1],r}function T1(r,e,t){var i=t[0],n=t[1];return r[0]=e[0]*i,r[1]=e[1]*n,r[2]=e[2]*i,r[3]=e[3]*n,r[4]=e[4]*i,r[5]=e[5]*n,r}function gc(r,e){var t=e[0],i=e[2],n=e[4],a=e[1],s=e[3],o=e[5],l=t*s-a*i;return l?(l=1/l,r[0]=s*l,r[1]=-a*l,r[2]=-i*l,r[3]=t*l,r[4]=(i*o-s*n)*l,r[5]=(a*n-t*o)*l,r):null}function _9(r){var e=Ji();return S1(e,r),e}const Yle=Object.freeze(Object.defineProperty({__proto__:null,clone:_9,copy:S1,create:Ji,identity:vg,invert:gc,mul:os,rotate:vl,scale:T1,translate:Da},Symbol.toStringTag,{value:"Module"}));var $e=function(){function r(e,t){this.x=e||0,this.y=t||0}return r.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},r.prototype.clone=function(){return new r(this.x,this.y)},r.prototype.set=function(e,t){return this.x=e,this.y=t,this},r.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},r.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},r.prototype.scale=function(e){this.x*=e,this.y*=e},r.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},r.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},r.prototype.dot=function(e){return this.x*e.x+this.y*e.y},r.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},r.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},r.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},r.prototype.distance=function(e){var t=this.x-e.x,i=this.y-e.y;return Math.sqrt(t*t+i*i)},r.prototype.distanceSquare=function(e){var t=this.x-e.x,i=this.y-e.y;return t*t+i*i},r.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},r.prototype.transform=function(e){if(e){var t=this.x,i=this.y;return this.x=e[0]*t+e[2]*i+e[4],this.y=e[1]*t+e[3]*i+e[5],this}},r.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},r.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},r.set=function(e,t,i){e.x=t,e.y=i},r.copy=function(e,t){e.x=t.x,e.y=t.y},r.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},r.lenSquare=function(e){return e.x*e.x+e.y*e.y},r.dot=function(e,t){return e.x*t.x+e.y*t.y},r.add=function(e,t,i){e.x=t.x+i.x,e.y=t.y+i.y},r.sub=function(e,t,i){e.x=t.x-i.x,e.y=t.y-i.y},r.scale=function(e,t,i){e.x=t.x*i,e.y=t.y*i},r.scaleAndAdd=function(e,t,i,n){e.x=t.x+i.x*n,e.y=t.y+i.y*n},r.lerp=function(e,t,i,n){var a=1-n;e.x=a*t.x+n*i.x,e.y=a*t.y+n*i.y},r}(),_m=Math.min,bm=Math.max,Rl=new $e,Ol=new $e,Nl=new $e,Bl=new $e,Dd=new $e,Ed=new $e,We=function(){function r(e,t,i,n){i<0&&(e=e+i,i=-i),n<0&&(t=t+n,n=-n),this.x=e,this.y=t,this.width=i,this.height=n}return r.prototype.union=function(e){var t=_m(e.x,this.x),i=_m(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=bm(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=bm(e.y+e.height,this.y+this.height)-i:this.height=e.height,this.x=t,this.y=i},r.prototype.applyTransform=function(e){r.applyTransform(this,this,e)},r.prototype.calculateTransform=function(e){var t=this,i=e.width/t.width,n=e.height/t.height,a=Ji();return Da(a,a,[-t.x,-t.y]),T1(a,a,[i,n]),Da(a,a,[e.x,e.y]),a},r.prototype.intersect=function(e,t){if(!e)return!1;e instanceof r||(e=r.create(e));var i=this,n=i.x,a=i.x+i.width,s=i.y,o=i.y+i.height,l=e.x,u=e.x+e.width,c=e.y,h=e.y+e.height,d=!(a<l||u<n||o<c||h<s);if(t){var f=1/0,p=0,v=Math.abs(a-l),g=Math.abs(u-n),m=Math.abs(o-c),y=Math.abs(h-s),_=Math.min(v,g),b=Math.min(m,y);a<l||u<n?_>p&&(p=_,v<g?$e.set(Ed,-v,0):$e.set(Ed,g,0)):_<f&&(f=_,v<g?$e.set(Dd,v,0):$e.set(Dd,-g,0)),o<c||h<s?b>p&&(p=b,m<y?$e.set(Ed,0,-m):$e.set(Ed,0,y)):_<f&&(f=_,m<y?$e.set(Dd,0,m):$e.set(Dd,0,-y))}return t&&$e.copy(t,d?Dd:Ed),d},r.prototype.contain=function(e,t){var i=this;return e>=i.x&&e<=i.x+i.width&&t>=i.y&&t<=i.y+i.height},r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copy=function(e){r.copy(this,e)},r.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},r.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},r.prototype.isZero=function(){return this.width===0||this.height===0},r.create=function(e){return new r(e.x,e.y,e.width,e.height)},r.copy=function(e,t){e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height},r.applyTransform=function(e,t,i){if(!i){e!==t&&r.copy(e,t);return}if(i[1]<1e-5&&i[1]>-1e-5&&i[2]<1e-5&&i[2]>-1e-5){var n=i[0],a=i[3],s=i[4],o=i[5];e.x=t.x*n+s,e.y=t.y*a+o,e.width=t.width*n,e.height=t.height*a,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}Rl.x=Nl.x=t.x,Rl.y=Bl.y=t.y,Ol.x=Bl.x=t.x+t.width,Ol.y=Nl.y=t.y+t.height,Rl.transform(i),Bl.transform(i),Ol.transform(i),Nl.transform(i),e.x=_m(Rl.x,Ol.x,Nl.x,Bl.x),e.y=_m(Rl.y,Ol.y,Nl.y,Bl.y);var l=bm(Rl.x,Ol.x,Nl.x,Bl.x),u=bm(Rl.y,Ol.y,Nl.y,Bl.y);e.width=l-e.x,e.height=u-e.y},r}(),b9="silent";function Kle(r,e,t){return{type:r,event:t,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:t.zrX,offsetY:t.zrY,gestureEvent:t.gestureEvent,pinchX:t.pinchX,pinchY:t.pinchY,pinchScale:t.pinchScale,wheelDelta:t.zrDelta,zrByTouch:t.zrByTouch,which:t.which,stop:Zle}}function Zle(){Qs(this.event)}var Qle=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.handler=null,t}return e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e}(ta),Id=function(){function r(e,t){this.x=e,this.y=t}return r}(),Jle=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],_S=new We(0,0,0,0),S9=function(r){j(e,r);function e(t,i,n,a,s){var o=r.call(this)||this;return o._hovered=new Id(0,0),o.storage=t,o.painter=i,o.painterRoot=a,o._pointerSize=s,n=n||new Qle,o.proxy=null,o.setHandlerProxy(n),o._draggingMgr=new Nle(o),o}return e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(R(Jle,function(i){t.on&&t.on(i,this[i],this)},this),t.handler=this),this.proxy=t},e.prototype.mousemove=function(t){var i=t.zrX,n=t.zrY,a=T9(this,i,n),s=this._hovered,o=s.target;o&&!o.__zr&&(s=this.findHover(s.x,s.y),o=s.target);var l=this._hovered=a?new Id(i,n):this.findHover(i,n),u=l.target,c=this.proxy;c.setCursor&&c.setCursor(u?u.cursor:"default"),o&&u!==o&&this.dispatchToElement(s,"mouseout",t),this.dispatchToElement(l,"mousemove",t),u&&u!==o&&this.dispatchToElement(l,"mouseover",t)},e.prototype.mouseout=function(t){var i=t.zrEventControl;i!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",t),i!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new Id(0,0)},e.prototype.dispatch=function(t,i){var n=this[t];n&&n.call(this,i)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(t){var i=this.proxy;i.setCursor&&i.setCursor(t)},e.prototype.dispatchToElement=function(t,i,n){t=t||{};var a=t.target;if(!(a&&a.silent)){for(var s="on"+i,o=Kle(i,t,n);a&&(a[s]&&(o.cancelBubble=!!a[s].call(a,o)),a.trigger(i,o),a=a.__hostTarget?a.__hostTarget:a.parent,!o.cancelBubble););o.cancelBubble||(this.trigger(i,o),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[s]=="function"&&l[s].call(l,o),l.trigger&&l.trigger(i,o)}))}},e.prototype.findHover=function(t,i,n){var a=this.storage.getDisplayList(),s=new Id(t,i);if(tk(a,s,t,i,n),this._pointerSize&&!s.target){for(var o=[],l=this._pointerSize,u=l/2,c=new We(t-u,i-u,l,l),h=a.length-1;h>=0;h--){var d=a[h];d!==n&&!d.ignore&&!d.ignoreCoarsePointer&&(!d.parent||!d.parent.ignoreCoarsePointer)&&(_S.copy(d.getBoundingRect()),d.transform&&_S.applyTransform(d.transform),_S.intersect(c)&&o.push(d))}if(o.length)for(var f=4,p=Math.PI/12,v=Math.PI*2,g=0;g<u;g+=f)for(var m=0;m<v;m+=p){var y=t+g*Math.cos(m),_=i+g*Math.sin(m);if(tk(o,s,y,_,n),s.target)return s}}return s},e.prototype.processGesture=function(t,i){this._gestureMgr||(this._gestureMgr=new jle);var n=this._gestureMgr;i==="start"&&n.clear();var a=n.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if(i==="end"&&n.clear(),a){var s=a.type;t.gestureEvent=s;var o=new Id;o.target=a.target,this.dispatchToElement(o,s,a.event)}},e}(ta);R(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(r){S9.prototype[r]=function(e){var t=e.zrX,i=e.zrY,n=T9(this,t,i),a,s;if((r!=="mouseup"||!n)&&(a=this.findHover(t,i),s=a.target),r==="mousedown")this._downEl=s,this._downPoint=[e.zrX,e.zrY],this._upEl=s;else if(r==="mouseup")this._upEl=s;else if(r==="click"){if(this._downEl!==this._upEl||!this._downPoint||Bs(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,r,e)}});function eue(r,e,t){if(r[r.rectHover?"rectContain":"contain"](e,t)){for(var i=r,n=void 0,a=!1;i;){if(i.ignoreClip&&(a=!0),!a){var s=i.getClipPath();if(s&&!s.contain(e,t))return!1}i.silent&&(n=!0);var o=i.__hostTarget;i=o||i.parent}return n?b9:!0}return!1}function tk(r,e,t,i,n){for(var a=r.length-1;a>=0;a--){var s=r[a],o=void 0;if(s!==n&&!s.ignore&&(o=eue(s,t,i))&&(!e.topTarget&&(e.topTarget=s),o!==b9)){e.target=s;break}}}function T9(r,e,t){var i=r.painter;return e<0||e>i.getWidth()||t<0||t>i.getHeight()}var x9=32,Pd=7;function tue(r){for(var e=0;r>=x9;)e|=r&1,r>>=1;return r+e}function rk(r,e,t,i){var n=e+1;if(n===t)return 1;if(i(r[n++],r[e])<0){for(;n<t&&i(r[n],r[n-1])<0;)n++;rue(r,e,n)}else for(;n<t&&i(r[n],r[n-1])>=0;)n++;return n-e}function rue(r,e,t){for(t--;e<t;){var i=r[e];r[e++]=r[t],r[t--]=i}}function ik(r,e,t,i,n){for(i===e&&i++;i<t;i++){for(var a=r[i],s=e,o=i,l;s<o;)l=s+o>>>1,n(a,r[l])<0?o=l:s=l+1;var u=i-s;switch(u){case 3:r[s+3]=r[s+2];case 2:r[s+2]=r[s+1];case 1:r[s+1]=r[s];break;default:for(;u>0;)r[s+u]=r[s+u-1],u--}r[s]=a}}function bS(r,e,t,i,n,a){var s=0,o=0,l=1;if(a(r,e[t+n])>0){for(o=i-n;l<o&&a(r,e[t+n+l])>0;)s=l,l=(l<<1)+1,l<=0&&(l=o);l>o&&(l=o),s+=n,l+=n}else{for(o=n+1;l<o&&a(r,e[t+n-l])<=0;)s=l,l=(l<<1)+1,l<=0&&(l=o);l>o&&(l=o);var u=s;s=n-l,l=n-u}for(s++;s<l;){var c=s+(l-s>>>1);a(r,e[t+c])>0?s=c+1:l=c}return l}function SS(r,e,t,i,n,a){var s=0,o=0,l=1;if(a(r,e[t+n])<0){for(o=n+1;l<o&&a(r,e[t+n-l])<0;)s=l,l=(l<<1)+1,l<=0&&(l=o);l>o&&(l=o);var u=s;s=n-l,l=n-u}else{for(o=i-n;l<o&&a(r,e[t+n+l])>=0;)s=l,l=(l<<1)+1,l<=0&&(l=o);l>o&&(l=o),s+=n,l+=n}for(s++;s<l;){var c=s+(l-s>>>1);a(r,e[t+c])<0?l=c:s=c+1}return l}function iue(r,e){var t=Pd,i,n,a=0,s=[];i=[],n=[];function o(f,p){i[a]=f,n[a]=p,a+=1}function l(){for(;a>1;){var f=a-2;if(f>=1&&n[f-1]<=n[f]+n[f+1]||f>=2&&n[f-2]<=n[f]+n[f-1])n[f-1]<n[f+1]&&f--;else if(n[f]>n[f+1])break;c(f)}}function u(){for(;a>1;){var f=a-2;f>0&&n[f-1]<n[f+1]&&f--,c(f)}}function c(f){var p=i[f],v=n[f],g=i[f+1],m=n[f+1];n[f]=v+m,f===a-3&&(i[f+1]=i[f+2],n[f+1]=n[f+2]),a--;var y=SS(r[g],r,p,v,0,e);p+=y,v-=y,v!==0&&(m=bS(r[p+v-1],r,g,m,m-1,e),m!==0&&(v<=m?h(p,v,g,m):d(p,v,g,m)))}function h(f,p,v,g){var m=0;for(m=0;m<p;m++)s[m]=r[f+m];var y=0,_=v,b=f;if(r[b++]=r[_++],--g===0){for(m=0;m<p;m++)r[b+m]=s[y+m];return}if(p===1){for(m=0;m<g;m++)r[b+m]=r[_+m];r[b+g]=s[y];return}for(var T=t,x,C,D;;){x=0,C=0,D=!1;do if(e(r[_],s[y])<0){if(r[b++]=r[_++],C++,x=0,--g===0){D=!0;break}}else if(r[b++]=s[y++],x++,C=0,--p===1){D=!0;break}while((x|C)<T);if(D)break;do{if(x=SS(r[_],s,y,p,0,e),x!==0){for(m=0;m<x;m++)r[b+m]=s[y+m];if(b+=x,y+=x,p-=x,p<=1){D=!0;break}}if(r[b++]=r[_++],--g===0){D=!0;break}if(C=bS(s[y],r,_,g,0,e),C!==0){for(m=0;m<C;m++)r[b+m]=r[_+m];if(b+=C,_+=C,g-=C,g===0){D=!0;break}}if(r[b++]=s[y++],--p===1){D=!0;break}T--}while(x>=Pd||C>=Pd);if(D)break;T<0&&(T=0),T+=2}if(t=T,t<1&&(t=1),p===1){for(m=0;m<g;m++)r[b+m]=r[_+m];r[b+g]=s[y]}else{if(p===0)throw new Error;for(m=0;m<p;m++)r[b+m]=s[y+m]}}function d(f,p,v,g){var m=0;for(m=0;m<g;m++)s[m]=r[v+m];var y=f+p-1,_=g-1,b=v+g-1,T=0,x=0;if(r[b--]=r[y--],--p===0){for(T=b-(g-1),m=0;m<g;m++)r[T+m]=s[m];return}if(g===1){for(b-=p,y-=p,x=b+1,T=y+1,m=p-1;m>=0;m--)r[x+m]=r[T+m];r[b]=s[_];return}for(var C=t;;){var D=0,I=0,M=!1;do if(e(s[_],r[y])<0){if(r[b--]=r[y--],D++,I=0,--p===0){M=!0;break}}else if(r[b--]=s[_--],I++,D=0,--g===1){M=!0;break}while((D|I)<C);if(M)break;do{if(D=p-SS(s[_],r,f,p,p-1,e),D!==0){for(b-=D,y-=D,p-=D,x=b+1,T=y+1,m=D-1;m>=0;m--)r[x+m]=r[T+m];if(p===0){M=!0;break}}if(r[b--]=s[_--],--g===1){M=!0;break}if(I=g-bS(r[y],s,0,g,g-1,e),I!==0){for(b-=I,_-=I,g-=I,x=b+1,T=_+1,m=0;m<I;m++)r[x+m]=s[T+m];if(g<=1){M=!0;break}}if(r[b--]=r[y--],--p===0){M=!0;break}C--}while(D>=Pd||I>=Pd);if(M)break;C<0&&(C=0),C+=2}if(t=C,t<1&&(t=1),g===1){for(b-=p,y-=p,x=b+1,T=y+1,m=p-1;m>=0;m--)r[x+m]=r[T+m];r[b]=s[_]}else{if(g===0)throw new Error;for(T=b-(g-1),m=0;m<g;m++)r[T+m]=s[m]}}return{mergeRuns:l,forceMergeRuns:u,pushRun:o}}function Ly(r,e,t,i){t||(t=0),i||(i=r.length);var n=i-t;if(!(n<2)){var a=0;if(n<x9){a=rk(r,t,i,e),ik(r,t,i,t+a,e);return}var s=iue(r,e),o=tue(n);do{if(a=rk(r,t,i,e),a<o){var l=n;l>o&&(l=o),ik(r,t,t+l,t+a,e),a=l}s.pushRun(t,a),s.mergeRuns(),n-=a,t+=a}while(n!==0);s.forceMergeRuns()}}var pn=1,vp=2,fh=4,nk=!1;function TS(){nk||(nk=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function ak(r,e){return r.zlevel===e.zlevel?r.z===e.z?r.z2-e.z2:r.z-e.z:r.zlevel-e.zlevel}var nue=function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=ak}return r.prototype.traverse=function(e,t){for(var i=0;i<this._roots.length;i++)this._roots[i].traverse(e,t)},r.prototype.getDisplayList=function(e,t){t=t||!1;var i=this._displayList;return(e||!i.length)&&this.updateDisplayList(t),i},r.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var t=this._roots,i=this._displayList,n=0,a=t.length;n<a;n++)this._updateAndAddDisplayable(t[n],null,e);i.length=this._displayListLen,Ly(i,ak)},r.prototype._updateAndAddDisplayable=function(e,t,i){if(!(e.ignore&&!i)){e.beforeUpdate(),e.update(),e.afterUpdate();var n=e.getClipPath();if(e.ignoreClip)t=null;else if(n){t?t=t.slice():t=[];for(var a=n,s=e;a;)a.parent=s,a.updateTransform(),t.push(a),s=a,a=a.getClipPath()}if(e.childrenRef){for(var o=e.childrenRef(),l=0;l<o.length;l++){var u=o[l];e.__dirty&&(u.__dirty|=pn),this._updateAndAddDisplayable(u,t,i)}e.__dirty=0}else{var c=e;t&&t.length?c.__clipPaths=t:c.__clipPaths&&c.__clipPaths.length>0&&(c.__clipPaths=[]),isNaN(c.z)&&(TS(),c.z=0),isNaN(c.z2)&&(TS(),c.z2=0),isNaN(c.zlevel)&&(TS(),c.zlevel=0),this._displayList[this._displayListLen++]=c}var h=e.getDecalElement&&e.getDecalElement();h&&this._updateAndAddDisplayable(h,t,i);var d=e.getTextGuideLine();d&&this._updateAndAddDisplayable(d,t,i);var f=e.getTextContent();f&&this._updateAndAddDisplayable(f,t,i)}},r.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},r.prototype.delRoot=function(e){if(e instanceof Array){for(var t=0,i=e.length;t<i;t++)this.delRoot(e[t]);return}var n=Xe(this._roots,e);n>=0&&this._roots.splice(n,1)},r.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},r.prototype.getRoots=function(){return this._roots},r.prototype.dispose=function(){this._displayList=null,this._roots=null},r}(),V0;V0=et.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(r){return setTimeout(r,16)};var $p={linear:function(r){return r},quadraticIn:function(r){return r*r},quadraticOut:function(r){return r*(2-r)},quadraticInOut:function(r){return(r*=2)<1?.5*r*r:-.5*(--r*(r-2)-1)},cubicIn:function(r){return r*r*r},cubicOut:function(r){return--r*r*r+1},cubicInOut:function(r){return(r*=2)<1?.5*r*r*r:.5*((r-=2)*r*r+2)},quarticIn:function(r){return r*r*r*r},quarticOut:function(r){return 1- --r*r*r*r},quarticInOut:function(r){return(r*=2)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2)},quinticIn:function(r){return r*r*r*r*r},quinticOut:function(r){return--r*r*r*r*r+1},quinticInOut:function(r){return(r*=2)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2)},sinusoidalIn:function(r){return 1-Math.cos(r*Math.PI/2)},sinusoidalOut:function(r){return Math.sin(r*Math.PI/2)},sinusoidalInOut:function(r){return .5*(1-Math.cos(Math.PI*r))},exponentialIn:function(r){return r===0?0:Math.pow(1024,r-1)},exponentialOut:function(r){return r===1?1:1-Math.pow(2,-10*r)},exponentialInOut:function(r){return r===0?0:r===1?1:(r*=2)<1?.5*Math.pow(1024,r-1):.5*(-Math.pow(2,-10*(r-1))+2)},circularIn:function(r){return 1-Math.sqrt(1-r*r)},circularOut:function(r){return Math.sqrt(1- --r*r)},circularInOut:function(r){return(r*=2)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1)},elasticIn:function(r){var e,t=.1,i=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=i/4):e=i*Math.asin(1/t)/(2*Math.PI),-(t*Math.pow(2,10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/i)))},elasticOut:function(r){var e,t=.1,i=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=i/4):e=i*Math.asin(1/t)/(2*Math.PI),t*Math.pow(2,-10*r)*Math.sin((r-e)*(2*Math.PI)/i)+1)},elasticInOut:function(r){var e,t=.1,i=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=i/4):e=i*Math.asin(1/t)/(2*Math.PI),(r*=2)<1?-.5*(t*Math.pow(2,10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/i)):t*Math.pow(2,-10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/i)*.5+1)},backIn:function(r){var e=1.70158;return r*r*((e+1)*r-e)},backOut:function(r){var e=1.70158;return--r*r*((e+1)*r+e)+1},backInOut:function(r){var e=2.5949095;return(r*=2)<1?.5*(r*r*((e+1)*r-e)):.5*((r-=2)*r*((e+1)*r+e)+2)},bounceIn:function(r){return 1-$p.bounceOut(1-r)},bounceOut:function(r){return r<1/2.75?7.5625*r*r:r<2/2.75?7.5625*(r-=1.5/2.75)*r+.75:r<2.5/2.75?7.5625*(r-=2.25/2.75)*r+.9375:7.5625*(r-=2.625/2.75)*r+.984375},bounceInOut:function(r){return r<.5?$p.bounceIn(r*2)*.5:$p.bounceOut(r*2-1)*.5+.5}},Sm=Math.pow,Yo=Math.sqrt,z0=1e-8,w9=1e-4,sk=Yo(3),Tm=1/3,ja=pl(),zn=pl(),Gh=pl();function Vo(r){return r>-z0&&r<z0}function C9(r){return r>z0||r<-z0}function Lr(r,e,t,i,n){var a=1-n;return a*a*(a*r+3*n*e)+n*n*(n*i+3*a*t)}function ok(r,e,t,i,n){var a=1-n;return 3*(((e-r)*a+2*(t-e)*n)*a+(i-t)*n*n)}function G0(r,e,t,i,n,a){var s=i+3*(e-t)-r,o=3*(t-e*2+r),l=3*(e-r),u=r-n,c=o*o-3*s*l,h=o*l-9*s*u,d=l*l-3*o*u,f=0;if(Vo(c)&&Vo(h))if(Vo(o))a[0]=0;else{var p=-l/o;p>=0&&p<=1&&(a[f++]=p)}else{var v=h*h-4*c*d;if(Vo(v)){var g=h/c,p=-o/s+g,m=-g/2;p>=0&&p<=1&&(a[f++]=p),m>=0&&m<=1&&(a[f++]=m)}else if(v>0){var y=Yo(v),_=c*o+1.5*s*(-h+y),b=c*o+1.5*s*(-h-y);_<0?_=-Sm(-_,Tm):_=Sm(_,Tm),b<0?b=-Sm(-b,Tm):b=Sm(b,Tm);var p=(-o-(_+b))/(3*s);p>=0&&p<=1&&(a[f++]=p)}else{var T=(2*c*o-3*s*h)/(2*Yo(c*c*c)),x=Math.acos(T)/3,C=Yo(c),D=Math.cos(x),p=(-o-2*C*D)/(3*s),m=(-o+C*(D+sk*Math.sin(x)))/(3*s),I=(-o+C*(D-sk*Math.sin(x)))/(3*s);p>=0&&p<=1&&(a[f++]=p),m>=0&&m<=1&&(a[f++]=m),I>=0&&I<=1&&(a[f++]=I)}}return f}function A9(r,e,t,i,n){var a=6*t-12*e+6*r,s=9*e+3*i-3*r-9*t,o=3*e-3*r,l=0;if(Vo(s)){if(C9(a)){var u=-o/a;u>=0&&u<=1&&(n[l++]=u)}}else{var c=a*a-4*s*o;if(Vo(c))n[0]=-a/(2*s);else if(c>0){var h=Yo(c),u=(-a+h)/(2*s),d=(-a-h)/(2*s);u>=0&&u<=1&&(n[l++]=u),d>=0&&d<=1&&(n[l++]=d)}}return l}function sl(r,e,t,i,n,a){var s=(e-r)*n+r,o=(t-e)*n+e,l=(i-t)*n+t,u=(o-s)*n+s,c=(l-o)*n+o,h=(c-u)*n+u;a[0]=r,a[1]=s,a[2]=u,a[3]=h,a[4]=h,a[5]=c,a[6]=l,a[7]=i}function D9(r,e,t,i,n,a,s,o,l,u,c){var h,d=.005,f=1/0,p,v,g,m;ja[0]=l,ja[1]=u;for(var y=0;y<1;y+=.05)zn[0]=Lr(r,t,n,s,y),zn[1]=Lr(e,i,a,o,y),g=Xo(ja,zn),g<f&&(h=y,f=g);f=1/0;for(var _=0;_<32&&!(d<w9);_++)p=h-d,v=h+d,zn[0]=Lr(r,t,n,s,p),zn[1]=Lr(e,i,a,o,p),g=Xo(zn,ja),p>=0&&g<f?(h=p,f=g):(Gh[0]=Lr(r,t,n,s,v),Gh[1]=Lr(e,i,a,o,v),m=Xo(Gh,ja),v<=1&&m<f?(h=v,f=m):d*=.5);return c&&(c[0]=Lr(r,t,n,s,h),c[1]=Lr(e,i,a,o,h)),Yo(f)}function aue(r,e,t,i,n,a,s,o,l){for(var u=r,c=e,h=0,d=1/l,f=1;f<=l;f++){var p=f*d,v=Lr(r,t,n,s,p),g=Lr(e,i,a,o,p),m=v-u,y=g-c;h+=Math.sqrt(m*m+y*y),u=v,c=g}return h}function zr(r,e,t,i){var n=1-i;return n*(n*r+2*i*e)+i*i*t}function Yw(r,e,t,i){return 2*((1-i)*(e-r)+i*(t-e))}function sue(r,e,t,i,n){var a=r-2*e+t,s=2*(e-r),o=r-i,l=0;if(Vo(a)){if(C9(s)){var u=-o/s;u>=0&&u<=1&&(n[l++]=u)}}else{var c=s*s-4*a*o;if(Vo(c)){var u=-s/(2*a);u>=0&&u<=1&&(n[l++]=u)}else if(c>0){var h=Yo(c),u=(-s+h)/(2*a),d=(-s-h)/(2*a);u>=0&&u<=1&&(n[l++]=u),d>=0&&d<=1&&(n[l++]=d)}}return l}function E9(r,e,t){var i=r+t-2*e;return i===0?.5:(r-e)/i}function Cv(r,e,t,i,n){var a=(e-r)*i+r,s=(t-e)*i+e,o=(s-a)*i+a;n[0]=r,n[1]=a,n[2]=o,n[3]=o,n[4]=s,n[5]=t}function I9(r,e,t,i,n,a,s,o,l){var u,c=.005,h=1/0;ja[0]=s,ja[1]=o;for(var d=0;d<1;d+=.05){zn[0]=zr(r,t,n,d),zn[1]=zr(e,i,a,d);var f=Xo(ja,zn);f<h&&(u=d,h=f)}h=1/0;for(var p=0;p<32&&!(c<w9);p++){var v=u-c,g=u+c;zn[0]=zr(r,t,n,v),zn[1]=zr(e,i,a,v);var f=Xo(zn,ja);if(v>=0&&f<h)u=v,h=f;else{Gh[0]=zr(r,t,n,g),Gh[1]=zr(e,i,a,g);var m=Xo(Gh,ja);g<=1&&m<h?(u=g,h=m):c*=.5}}return l&&(l[0]=zr(r,t,n,u),l[1]=zr(e,i,a,u)),Yo(h)}function oue(r,e,t,i,n,a,s){for(var o=r,l=e,u=0,c=1/s,h=1;h<=s;h++){var d=h*c,f=zr(r,t,n,d),p=zr(e,i,a,d),v=f-o,g=p-l;u+=Math.sqrt(v*v+g*g),o=f,l=p}return u}var lue=/cubic-bezier\(([0-9,\.e ]+)\)/;function gD(r){var e=r&&lue.exec(r);if(e){var t=e[1].split(","),i=+qn(t[0]),n=+qn(t[1]),a=+qn(t[2]),s=+qn(t[3]);if(isNaN(i+n+a+s))return;var o=[];return function(l){return l<=0?0:l>=1?1:G0(0,i,a,1,l,o)&&Lr(0,n,s,1,o[0])}}}var uue=function(){function r(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||tr,this.ondestroy=e.ondestroy||tr,this.onrestart=e.onrestart||tr,e.easing&&this.setEasing(e.easing)}return r.prototype.step=function(e,t){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),this._paused){this._pausedTime+=t;return}var i=this._life,n=e-this._startTime-this._pausedTime,a=n/i;a<0&&(a=0),a=Math.min(a,1);var s=this.easingFunc,o=s?s(a):a;if(this.onframe(o),a===1)if(this.loop){var l=n%i;this._startTime=e-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},r.prototype.pause=function(){this._paused=!0},r.prototype.resume=function(){this._paused=!1},r.prototype.setEasing=function(e){this.easing=e,this.easingFunc=xe(e)?e:$p[e]||gD(e)},r}(),P9=function(){function r(e){this.value=e}return r}(),cue=function(){function r(){this._len=0}return r.prototype.insert=function(e){var t=new P9(e);return this.insertEntry(t),t},r.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},r.prototype.remove=function(e){var t=e.prev,i=e.next;t?t.next=i:this.head=i,i?i.prev=t:this.tail=t,e.next=e.prev=null,this._len--},r.prototype.len=function(){return this._len},r.prototype.clear=function(){this.head=this.tail=null,this._len=0},r}(),gg=function(){function r(e){this._list=new cue,this._maxSize=10,this._map={},this._maxSize=e}return r.prototype.put=function(e,t){var i=this._list,n=this._map,a=null;if(n[e]==null){var s=i.len(),o=this._lastRemovedEntry;if(s>=this._maxSize&&s>0){var l=i.head;i.remove(l),delete n[l.key],a=l.value,this._lastRemovedEntry=l}o?o.value=t:o=new P9(t),o.key=e,i.insertEntry(o),n[e]=o}return a},r.prototype.get=function(e){var t=this._map[e],i=this._list;if(t!=null)return t!==i.tail&&(i.remove(t),i.insertEntry(t)),t.value},r.prototype.clear=function(){this._list.clear(),this._map={}},r.prototype.len=function(){return this._list.len()},r}(),lk={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 xa(r){return r=Math.round(r),r<0?0:r>255?255:r}function hue(r){return r=Math.round(r),r<0?0:r>360?360:r}function Av(r){return r<0?0:r>1?1:r}function xS(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?xa(parseFloat(e)/100*255):xa(parseInt(e,10))}function $u(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?Av(parseFloat(e)/100):Av(parseFloat(e))}function wS(r,e,t){return t<0?t+=1:t>1&&(t-=1),t*6<1?r+(e-r)*t*6:t*2<1?e:t*3<2?r+(e-r)*(2/3-t)*6:r}function zo(r,e,t){return r+(e-r)*t}function On(r,e,t,i,n){return r[0]=e,r[1]=t,r[2]=i,r[3]=n,r}function Kw(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r}var M9=new gg(20),xm=null;function Hc(r,e){xm&&Kw(xm,e),xm=M9.put(r,xm||e.slice())}function Li(r,e){if(r){e=e||[];var t=M9.get(r);if(t)return Kw(e,t);r=r+"";var i=r.replace(/ /g,"").toLowerCase();if(i in lk)return Kw(e,lk[i]),Hc(r,e),e;var n=i.length;if(i.charAt(0)==="#"){if(n===4||n===5){var a=parseInt(i.slice(1,4),16);if(!(a>=0&&a<=4095)){On(e,0,0,0,1);return}return On(e,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,n===5?parseInt(i.slice(4),16)/15:1),Hc(r,e),e}else if(n===7||n===9){var a=parseInt(i.slice(1,7),16);if(!(a>=0&&a<=16777215)){On(e,0,0,0,1);return}return On(e,(a&16711680)>>16,(a&65280)>>8,a&255,n===9?parseInt(i.slice(7),16)/255:1),Hc(r,e),e}return}var s=i.indexOf("("),o=i.indexOf(")");if(s!==-1&&o+1===n){var l=i.substr(0,s),u=i.substr(s+1,o-(s+1)).split(","),c=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?On(e,+u[0],+u[1],+u[2],1):On(e,0,0,0,1);c=$u(u.pop());case"rgb":if(u.length>=3)return On(e,xS(u[0]),xS(u[1]),xS(u[2]),u.length===3?c:$u(u[3])),Hc(r,e),e;On(e,0,0,0,1);return;case"hsla":if(u.length!==4){On(e,0,0,0,1);return}return u[3]=$u(u[3]),Zw(u,e),Hc(r,e),e;case"hsl":if(u.length!==3){On(e,0,0,0,1);return}return Zw(u,e),Hc(r,e),e;default:return}}On(e,0,0,0,1)}}function Zw(r,e){var t=(parseFloat(r[0])%360+360)%360/360,i=$u(r[1]),n=$u(r[2]),a=n<=.5?n*(i+1):n+i-n*i,s=n*2-a;return e=e||[],On(e,xa(wS(s,a,t+1/3)*255),xa(wS(s,a,t)*255),xa(wS(s,a,t-1/3)*255),1),r.length===4&&(e[3]=r[3]),e}function fue(r){if(r){var e=r[0]/255,t=r[1]/255,i=r[2]/255,n=Math.min(e,t,i),a=Math.max(e,t,i),s=a-n,o=(a+n)/2,l,u;if(s===0)l=0,u=0;else{o<.5?u=s/(a+n):u=s/(2-a-n);var c=((a-e)/6+s/2)/s,h=((a-t)/6+s/2)/s,d=((a-i)/6+s/2)/s;e===a?l=d-h:t===a?l=1/3+c-d:i===a&&(l=2/3+h-c),l<0&&(l+=1),l>1&&(l-=1)}var f=[l*360,u,o];return r[3]!=null&&f.push(r[3]),f}}function H0(r,e){var t=Li(r);if(t){for(var i=0;i<3;i++)e<0?t[i]=t[i]*(1-e)|0:t[i]=(255-t[i])*e+t[i]|0,t[i]>255?t[i]=255:t[i]<0&&(t[i]=0);return wa(t,t.length===4?"rgba":"rgb")}}function due(r){var e=Li(r);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function Wp(r,e,t){if(!(!(e&&e.length)||!(r>=0&&r<=1))){t=t||[];var i=r*(e.length-1),n=Math.floor(i),a=Math.ceil(i),s=e[n],o=e[a],l=i-n;return t[0]=xa(zo(s[0],o[0],l)),t[1]=xa(zo(s[1],o[1],l)),t[2]=xa(zo(s[2],o[2],l)),t[3]=Av(zo(s[3],o[3],l)),t}}var pue=Wp;function mD(r,e,t){if(!(!(e&&e.length)||!(r>=0&&r<=1))){var i=r*(e.length-1),n=Math.floor(i),a=Math.ceil(i),s=Li(e[n]),o=Li(e[a]),l=i-n,u=wa([xa(zo(s[0],o[0],l)),xa(zo(s[1],o[1],l)),xa(zo(s[2],o[2],l)),Av(zo(s[3],o[3],l))],"rgba");return t?{color:u,leftIndex:n,rightIndex:a,value:i}:u}}var vue=mD;function Hh(r,e,t,i){var n=Li(r);if(r)return n=fue(n),e!=null&&(n[0]=hue(e)),t!=null&&(n[1]=$u(t)),i!=null&&(n[2]=$u(i)),wa(Zw(n),"rgba")}function Dv(r,e){var t=Li(r);if(t&&e!=null)return t[3]=Av(e),wa(t,"rgba")}function wa(r,e){if(!(!r||!r.length)){var t=r[0]+","+r[1]+","+r[2];return(e==="rgba"||e==="hsva"||e==="hsla")&&(t+=","+r[3]),e+"("+t+")"}}function Ev(r,e){var t=Li(r);return t?(.299*t[0]+.587*t[1]+.114*t[2])*t[3]/255+(1-t[3])*e:0}function gue(){return wa([Math.round(Math.random()*255),Math.round(Math.random()*255),Math.round(Math.random()*255)],"rgb")}var uk=new gg(100);function $0(r){if(de(r)){var e=uk.get(r);return e||(e=H0(r,-.1),uk.put(r,e)),e}else if(dg(r)){var t=Q({},r);return t.colorStops=ae(r.colorStops,function(i){return{offset:i.offset,color:H0(i.color,-.1)}}),t}return r}const mue=Object.freeze(Object.defineProperty({__proto__:null,fastLerp:Wp,fastMapToColor:pue,lerp:mD,lift:H0,liftColor:$0,lum:Ev,mapToColor:vue,modifyAlpha:Dv,modifyHSL:Hh,parse:Li,random:gue,stringify:wa,toHex:due},Symbol.toStringTag,{value:"Module"}));var W0=Math.round;function Iv(r){var e;if(!r||r==="transparent")r="none";else if(typeof r=="string"&&r.indexOf("rgba")>-1){var t=Li(r);t&&(r="rgb("+t[0]+","+t[1]+","+t[2]+")",e=t[3])}return{color:r,opacity:e??1}}var ck=1e-4;function Go(r){return r<ck&&r>-ck}function wm(r){return W0(r*1e3)/1e3}function Qw(r){return W0(r*1e4)/1e4}function yue(r){return"matrix("+wm(r[0])+","+wm(r[1])+","+wm(r[2])+","+wm(r[3])+","+Qw(r[4])+","+Qw(r[5])+")"}var _ue={left:"start",right:"end",center:"middle",middle:"middle"};function bue(r,e,t){return t==="top"?r+=e/2:t==="bottom"&&(r-=e/2),r}function Sue(r){return r&&(r.shadowBlur||r.shadowOffsetX||r.shadowOffsetY)}function Tue(r){var e=r.style,t=r.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),t[0],t[1]].join(",")}function L9(r){return r&&!!r.image}function xue(r){return r&&!!r.svgElement}function yD(r){return L9(r)||xue(r)}function k9(r){return r.type==="linear"}function R9(r){return r.type==="radial"}function O9(r){return r&&(r.type==="linear"||r.type==="radial")}function x1(r){return"url(#"+r+")"}function N9(r){var e=r.getGlobalScale(),t=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(t)/Math.log(10)),1)}function B9(r){var e=r.x||0,t=r.y||0,i=(r.rotation||0)*zp,n=Fe(r.scaleX,1),a=Fe(r.scaleY,1),s=r.skewX||0,o=r.skewY||0,l=[];return(e||t)&&l.push("translate("+e+"px,"+t+"px)"),i&&l.push("rotate("+i+")"),(n!==1||a!==1)&&l.push("scale("+n+","+a+")"),(s||o)&&l.push("skew("+W0(s*zp)+"deg, "+W0(o*zp)+"deg)"),l.join(" ")}var wue=function(){return et.hasGlobalWindow&&xe(window.btoa)?function(r){return window.btoa(unescape(encodeURIComponent(r)))}:typeof Buffer<"u"?function(r){return Buffer.from(r).toString("base64")}:function(r){return null}}(),Jw=Array.prototype.slice;function Is(r,e,t){return(e-r)*t+r}function CS(r,e,t,i){for(var n=e.length,a=0;a<n;a++)r[a]=Is(e[a],t[a],i);return r}function Cue(r,e,t,i){for(var n=e.length,a=n&&e[0].length,s=0;s<n;s++){r[s]||(r[s]=[]);for(var o=0;o<a;o++)r[s][o]=Is(e[s][o],t[s][o],i)}return r}function Cm(r,e,t,i){for(var n=e.length,a=0;a<n;a++)r[a]=e[a]+t[a]*i;return r}function hk(r,e,t,i){for(var n=e.length,a=n&&e[0].length,s=0;s<n;s++){r[s]||(r[s]=[]);for(var o=0;o<a;o++)r[s][o]=e[s][o]+t[s][o]*i}return r}function Aue(r,e){for(var t=r.length,i=e.length,n=t>i?e:r,a=Math.min(t,i),s=n[a-1]||{color:[0,0,0,0],offset:0},o=a;o<Math.max(t,i);o++)n.push({offset:s.offset,color:s.color.slice()})}function Due(r,e,t){var i=r,n=e;if(!(!i.push||!n.push)){var a=i.length,s=n.length;if(a!==s){var o=a>s;if(o)i.length=s;else for(var l=a;l<s;l++)i.push(t===1?n[l]:Jw.call(n[l]))}for(var u=i[0]&&i[0].length,l=0;l<i.length;l++)if(t===1)isNaN(i[l])&&(i[l]=n[l]);else for(var c=0;c<u;c++)isNaN(i[l][c])&&(i[l][c]=n[l][c])}}function qp(r){if(Jr(r)){var e=r.length;if(Jr(r[0])){for(var t=[],i=0;i<e;i++)t.push(Jw.call(r[i]));return t}return Jw.call(r)}return r}function ky(r){return r[0]=Math.floor(r[0])||0,r[1]=Math.floor(r[1])||0,r[2]=Math.floor(r[2])||0,r[3]=r[3]==null?1:r[3],"rgba("+r.join(",")+")"}function Eue(r){return Jr(r&&r[0])?2:1}var Am=0,Ry=1,F9=2,gp=3,e2=4,t2=5,fk=6;function dk(r){return r===e2||r===t2}function Dm(r){return r===Ry||r===F9}var Md=[0,0,0,0],Iue=function(){function r(e){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=e}return r.prototype.isFinished=function(){return this._finished},r.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},r.prototype.needsAnimate=function(){return this.keyframes.length>=1},r.prototype.getAdditiveTrack=function(){return this._additiveTrack},r.prototype.addKeyframe=function(e,t,i){this._needsSort=!0;var n=this.keyframes,a=n.length,s=!1,o=fk,l=t;if(Jr(t)){var u=Eue(t);o=u,(u===1&&!ut(t[0])||u===2&&!ut(t[0][0]))&&(s=!0)}else if(ut(t)&&!gf(t))o=Am;else if(de(t))if(!isNaN(+t))o=Am;else{var c=Li(t);c&&(l=c,o=gp)}else if(dg(t)){var h=Q({},l);h.colorStops=ae(t.colorStops,function(f){return{offset:f.offset,color:Li(f.color)}}),k9(t)?o=e2:R9(t)&&(o=t2),l=h}a===0?this.valType=o:(o!==this.valType||o===fk)&&(s=!0),this.discrete=this.discrete||s;var d={time:e,value:l,rawValue:t,percent:0};return i&&(d.easing=i,d.easingFunc=xe(i)?i:$p[i]||gD(i)),n.push(d),d},r.prototype.prepare=function(e,t){var i=this.keyframes;this._needsSort&&i.sort(function(v,g){return v.time-g.time});for(var n=this.valType,a=i.length,s=i[a-1],o=this.discrete,l=Dm(n),u=dk(n),c=0;c<a;c++){var h=i[c],d=h.value,f=s.value;h.percent=h.time/e,o||(l&&c!==a-1?Due(d,f,n):u&&Aue(d.colorStops,f.colorStops))}if(!o&&n!==t2&&t&&this.needsAnimate()&&t.needsAnimate()&&n===t.valType&&!t._finished){this._additiveTrack=t;for(var p=i[0].value,c=0;c<a;c++)n===Am?i[c].additiveValue=i[c].value-p:n===gp?i[c].additiveValue=Cm([],i[c].value,p,-1):Dm(n)&&(i[c].additiveValue=n===Ry?Cm([],i[c].value,p,-1):hk([],i[c].value,p,-1))}},r.prototype.step=function(e,t){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var i=this._additiveTrack!=null,n=i?"additiveValue":"value",a=this.valType,s=this.keyframes,o=s.length,l=this.propName,u=a===gp,c,h=this._lastFr,d=Math.min,f,p;if(o===1)f=p=s[0];else{if(t<0)c=0;else if(t<this._lastFrP){var v=d(h+1,o-1);for(c=v;c>=0&&!(s[c].percent<=t);c--);c=d(c,o-2)}else{for(c=h;c<o&&!(s[c].percent>t);c++);c=d(c-1,o-2)}p=s[c+1],f=s[c]}if(f&&p){this._lastFr=c,this._lastFrP=t;var g=p.percent-f.percent,m=g===0?1:d((t-f.percent)/g,1);p.easingFunc&&(m=p.easingFunc(m));var y=i?this._additiveValue:u?Md:e[l];if((Dm(a)||u)&&!y&&(y=this._additiveValue=[]),this.discrete)e[l]=m<1?f.rawValue:p.rawValue;else if(Dm(a))a===Ry?CS(y,f[n],p[n],m):Cue(y,f[n],p[n],m);else if(dk(a)){var _=f[n],b=p[n],T=a===e2;e[l]={type:T?"linear":"radial",x:Is(_.x,b.x,m),y:Is(_.y,b.y,m),colorStops:ae(_.colorStops,function(C,D){var I=b.colorStops[D];return{offset:Is(C.offset,I.offset,m),color:ky(CS([],C.color,I.color,m))}}),global:b.global},T?(e[l].x2=Is(_.x2,b.x2,m),e[l].y2=Is(_.y2,b.y2,m)):e[l].r=Is(_.r,b.r,m)}else if(u)CS(y,f[n],p[n],m),i||(e[l]=ky(y));else{var x=Is(f[n],p[n],m);i?this._additiveValue=x:e[l]=x}i&&this._addToTarget(e)}}},r.prototype._addToTarget=function(e){var t=this.valType,i=this.propName,n=this._additiveValue;t===Am?e[i]=e[i]+n:t===gp?(Li(e[i],Md),Cm(Md,Md,n,1),e[i]=ky(Md)):t===Ry?Cm(e[i],e[i],n,1):t===F9&&hk(e[i],e[i],n,1)},r}(),_D=function(){function r(e,t,i,n){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&n){m1("Can' use additive animation on looped animation.");return}this._additiveAnimators=n,this._allowDiscrete=i}return r.prototype.getMaxTime=function(){return this._maxTime},r.prototype.getDelay=function(){return this._delay},r.prototype.getLoop=function(){return this._loop},r.prototype.getTarget=function(){return this._target},r.prototype.changeTarget=function(e){this._target=e},r.prototype.when=function(e,t,i){return this.whenWithKeys(e,t,rt(t),i)},r.prototype.whenWithKeys=function(e,t,i,n){for(var a=this._tracks,s=0;s<i.length;s++){var o=i[s],l=a[o];if(!l){l=a[o]=new Iue(o);var u=void 0,c=this._getAdditiveTrack(o);if(c){var h=c.keyframes,d=h[h.length-1];u=d&&d.value,c.valType===gp&&u&&(u=ky(u))}else u=this._target[o];if(u==null)continue;e>0&&l.addKeyframe(0,qp(u),n),this._trackKeys.push(o)}l.addKeyframe(e,qp(t[o]),n)}return this._maxTime=Math.max(this._maxTime,e),this},r.prototype.pause=function(){this._clip.pause(),this._paused=!0},r.prototype.resume=function(){this._clip.resume(),this._paused=!1},r.prototype.isPaused=function(){return!!this._paused},r.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},r.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,i=0;i<t;i++)e[i].call(this)},r.prototype._abortedCallback=function(){this._setTracksFinished();var e=this.animation,t=this._abortedCbs;if(e&&e.removeClip(this._clip),this._clip=null,t)for(var i=0;i<t.length;i++)t[i].call(this)},r.prototype._setTracksFinished=function(){for(var e=this._tracks,t=this._trackKeys,i=0;i<t.length;i++)e[t[i]].setFinished()},r.prototype._getAdditiveTrack=function(e){var t,i=this._additiveAnimators;if(i)for(var n=0;n<i.length;n++){var a=i[n].getTrack(e);a&&(t=a)}return t},r.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var t=this,i=[],n=this._maxTime||0,a=0;a<this._trackKeys.length;a++){var s=this._trackKeys[a],o=this._tracks[s],l=this._getAdditiveTrack(s),u=o.keyframes,c=u.length;if(o.prepare(n,l),o.needsAnimate())if(!this._allowDiscrete&&o.discrete){var h=u[c-1];h&&(t._target[o.propName]=h.rawValue),o.setFinished()}else i.push(o)}if(i.length||this._force){var d=new uue({life:n,loop:this._loop,delay:this._delay||0,onframe:function(f){t._started=2;var p=t._additiveAnimators;if(p){for(var v=!1,g=0;g<p.length;g++)if(p[g]._clip){v=!0;break}v||(t._additiveAnimators=null)}for(var g=0;g<i.length;g++)i[g].step(t._target,f);var m=t._onframeCbs;if(m)for(var g=0;g<m.length;g++)m[g](t._target,f)},ondestroy:function(){t._doneCallback()}});this._clip=d,this.animation&&this.animation.addClip(d),e&&d.setEasing(e)}else this._doneCallback();return this}},r.prototype.stop=function(e){if(this._clip){var t=this._clip;e&&t.onframe(1),this._abortedCallback()}},r.prototype.delay=function(e){return this._delay=e,this},r.prototype.during=function(e){return e&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(e)),this},r.prototype.done=function(e){return e&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(e)),this},r.prototype.aborted=function(e){return e&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(e)),this},r.prototype.getClip=function(){return this._clip},r.prototype.getTrack=function(e){return this._tracks[e]},r.prototype.getTracks=function(){var e=this;return ae(this._trackKeys,function(t){return e._tracks[t]})},r.prototype.stopTracks=function(e,t){if(!e.length||!this._clip)return!0;for(var i=this._tracks,n=this._trackKeys,a=0;a<e.length;a++){var s=i[e[a]];s&&!s.isFinished()&&(t?s.step(this._target,1):this._started===1&&s.step(this._target,0),s.setFinished())}for(var o=!0,a=0;a<n.length;a++)if(!i[n[a]].isFinished()){o=!1;break}return o&&this._abortedCallback(),o},r.prototype.saveTo=function(e,t,i){if(e){t=t||this._trackKeys;for(var n=0;n<t.length;n++){var a=t[n],s=this._tracks[a];if(!(!s||s.isFinished())){var o=s.keyframes,l=o[i?0:o.length-1];l&&(e[a]=qp(l.rawValue))}}}},r.prototype.__changeFinalValue=function(e,t){t=t||rt(e);for(var i=0;i<t.length;i++){var n=t[i],a=this._tracks[n];if(a){var s=a.keyframes;if(s.length>1){var o=s.pop();a.addKeyframe(o.time,e[n]),a.prepare(this._maxTime,a.getAdditiveTrack())}}}},r}();function wh(){return new Date().getTime()}var Pue=function(r){j(e,r);function e(t){var i=r.call(this)||this;return i._running=!1,i._time=0,i._pausedTime=0,i._pauseStart=0,i._paused=!1,t=t||{},i.stage=t.stage||{},i}return e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._head?(this._tail.next=t,t.prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var i=t.getClip();i&&this.addClip(i)},e.prototype.removeClip=function(t){if(t.animation){var i=t.prev,n=t.next;i?i.next=n:this._head=n,n?n.prev=i:this._tail=i,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var i=t.getClip();i&&this.removeClip(i),t.animation=null},e.prototype.update=function(t){for(var i=wh()-this._pausedTime,n=i-this._time,a=this._head;a;){var s=a.next,o=a.step(i,n);o&&(a.ondestroy(),this.removeClip(a)),a=s}this._time=i,t||(this.trigger("frame",n),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0;function i(){t._running&&(V0(i),!t._paused&&t.update())}V0(i)},e.prototype.start=function(){this._running||(this._time=wh(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=wh(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=wh()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._head;t;){var i=t.next;t.prev=t.next=t.animation=null,t=i}this._head=this._tail=null},e.prototype.isFinished=function(){return this._head==null},e.prototype.animate=function(t,i){i=i||{},this.start();var n=new _D(t,i.loop);return this.addAnimator(n),n},e}(ta),Mue=300,AS=et.domSupported,DS=function(){var r=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],t={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},i=ae(r,function(n){var a=n.replace("mouse","pointer");return t.hasOwnProperty(a)?a:n});return{mouse:r,touch:e,pointer:i}}(),pk={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},vk=!1;function r2(r){var e=r.pointerType;return e==="pen"||e==="touch"}function Lue(r){r.touching=!0,r.touchTimer!=null&&(clearTimeout(r.touchTimer),r.touchTimer=null),r.touchTimer=setTimeout(function(){r.touching=!1,r.touchTimer=null},700)}function ES(r){r&&(r.zrByTouch=!0)}function kue(r,e){return Bn(r.dom,new Rue(r,e),!0)}function U9(r,e){for(var t=e,i=!1;t&&t.nodeType!==9&&!(i=t.domBelongToZr||t!==e&&t===r.painterRoot);)t=t.parentNode;return i}var Rue=function(){function r(e,t){this.stopPropagation=tr,this.stopImmediatePropagation=tr,this.preventDefault=tr,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return r}(),fa={mousedown:function(r){r=Bn(this.dom,r),this.__mayPointerCapture=[r.zrX,r.zrY],this.trigger("mousedown",r)},mousemove:function(r){r=Bn(this.dom,r);var e=this.__mayPointerCapture;e&&(r.zrX!==e[0]||r.zrY!==e[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",r)},mouseup:function(r){r=Bn(this.dom,r),this.__togglePointerCapture(!1),this.trigger("mouseup",r)},mouseout:function(r){r=Bn(this.dom,r);var e=r.toElement||r.relatedTarget;U9(this,e)||(this.__pointerCapturing&&(r.zrEventControl="no_globalout"),this.trigger("mouseout",r))},wheel:function(r){vk=!0,r=Bn(this.dom,r),this.trigger("mousewheel",r)},mousewheel:function(r){vk||(r=Bn(this.dom,r),this.trigger("mousewheel",r))},touchstart:function(r){r=Bn(this.dom,r),ES(r),this.__lastTouchMoment=new Date,this.handler.processGesture(r,"start"),fa.mousemove.call(this,r),fa.mousedown.call(this,r)},touchmove:function(r){r=Bn(this.dom,r),ES(r),this.handler.processGesture(r,"change"),fa.mousemove.call(this,r)},touchend:function(r){r=Bn(this.dom,r),ES(r),this.handler.processGesture(r,"end"),fa.mouseup.call(this,r),+new Date-+this.__lastTouchMoment<Mue&&fa.click.call(this,r)},pointerdown:function(r){fa.mousedown.call(this,r)},pointermove:function(r){r2(r)||fa.mousemove.call(this,r)},pointerup:function(r){fa.mouseup.call(this,r)},pointerout:function(r){r2(r)||fa.mouseout.call(this,r)}};R(["click","dblclick","contextmenu"],function(r){fa[r]=function(e){e=Bn(this.dom,e),this.trigger(r,e)}});var i2={pointermove:function(r){r2(r)||i2.mousemove.call(this,r)},pointerup:function(r){i2.mouseup.call(this,r)},mousemove:function(r){this.trigger("mousemove",r)},mouseup:function(r){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",r),e&&(r.zrEventControl="only_globalout",this.trigger("mouseout",r))}};function Oue(r,e){var t=e.domHandlers;et.pointerEventsSupported?R(DS.pointer,function(i){Oy(e,i,function(n){t[i].call(r,n)})}):(et.touchEventsSupported&&R(DS.touch,function(i){Oy(e,i,function(n){t[i].call(r,n),Lue(e)})}),R(DS.mouse,function(i){Oy(e,i,function(n){n=vD(n),e.touching||t[i].call(r,n)})}))}function Nue(r,e){et.pointerEventsSupported?R(pk.pointer,t):et.touchEventsSupported||R(pk.mouse,t);function t(i){function n(a){a=vD(a),U9(r,a.target)||(a=kue(r,a),e.domHandlers[i].call(r,a))}Oy(e,i,n,{capture:!0})}}function Oy(r,e,t,i){r.mounted[e]=t,r.listenerOpts[e]=i,Xw(r.domTarget,e,t,i)}function IS(r){var e=r.mounted;for(var t in e)e.hasOwnProperty(t)&&qle(r.domTarget,t,e[t],r.listenerOpts[t]);r.mounted={}}var gk=function(){function r(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t}return r}(),Bue=function(r){j(e,r);function e(t,i){var n=r.call(this)||this;return n.__pointerCapturing=!1,n.dom=t,n.painterRoot=i,n._localHandlerScope=new gk(t,fa),AS&&(n._globalHandlerScope=new gk(document,i2)),Oue(n,n._localHandlerScope),n}return e.prototype.dispose=function(){IS(this._localHandlerScope),AS&&IS(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,AS&&+this.__pointerCapturing^+t){this.__pointerCapturing=t;var i=this._globalHandlerScope;t?Nue(this,i):IS(i)}},e}(ta),V9=1;et.hasGlobalWindow&&(V9=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var q0=V9,n2=.4,a2="#333",s2="#ccc",Fue="#eee",mk=vg,yk=5e-5;function Fl(r){return r>yk||r<-yk}var Ul=[],$c=[],PS=Ji(),MS=Math.abs,Vs=function(){function r(){}return r.prototype.getLocalTransform=function(e){return r.getLocalTransform(this,e)},r.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},r.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},r.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},r.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},r.prototype.needLocalTransform=function(){return Fl(this.rotation)||Fl(this.x)||Fl(this.y)||Fl(this.scaleX-1)||Fl(this.scaleY-1)||Fl(this.skewX)||Fl(this.skewY)},r.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),i=this.transform;if(!(t||e)){i&&(mk(i),this.invTransform=null);return}i=i||Ji(),t?this.getLocalTransform(i):mk(i),e&&(t?os(i,e,i):S1(i,e)),this.transform=i,this._resolveGlobalScaleRatio(i)},r.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(Ul);var i=Ul[0]<0?-1:1,n=Ul[1]<0?-1:1,a=((Ul[0]-i)*t+i)/Ul[0]||0,s=((Ul[1]-n)*t+n)/Ul[1]||0;e[0]*=a,e[1]*=a,e[2]*=s,e[3]*=s}this.invTransform=this.invTransform||Ji(),gc(this.invTransform,e)},r.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},r.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],i=e[2]*e[2]+e[3]*e[3],n=Math.atan2(e[1],e[0]),a=Math.PI/2+n-Math.atan2(e[3],e[2]);i=Math.sqrt(i)*Math.cos(a),t=Math.sqrt(t),this.skewX=a,this.skewY=0,this.rotation=-n,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=i,this.originX=0,this.originY=0}},r.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||Ji(),os($c,e.invTransform,t),t=$c);var i=this.originX,n=this.originY;(i||n)&&(PS[4]=i,PS[5]=n,os($c,t,PS),$c[4]-=i,$c[5]-=n,t=$c),this.setLocalTransform(t)}},r.prototype.getGlobalScale=function(e){var t=this.transform;return e=e||[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},r.prototype.transformCoordToLocal=function(e,t){var i=[e,t],n=this.invTransform;return n&&$r(i,i,n),i},r.prototype.transformCoordToGlobal=function(e,t){var i=[e,t],n=this.transform;return n&&$r(i,i,n),i},r.prototype.getLineScale=function(){var e=this.transform;return e&&MS(e[0]-1)>1e-10&&MS(e[3]-1)>1e-10?Math.sqrt(MS(e[0]*e[3]-e[2]*e[1])):1},r.prototype.copyTransform=function(e){z9(this,e)},r.getLocalTransform=function(e,t){t=t||[];var i=e.originX||0,n=e.originY||0,a=e.scaleX,s=e.scaleY,o=e.anchorX,l=e.anchorY,u=e.rotation||0,c=e.x,h=e.y,d=e.skewX?Math.tan(e.skewX):0,f=e.skewY?Math.tan(-e.skewY):0;if(i||n||o||l){var p=i+o,v=n+l;t[4]=-p*a-d*v*s,t[5]=-v*s-f*p*a}else t[4]=t[5]=0;return t[0]=a,t[3]=s,t[1]=f*a,t[2]=d*s,u&&vl(t,t,u),t[4]+=i+c,t[5]+=n+h,t},r.initDefaultProps=function(){var e=r.prototype;e.scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0}(),r}(),ps=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function z9(r,e){for(var t=0;t<ps.length;t++){var i=ps[t];r[i]=e[i]}}var _k={};function Sn(r,e){e=e||al;var t=_k[e];t||(t=_k[e]=new gg(500));var i=t.get(r);return i==null&&(i=Aa.measureText(r,e).width,t.put(r,i)),i}function bk(r,e,t,i){var n=Sn(r,e),a=w1(e),s=mp(0,n,t),o=dh(0,a,i),l=new We(s,o,n,a);return l}function mg(r,e,t,i){var n=((r||"")+"").split(`
|
||
`),a=n.length;if(a===1)return bk(n[0],e,t,i);for(var s=new We(0,0,0,0),o=0;o<n.length;o++){var l=bk(n[o],e,t,i);o===0?s.copy(l):s.union(l)}return s}function mp(r,e,t){return t==="right"?r-=e:t==="center"&&(r-=e/2),r}function dh(r,e,t){return t==="middle"?r-=e/2:t==="bottom"&&(r-=e),r}function w1(r){return Sn("国",r)}function Ea(r,e){return typeof r=="string"?r.lastIndexOf("%")>=0?parseFloat(r)/100*e:parseFloat(r):r}function j0(r,e,t){var i=e.position||"inside",n=e.distance!=null?e.distance:5,a=t.height,s=t.width,o=a/2,l=t.x,u=t.y,c="left",h="top";if(i instanceof Array)l+=Ea(i[0],t.width),u+=Ea(i[1],t.height),c=null,h=null;else switch(i){case"left":l-=n,u+=o,c="right",h="middle";break;case"right":l+=n+s,u+=o,h="middle";break;case"top":l+=s/2,u-=n,c="center",h="bottom";break;case"bottom":l+=s/2,u+=a+n,c="center";break;case"inside":l+=s/2,u+=o,c="center",h="middle";break;case"insideLeft":l+=n,u+=o,h="middle";break;case"insideRight":l+=s-n,u+=o,c="right",h="middle";break;case"insideTop":l+=s/2,u+=n,c="center";break;case"insideBottom":l+=s/2,u+=a-n,c="center",h="bottom";break;case"insideTopLeft":l+=n,u+=n;break;case"insideTopRight":l+=s-n,u+=n,c="right";break;case"insideBottomLeft":l+=n,u+=a-n,h="bottom";break;case"insideBottomRight":l+=s-n,u+=a-n,c="right",h="bottom";break}return r=r||{},r.x=l,r.y=u,r.align=c,r.verticalAlign=h,r}var LS="__zr_normal__",kS=ps.concat(["ignore"]),Uue=Qn(ps,function(r,e){return r[e]=!0,r},{ignore:!1}),Wc={},Vue=new We(0,0,0,0),C1=function(){function r(e){this.id=hD(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return r.prototype._init=function(e){this.attr(e)},r.prototype.drift=function(e,t,i){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0;break}var n=this.transform;n||(n=this.transform=[1,0,0,1,0,0]),n[4]+=e,n[5]+=t,this.decomposeTransform(),this.markRedraw()},r.prototype.beforeUpdate=function(){},r.prototype.afterUpdate=function(){},r.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},r.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||(this.textConfig={});var i=this.textConfig,n=i.local,a=t.innerTransformable,s=void 0,o=void 0,l=!1;a.parent=n?this:null;var u=!1;if(a.copyTransform(t),i.position!=null){var c=Vue;i.layoutRect?c.copy(i.layoutRect):c.copy(this.getBoundingRect()),n||c.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(Wc,i,c):j0(Wc,i,c),a.x=Wc.x,a.y=Wc.y,s=Wc.align,o=Wc.verticalAlign;var h=i.origin;if(h&&i.rotation!=null){var d=void 0,f=void 0;h==="center"?(d=c.width*.5,f=c.height*.5):(d=Ea(h[0],c.width),f=Ea(h[1],c.height)),u=!0,a.originX=-a.x+d+(n?0:c.x),a.originY=-a.y+f+(n?0:c.y)}}i.rotation!=null&&(a.rotation=i.rotation);var p=i.offset;p&&(a.x+=p[0],a.y+=p[1],u||(a.originX=-p[0],a.originY=-p[1]));var v=i.inside==null?typeof i.position=="string"&&i.position.indexOf("inside")>=0:i.inside,g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),m=void 0,y=void 0,_=void 0;v&&this.canBeInsideText()?(m=i.insideFill,y=i.insideStroke,(m==null||m==="auto")&&(m=this.getInsideTextFill()),(y==null||y==="auto")&&(y=this.getInsideTextStroke(m),_=!0)):(m=i.outsideFill,y=i.outsideStroke,(m==null||m==="auto")&&(m=this.getOutsideFill()),(y==null||y==="auto")&&(y=this.getOutsideStroke(m),_=!0)),m=m||"#000",(m!==g.fill||y!==g.stroke||_!==g.autoStroke||s!==g.align||o!==g.verticalAlign)&&(l=!0,g.fill=m,g.stroke=y,g.autoStroke=_,g.align=s,g.verticalAlign=o,t.setDefaultTextStyle(g)),t.__dirty|=pn,l&&t.dirtyStyle(!0)}},r.prototype.canBeInsideText=function(){return!0},r.prototype.getInsideTextFill=function(){return"#fff"},r.prototype.getInsideTextStroke=function(e){return"#000"},r.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?s2:a2},r.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),i=typeof t=="string"&&Li(t);i||(i=[255,255,255,1]);for(var n=i[3],a=this.__zr.isDarkMode(),s=0;s<3;s++)i[s]=i[s]*n+(a?0:255)*(1-n);return i[3]=1,wa(i,"rgba")},r.prototype.traverse=function(e,t){},r.prototype.attrKV=function(e,t){e==="textConfig"?this.setTextConfig(t):e==="textContent"?this.setTextContent(t):e==="clipPath"?this.setClipPath(t):e==="extra"?(this.extra=this.extra||{},Q(this.extra,t)):this[e]=t},r.prototype.hide=function(){this.ignore=!0,this.markRedraw()},r.prototype.show=function(){this.ignore=!1,this.markRedraw()},r.prototype.attr=function(e,t){if(typeof e=="string")this.attrKV(e,t);else if(Ae(e))for(var i=e,n=rt(i),a=0;a<n.length;a++){var s=n[a];this.attrKV(s,e[s])}return this.markRedraw(),this},r.prototype.saveCurrentToNormalState=function(e){this._innerSaveToNormal(e);for(var t=this._normalState,i=0;i<this.animators.length;i++){var n=this.animators[i],a=n.__fromStateTransition;if(!(n.getLoop()||a&&a!==LS)){var s=n.targetName,o=s?t[s]:t;n.saveTo(o)}}},r.prototype._innerSaveToNormal=function(e){var t=this._normalState;t||(t=this._normalState={}),e.textConfig&&!t.textConfig&&(t.textConfig=this.textConfig),this._savePrimaryToNormal(e,t,kS)},r.prototype._savePrimaryToNormal=function(e,t,i){for(var n=0;n<i.length;n++){var a=i[n];e[a]!=null&&!(a in t)&&(t[a]=this[a])}},r.prototype.hasState=function(){return this.currentStates.length>0},r.prototype.getState=function(e){return this.states[e]},r.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},r.prototype.clearStates=function(e){this.useState(LS,!1,e)},r.prototype.useState=function(e,t,i,n){var a=e===LS,s=this.hasState();if(!(!s&&a)){var o=this.currentStates,l=this.stateTransition;if(!(Xe(o,e)>=0&&(t||o.length===1))){var u;if(this.stateProxy&&!a&&(u=this.stateProxy(e)),u||(u=this.states&&this.states[e]),!u&&!a){m1("State "+e+" not exists.");return}a||this.saveCurrentToNormalState(u);var c=!!(u&&u.hoverLayer||n);c&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,u,this._normalState,t,!i&&!this.__inHover&&l&&l.duration>0,l);var h=this._textContent,d=this._textGuide;return h&&h.useState(e,t,i,c),d&&d.useState(e,t,i,c),a?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~pn),u}}},r.prototype.useStates=function(e,t,i){if(!e.length)this.clearStates();else{var n=[],a=this.currentStates,s=e.length,o=s===a.length;if(o){for(var l=0;l<s;l++)if(e[l]!==a[l]){o=!1;break}}if(o)return;for(var l=0;l<s;l++){var u=e[l],c=void 0;this.stateProxy&&(c=this.stateProxy(u,e)),c||(c=this.states[u]),c&&n.push(c)}var h=n[s-1],d=!!(h&&h.hoverLayer||i);d&&this._toggleHoverLayerFlag(!0);var f=this._mergeStates(n),p=this.stateTransition;this.saveCurrentToNormalState(f),this._applyStateObj(e.join(","),f,this._normalState,!1,!t&&!this.__inHover&&p&&p.duration>0,p);var v=this._textContent,g=this._textGuide;v&&v.useStates(e,t,d),g&&g.useStates(e,t,d),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!d&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~pn)}},r.prototype.isSilent=function(){for(var e=this.silent,t=this.parent;!e&&t;){if(t.silent){e=!0;break}t=t.parent}return e},r.prototype._updateAnimationTargets=function(){for(var e=0;e<this.animators.length;e++){var t=this.animators[e];t.targetName&&t.changeTarget(this[t.targetName])}},r.prototype.removeState=function(e){var t=Xe(this.currentStates,e);if(t>=0){var i=this.currentStates.slice();i.splice(t,1),this.useStates(i)}},r.prototype.replaceState=function(e,t,i){var n=this.currentStates.slice(),a=Xe(n,e),s=Xe(n,t)>=0;a>=0?s?n.splice(a,1):n[a]=t:i&&!s&&n.push(t),this.useStates(n)},r.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},r.prototype._mergeStates=function(e){for(var t={},i,n=0;n<e.length;n++){var a=e[n];Q(t,a),a.textConfig&&(i=i||{},Q(i,a.textConfig))}return i&&(t.textConfig=i),t},r.prototype._applyStateObj=function(e,t,i,n,a,s){var o=!(t&&n);t&&t.textConfig?(this.textConfig=Q({},n?this.textConfig:i.textConfig),Q(this.textConfig,t.textConfig)):o&&i.textConfig&&(this.textConfig=i.textConfig);for(var l={},u=!1,c=0;c<kS.length;c++){var h=kS[c],d=a&&Uue[h];t&&t[h]!=null?d?(u=!0,l[h]=t[h]):this[h]=t[h]:o&&i[h]!=null&&(d?(u=!0,l[h]=i[h]):this[h]=i[h])}if(!a)for(var c=0;c<this.animators.length;c++){var f=this.animators[c],p=f.targetName;f.getLoop()||f.__changeFinalValue(p?(t||i)[p]:t||i)}u&&this._transitionState(e,l,s)},r.prototype._attachComponent=function(e){if(!(e.__zr&&!e.__hostTarget)&&e!==this){var t=this.__zr;t&&e.addSelfToZr(t),e.__zr=t,e.__hostTarget=this}},r.prototype._detachComponent=function(e){e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__hostTarget=null},r.prototype.getClipPath=function(){return this._clipPath},r.prototype.setClipPath=function(e){this._clipPath&&this._clipPath!==e&&this.removeClipPath(),this._attachComponent(e),this._clipPath=e,this.markRedraw()},r.prototype.removeClipPath=function(){var e=this._clipPath;e&&(this._detachComponent(e),this._clipPath=null,this.markRedraw())},r.prototype.getTextContent=function(){return this._textContent},r.prototype.setTextContent=function(e){var t=this._textContent;t!==e&&(t&&t!==e&&this.removeTextContent(),e.innerTransformable=new Vs,this._attachComponent(e),this._textContent=e,this.markRedraw())},r.prototype.setTextConfig=function(e){this.textConfig||(this.textConfig={}),Q(this.textConfig,e),this.markRedraw()},r.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},r.prototype.removeTextContent=function(){var e=this._textContent;e&&(e.innerTransformable=null,this._detachComponent(e),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},r.prototype.getTextGuideLine=function(){return this._textGuide},r.prototype.setTextGuideLine=function(e){this._textGuide&&this._textGuide!==e&&this.removeTextGuideLine(),this._attachComponent(e),this._textGuide=e,this.markRedraw()},r.prototype.removeTextGuideLine=function(){var e=this._textGuide;e&&(this._detachComponent(e),this._textGuide=null,this.markRedraw())},r.prototype.markRedraw=function(){this.__dirty|=pn;var e=this.__zr;e&&(this.__inHover?e.refreshHover():e.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},r.prototype.dirty=function(){this.markRedraw()},r.prototype._toggleHoverLayerFlag=function(e){this.__inHover=e;var t=this._textContent,i=this._textGuide;t&&(t.__inHover=e),i&&(i.__inHover=e)},r.prototype.addSelfToZr=function(e){if(this.__zr!==e){this.__zr=e;var t=this.animators;if(t)for(var i=0;i<t.length;i++)e.animation.addAnimator(t[i]);this._clipPath&&this._clipPath.addSelfToZr(e),this._textContent&&this._textContent.addSelfToZr(e),this._textGuide&&this._textGuide.addSelfToZr(e)}},r.prototype.removeSelfFromZr=function(e){if(this.__zr){this.__zr=null;var t=this.animators;if(t)for(var i=0;i<t.length;i++)e.animation.removeAnimator(t[i]);this._clipPath&&this._clipPath.removeSelfFromZr(e),this._textContent&&this._textContent.removeSelfFromZr(e),this._textGuide&&this._textGuide.removeSelfFromZr(e)}},r.prototype.animate=function(e,t,i){var n=e?this[e]:this,a=new _D(n,t,i);return e&&(a.targetName=e),this.addAnimator(a,e),a},r.prototype.addAnimator=function(e,t){var i=this.__zr,n=this;e.during(function(){n.updateDuringAnimation(t)}).done(function(){var a=n.animators,s=Xe(a,e);s>=0&&a.splice(s,1)}),this.animators.push(e),i&&i.animation.addAnimator(e),i&&i.wakeUp()},r.prototype.updateDuringAnimation=function(e){this.markRedraw()},r.prototype.stopAnimation=function(e,t){for(var i=this.animators,n=i.length,a=[],s=0;s<n;s++){var o=i[s];!e||e===o.scope?o.stop(t):a.push(o)}return this.animators=a,this},r.prototype.animateTo=function(e,t,i){RS(this,e,t,i)},r.prototype.animateFrom=function(e,t,i){RS(this,e,t,i,!0)},r.prototype._transitionState=function(e,t,i,n){for(var a=RS(this,t,i,n),s=0;s<a.length;s++)a[s].__fromStateTransition=e},r.prototype.getBoundingRect=function(){return null},r.prototype.getPaintRect=function(){return null},r.initDefaultProps=function(){var e=r.prototype;e.type="element",e.name="",e.ignore=e.silent=e.isGroup=e.draggable=e.dragging=e.ignoreClip=e.__inHover=!1,e.__dirty=pn;function t(i,n,a,s){Object.defineProperty(e,i,{get:function(){if(!this[n]){var l=this[n]=[];o(this,l)}return this[n]},set:function(l){this[a]=l[0],this[s]=l[1],this[n]=l,o(this,l)}});function o(l,u){Object.defineProperty(u,0,{get:function(){return l[a]},set:function(c){l[a]=c}}),Object.defineProperty(u,1,{get:function(){return l[s]},set:function(c){l[s]=c}})}}Object.defineProperty&&(t("position","_legacyPos","x","y"),t("scale","_legacyScale","scaleX","scaleY"),t("origin","_legacyOrigin","originX","originY"))}(),r}();ir(C1,ta);ir(C1,Vs);function RS(r,e,t,i,n){t=t||{};var a=[];G9(r,"",r,e,t,i,a,n);var s=a.length,o=!1,l=t.done,u=t.aborted,c=function(){o=!0,s--,s<=0&&(o?l&&l():u&&u())},h=function(){s--,s<=0&&(o?l&&l():u&&u())};s||l&&l(),a.length>0&&t.during&&a[0].during(function(p,v){t.during(v)});for(var d=0;d<a.length;d++){var f=a[d];c&&f.done(c),h&&f.aborted(h),t.force&&f.duration(t.duration),f.start(t.easing)}return a}function OS(r,e,t){for(var i=0;i<t;i++)r[i]=e[i]}function zue(r){return Jr(r[0])}function Gue(r,e,t){if(Jr(e[t]))if(Jr(r[t])||(r[t]=[]),Ri(e[t])){var i=e[t].length;r[t].length!==i&&(r[t]=new e[t].constructor(i),OS(r[t],e[t],i))}else{var n=e[t],a=r[t],s=n.length;if(zue(n))for(var o=n[0].length,l=0;l<s;l++)a[l]?OS(a[l],n[l],o):a[l]=Array.prototype.slice.call(n[l]);else OS(a,n,s);a.length=n.length}else r[t]=e[t]}function Hue(r,e){return r===e||Jr(r)&&Jr(e)&&$ue(r,e)}function $ue(r,e){var t=r.length;if(t!==e.length)return!1;for(var i=0;i<t;i++)if(r[i]!==e[i])return!1;return!0}function G9(r,e,t,i,n,a,s,o){for(var l=rt(i),u=n.duration,c=n.delay,h=n.additive,d=n.setToFinal,f=!Ae(a),p=r.animators,v=[],g=0;g<l.length;g++){var m=l[g],y=i[m];if(y!=null&&t[m]!=null&&(f||a[m]))if(Ae(y)&&!Jr(y)&&!dg(y)){if(e){o||(t[m]=y,r.updateDuringAnimation(e));continue}G9(r,m,t[m],y,n,a&&a[m],s,o)}else v.push(m);else o||(t[m]=y,r.updateDuringAnimation(e),v.push(m))}var _=v.length;if(!h&&_)for(var b=0;b<p.length;b++){var T=p[b];if(T.targetName===e){var x=T.stopTracks(v);if(x){var C=Xe(p,T);p.splice(C,1)}}}if(n.force||(v=_t(v,function(L){return!Hue(i[L],t[L])}),_=v.length),_>0||n.force&&!s.length){var D=void 0,I=void 0,M=void 0;if(o){I={},d&&(D={});for(var b=0;b<_;b++){var m=v[b];I[m]=t[m],d?D[m]=i[m]:t[m]=i[m]}}else if(d){M={};for(var b=0;b<_;b++){var m=v[b];M[m]=qp(t[m]),Gue(t,i,m)}}var T=new _D(t,!1,!1,h?_t(p,function(N){return N.targetName===e}):null);T.targetName=e,n.scope&&(T.scope=n.scope),d&&D&&T.whenWithKeys(0,D,v),M&&T.whenWithKeys(0,M,v),T.whenWithKeys(u??500,o?I:i,v).delay(c||0),r.addAnimator(T,e),s.push(T)}}var Le=function(r){j(e,r);function e(t){var i=r.call(this)||this;return i.isGroup=!0,i._children=[],i.attr(t),i}return 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 i=this._children,n=0;n<i.length;n++)if(i[n].name===t)return i[n]},e.prototype.childCount=function(){return this._children.length},e.prototype.add=function(t){return t&&t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),this},e.prototype.addBefore=function(t,i){if(t&&t!==this&&t.parent!==this&&i&&i.parent===this){var n=this._children,a=n.indexOf(i);a>=0&&(n.splice(a,0,t),this._doAdd(t))}return this},e.prototype.replace=function(t,i){var n=Xe(this._children,t);return n>=0&&this.replaceAt(i,n),this},e.prototype.replaceAt=function(t,i){var n=this._children,a=n[i];if(t&&t!==this&&t.parent!==this&&t!==a){n[i]=t,a.parent=null;var s=this.__zr;s&&a.removeSelfFromZr(s),this._doAdd(t)}return this},e.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var i=this.__zr;i&&i!==t.__zr&&t.addSelfToZr(i),i&&i.refresh()},e.prototype.remove=function(t){var i=this.__zr,n=this._children,a=Xe(n,t);return a<0?this:(n.splice(a,1),t.parent=null,i&&t.removeSelfFromZr(i),i&&i.refresh(),this)},e.prototype.removeAll=function(){for(var t=this._children,i=this.__zr,n=0;n<t.length;n++){var a=t[n];i&&a.removeSelfFromZr(i),a.parent=null}return t.length=0,this},e.prototype.eachChild=function(t,i){for(var n=this._children,a=0;a<n.length;a++){var s=n[a];t.call(i,s,a)}return this},e.prototype.traverse=function(t,i){for(var n=0;n<this._children.length;n++){var a=this._children[n],s=t.call(i,a);a.isGroup&&!s&&a.traverse(t,i)}return this},e.prototype.addSelfToZr=function(t){r.prototype.addSelfToZr.call(this,t);for(var i=0;i<this._children.length;i++){var n=this._children[i];n.addSelfToZr(t)}},e.prototype.removeSelfFromZr=function(t){r.prototype.removeSelfFromZr.call(this,t);for(var i=0;i<this._children.length;i++){var n=this._children[i];n.removeSelfFromZr(t)}},e.prototype.getBoundingRect=function(t){for(var i=new We(0,0,0,0),n=t||this._children,a=[],s=null,o=0;o<n.length;o++){var l=n[o];if(!(l.ignore||l.invisible)){var u=l.getBoundingRect(),c=l.getLocalTransform(a);c?(We.applyTransform(i,u,c),s=s||i.clone(),s.union(i)):(s=s||u.clone(),s.union(u))}}return s||i},e}(C1);Le.prototype.type="group";/*!
|
||
* ZRender, a high performance 2d drawing library.
|
||
*
|
||
* Copyright (c) 2013, Baidu Inc.
|
||
* All rights reserved.
|
||
*
|
||
* LICENSE
|
||
* https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
|
||
*/var Ny={},xu={};function Wue(r){delete xu[r]}function que(r){if(!r)return!1;if(typeof r=="string")return Ev(r,1)<n2;if(r.colorStops){for(var e=r.colorStops,t=0,i=e.length,n=0;n<i;n++)t+=Ev(e[n].color,1);return t/=i,t<n2}return!1}var jue=function(){function r(e,t,i){var n=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,i=i||{},this.dom=t,this.id=e;var a=new nue,s=i.renderer||"canvas";Ny[s]||(s=rt(Ny)[0]),i.useDirtyRect=i.useDirtyRect==null?!1:i.useDirtyRect;var o=new Ny[s](t,a,i,e),l=i.ssr||o.ssrOnly;this.storage=a,this.painter=o;var u=!et.node&&!et.worker&&!l?new Bue(o.getViewportRoot(),o.root):null,c=i.useCoarsePointer,h=c==null||c==="auto"?et.touchEventsSupported:!!c,d=44,f;h&&(f=Fe(i.pointerSize,d)),this.handler=new S9(a,o,u,o.root,f),this.animation=new Pue({stage:{update:l?null:function(){return n._flush(!0)}}}),l||this.animation.start()}return r.prototype.add=function(e){this._disposed||!e||(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())},r.prototype.remove=function(e){this._disposed||!e||(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())},r.prototype.configLayer=function(e,t){this._disposed||(this.painter.configLayer&&this.painter.configLayer(e,t),this.refresh())},r.prototype.setBackgroundColor=function(e){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this.refresh(),this._backgroundColor=e,this._darkMode=que(e))},r.prototype.getBackgroundColor=function(){return this._backgroundColor},r.prototype.setDarkMode=function(e){this._darkMode=e},r.prototype.isDarkMode=function(){return this._darkMode},r.prototype.refreshImmediately=function(e){this._disposed||(e||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},r.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},r.prototype.flush=function(){this._disposed||this._flush(!1)},r.prototype._flush=function(e){var t,i=wh();this._needsRefresh&&(t=!0,this.refreshImmediately(e)),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately());var n=wh();t?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:n-i})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},r.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},r.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},r.prototype.refreshHover=function(){this._needsRefreshHover=!0},r.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},r.prototype.resize=function(e){this._disposed||(e=e||{},this.painter.resize(e.width,e.height),this.handler.resize())},r.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},r.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},r.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},r.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},r.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},r.prototype.on=function(e,t,i){return this._disposed||this.handler.on(e,t,i),this},r.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},r.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},r.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t<e.length;t++)e[t]instanceof Le&&e[t].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},r.prototype.dispose=function(){this._disposed||(this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,this._disposed=!0,Wue(this.id))},r}();function o2(r,e){var t=new jue(hD(),r,e);return xu[t.id]=t,t}function Xue(r){r.dispose()}function Yue(){for(var r in xu)xu.hasOwnProperty(r)&&xu[r].dispose();xu={}}function Kue(r){return xu[r]}function H9(r,e){Ny[r]=e}var l2;function $9(r){if(typeof l2=="function")return l2(r)}function W9(r){l2=r}var Zue="5.6.0";const Que=Object.freeze(Object.defineProperty({__proto__:null,dispose:Xue,disposeAll:Yue,getElementSSRData:$9,getInstance:Kue,init:o2,registerPainter:H9,registerSSRDataGetter:W9,version:Zue},Symbol.toStringTag,{value:"Module"}));var Sk=1e-4,q9=20;function Jue(r){return r.replace(/^\s+|\s+$/g,"")}function yt(r,e,t,i){var n=e[0],a=e[1],s=t[0],o=t[1],l=a-n,u=o-s;if(l===0)return u===0?s:(s+o)/2;if(i)if(l>0){if(r<=n)return s;if(r>=a)return o}else{if(r>=n)return s;if(r<=a)return o}else{if(r===n)return s;if(r===a)return o}return(r-n)/l*u+s}function ce(r,e){switch(r){case"center":case"middle":r="50%";break;case"left":case"top":r="0%";break;case"right":case"bottom":r="100%";break}return de(r)?Jue(r).match(/%$/)?parseFloat(r)/100*e:parseFloat(r):r==null?NaN:+r}function Yt(r,e,t){return e==null&&(e=10),e=Math.min(Math.max(0,e),q9),r=(+r).toFixed(e),t?r:+r}function mn(r){return r.sort(function(e,t){return e-t}),r}function ma(r){if(r=+r,isNaN(r))return 0;if(r>1e-14){for(var e=1,t=0;t<15;t++,e*=10)if(Math.round(r*e)/e===r)return t}return j9(r)}function j9(r){var e=r.toString().toLowerCase(),t=e.indexOf("e"),i=t>0?+e.slice(t+1):0,n=t>0?t:e.length,a=e.indexOf("."),s=a<0?0:n-1-a;return Math.max(0,s-i)}function bD(r,e){var t=Math.log,i=Math.LN10,n=Math.floor(t(r[1]-r[0])/i),a=Math.round(t(Math.abs(e[1]-e[0]))/i),s=Math.min(Math.max(-n+a,0),20);return isFinite(s)?s:20}function ece(r,e,t){if(!r[e])return 0;var i=X9(r,t);return i[e]||0}function X9(r,e){var t=Qn(r,function(f,p){return f+(isNaN(p)?0:p)},0);if(t===0)return[];for(var i=Math.pow(10,e),n=ae(r,function(f){return(isNaN(f)?0:f)/t*i*100}),a=i*100,s=ae(n,function(f){return Math.floor(f)}),o=Qn(s,function(f,p){return f+p},0),l=ae(n,function(f,p){return f-s[p]});o<a;){for(var u=Number.NEGATIVE_INFINITY,c=null,h=0,d=l.length;h<d;++h)l[h]>u&&(u=l[h],c=h);++s[c],l[c]=0,++o}return ae(s,function(f){return f/i})}function tce(r,e){var t=Math.max(ma(r),ma(e)),i=r+e;return t>q9?i:Yt(i,t)}var u2=9007199254740991;function SD(r){var e=Math.PI*2;return(r%e+e)%e}function mf(r){return r>-Sk&&r<Sk}var rce=/^(?:(\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 Cn(r){if(r instanceof Date)return r;if(de(r)){var e=rce.exec(r);if(!e)return new Date(NaN);if(e[8]){var t=+e[4]||0;return e[8].toUpperCase()!=="Z"&&(t-=+e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,t,+(e[5]||0),+e[6]||0,e[7]?+e[7].substring(0,3):0))}else return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,e[7]?+e[7].substring(0,3):0)}else if(r==null)return new Date(NaN);return new Date(Math.round(r))}function Y9(r){return Math.pow(10,A1(r))}function A1(r){if(r===0)return 0;var e=Math.floor(Math.log(r)/Math.LN10);return r/Math.pow(10,e)>=10&&e++,e}function TD(r,e){var t=A1(r),i=Math.pow(10,t),n=r/i,a;return e?n<1.5?a=1:n<2.5?a=2:n<4?a=3:n<7?a=5:a=10:n<1?a=1:n<2?a=2:n<3?a=3:n<5?a=5:a=10,r=a*i,t>=-20?+r.toFixed(t<0?-t:0):r}function By(r,e){var t=(r.length-1)*e+1,i=Math.floor(t),n=+r[i-1],a=t-i;return a?n+a*(r[i]-n):n}function c2(r){r.sort(function(l,u){return o(l,u,0)?-1:1});for(var e=-1/0,t=1,i=0;i<r.length;){for(var n=r[i].interval,a=r[i].close,s=0;s<2;s++)n[s]<=e&&(n[s]=e,a[s]=s?1:1-t),e=n[s],t=a[s];n[0]===n[1]&&a[0]*a[1]!==1?r.splice(i,1):i++}return r;function o(l,u,c){return l.interval[c]<u.interval[c]||l.interval[c]===u.interval[c]&&(l.close[c]-u.close[c]===(c?-1:1)||!c&&o(l,u,1))}}function vs(r){var e=parseFloat(r);return e==r&&(e!==0||!de(r)||r.indexOf("x")<=0)?e:NaN}function xD(r){return!isNaN(vs(r))}function K9(){return Math.round(Math.random()*9)}function Z9(r,e){return e===0?r:Z9(e,r%e)}function Tk(r,e){return r==null?e:e==null?r:r*e/Z9(r,e)}function gt(r){throw new Error(r)}function xk(r,e,t){return(e-r)*t+r}var Q9="series\0",J9="\0_ec_\0";function wt(r){return r instanceof Array?r:r==null?[]:[r]}function ac(r,e,t){if(r){r[e]=r[e]||{},r.emphasis=r.emphasis||{},r.emphasis[e]=r.emphasis[e]||{};for(var i=0,n=t.length;i<n;i++){var a=t[i];!r.emphasis[e].hasOwnProperty(a)&&r[e].hasOwnProperty(a)&&(r.emphasis[e][a]=r[e][a])}}}var wk=["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 Ff(r){return Ae(r)&&!ie(r)&&!(r instanceof Date)?r.value:r}function ice(r){return Ae(r)&&!(r instanceof Array)}function eH(r,e,t){var i=t==="normalMerge",n=t==="replaceMerge",a=t==="replaceAll";r=r||[],e=(e||[]).slice();var s=be();R(e,function(l,u){if(!Ae(l)){e[u]=null;return}});var o=nce(r,s,t);return(i||n)&&ace(o,r,s,e),i&&sce(o,e),i||n?oce(o,e,n):a&&lce(o,e),uce(o),o}function nce(r,e,t){var i=[];if(t==="replaceAll")return i;for(var n=0;n<r.length;n++){var a=r[n];a&&a.id!=null&&e.set(a.id,n),i.push({existing:t==="replaceMerge"||Pv(a)?null:a,newOption:null,keyInfo:null,brandNew:null})}return i}function ace(r,e,t,i){R(i,function(n,a){if(!(!n||n.id==null)){var s=jp(n.id),o=t.get(s);if(o!=null){var l=r[o];fi(!l.newOption,'Duplicated option on id "'+s+'".'),l.newOption=n,l.existing=e[o],i[a]=null}}})}function sce(r,e){R(e,function(t,i){if(!(!t||t.name==null))for(var n=0;n<r.length;n++){var a=r[n].existing;if(!r[n].newOption&&a&&(a.id==null||t.id==null)&&!Pv(t)&&!Pv(a)&&tH("name",a,t)){r[n].newOption=t,e[i]=null;return}}})}function oce(r,e,t){R(e,function(i){if(i){for(var n,a=0;(n=r[a])&&(n.newOption||Pv(n.existing)||n.existing&&i.id!=null&&!tH("id",i,n.existing));)a++;n?(n.newOption=i,n.brandNew=t):r.push({newOption:i,brandNew:t,existing:null,keyInfo:null}),a++}})}function lce(r,e){R(e,function(t){r.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})})}function uce(r){var e=be();R(r,function(t){var i=t.existing;i&&e.set(i.id,t)}),R(r,function(t){var i=t.newOption;fi(!i||i.id==null||!e.get(i.id)||e.get(i.id)===t,"id duplicates: "+(i&&i.id)),i&&i.id!=null&&e.set(i.id,t),!t.keyInfo&&(t.keyInfo={})}),R(r,function(t,i){var n=t.existing,a=t.newOption,s=t.keyInfo;if(Ae(a)){if(s.name=a.name!=null?jp(a.name):n?n.name:Q9+i,n)s.id=jp(n.id);else if(a.id!=null)s.id=jp(a.id);else{var o=0;do s.id="\0"+s.name+"\0"+o++;while(e.get(s.id))}e.set(s.id,t)}})}function tH(r,e,t){var i=Cr(e[r],null),n=Cr(t[r],null);return i!=null&&n!=null&&i===n}function jp(r){return Cr(r,"")}function Cr(r,e){return r==null?e:de(r)?r:ut(r)||B0(r)?r+"":e}function wD(r){var e=r.name;return!!(e&&e.indexOf(Q9))}function Pv(r){return r&&r.id!=null&&jp(r.id).indexOf(J9)===0}function cce(r){return J9+r}function hce(r,e,t){R(r,function(i){var n=i.newOption;Ae(n)&&(i.keyInfo.mainType=e,i.keyInfo.subType=fce(e,n,i.existing,t))})}function fce(r,e,t,i){var n=e.type?e.type:t?t.subType:i.determineSubType(r,e);return n}function dce(r,e){var t={},i={};return n(r||[],t),n(e||[],i,t),[a(t),a(i)];function n(s,o,l){for(var u=0,c=s.length;u<c;u++){var h=Cr(s[u].seriesId,null);if(h==null)return;for(var d=wt(s[u].dataIndex),f=l&&l[h],p=0,v=d.length;p<v;p++){var g=d[p];f&&f[g]?f[g]=null:(o[h]||(o[h]={}))[g]=1}}}function a(s,o){var l=[];for(var u in s)if(s.hasOwnProperty(u)&&s[u]!=null)if(o)l.push(+u);else{var c=a(s[u],!0);c.length&&l.push({seriesId:u,dataIndex:c})}return l}}function sc(r,e){if(e.dataIndexInside!=null)return e.dataIndexInside;if(e.dataIndex!=null)return ie(e.dataIndex)?ae(e.dataIndex,function(t){return r.indexOfRawIndex(t)}):r.indexOfRawIndex(e.dataIndex);if(e.name!=null)return ie(e.name)?ae(e.name,function(t){return r.indexOfName(t)}):r.indexOfName(e.name)}function lt(){var r="__ec_inner_"+pce++;return function(e){return e[r]||(e[r]={})}}var pce=K9();function Xp(r,e,t){var i=CD(e,t),n=i.mainTypeSpecified,a=i.queryOptionMap,s=i.others,o=s,l=t?t.defaultMainType:null;return!n&&l&&a.set(l,{}),a.each(function(u,c){var h=yg(r,c,u,{useDefault:l===c,enableAll:t&&t.enableAll!=null?t.enableAll:!0,enableNone:t&&t.enableNone!=null?t.enableNone:!0});o[c+"Models"]=h.models,o[c+"Model"]=h.models[0]}),o}function CD(r,e){var t;if(de(r)){var i={};i[r+"Index"]=0,t=i}else t=r;var n=be(),a={},s=!1;return R(t,function(o,l){if(l==="dataIndex"||l==="dataIndexInside"){a[l]=o;return}var u=l.match(/^(\w+)(Index|Id|Name)$/)||[],c=u[1],h=(u[2]||"").toLowerCase();if(!(!c||!h||e&&e.includeMainTypes&&Xe(e.includeMainTypes,c)<0)){s=s||!!c;var d=n.get(c)||n.set(c,{});d[h]=o}}),{mainTypeSpecified:s,queryOptionMap:n,others:a}}var _r={useDefault:!0,enableAll:!1,enableNone:!1},vce={useDefault:!1,enableAll:!0,enableNone:!0};function yg(r,e,t,i){i=i||_r;var n=t.index,a=t.id,s=t.name,o={models:null,specified:n!=null||a!=null||s!=null};if(!o.specified){var l=void 0;return o.models=i.useDefault&&(l=r.getComponent(e))?[l]:[],o}return n==="none"||n===!1?(fi(i.enableNone,'`"none"` or `false` is not a valid value on index option.'),o.models=[],o):(n==="all"&&(fi(i.enableAll,'`"all"` is not a valid value on index option.'),n=a=s=null),o.models=r.queryComponents({mainType:e,index:n,id:a,name:s}),o)}function rH(r,e,t){r.setAttribute?r.setAttribute(e,t):r[e]=t}function gce(r,e){return r.getAttribute?r.getAttribute(e):r[e]}function mce(r){return r==="auto"?et.domSupported?"html":"richText":r||"html"}function h2(r,e){var t=be(),i=[];return R(r,function(n){var a=e(n);(t.get(a)||(i.push(a),t.set(a,[]))).push(n)}),{keys:i,buckets:t}}function iH(r,e,t,i,n){var a=e==null||e==="auto";if(i==null)return i;if(ut(i)){var s=xk(t||0,i,n);return Yt(s,a?Math.max(ma(t||0),ma(i)):e)}else{if(de(i))return n<1?t:i;for(var o=[],l=t,u=i,c=Math.max(l?l.length:0,u.length),h=0;h<c;++h){var d=r.getDimensionInfo(h);if(d&&d.type==="ordinal")o[h]=(n<1&&l?l:u)[h];else{var f=l&&l[h]?l[h]:0,p=u[h],s=xk(f,p,n);o[h]=Yt(s,a?Math.max(ma(f),ma(p)):e)}}return o}}var yce=".",Vl="___EC__COMPONENT__CONTAINER___",nH="___EC__EXTENDED_CLASS___";function es(r){var e={main:"",sub:""};if(r){var t=r.split(yce);e.main=t[0]||"",e.sub=t[1]||""}return e}function _ce(r){fi(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(r),'componentType "'+r+'" illegal')}function bce(r){return!!(r&&r[nH])}function AD(r,e){r.$constructor=r,r.extend=function(t){var i=this,n;return Sce(i)?n=function(a){j(s,a);function s(){return a.apply(this,arguments)||this}return s}(i):(n=function(){(t.$constructor||i).apply(this,arguments)},fD(n,this)),Q(n.prototype,t),n[nH]=!0,n.extend=this.extend,n.superCall=wce,n.superApply=Cce,n.superClass=i,n}}function Sce(r){return xe(r)&&/^class\s/.test(Function.prototype.toString.call(r))}function aH(r,e){r.extend=e.extend}var Tce=Math.round(Math.random()*10);function xce(r){var e=["__\0is_clz",Tce++].join("_");r.prototype[e]=!0,r.isInstance=function(t){return!!(t&&t[e])}}function wce(r,e){for(var t=[],i=2;i<arguments.length;i++)t[i-2]=arguments[i];return this.superClass.prototype[e].apply(r,t)}function Cce(r,e,t){return this.superClass.prototype[e].apply(r,t)}function D1(r){var e={};r.registerClass=function(i){var n=i.type||i.prototype.type;if(n){_ce(n),i.prototype.type=n;var a=es(n);if(!a.sub)e[a.main]=i;else if(a.sub!==Vl){var s=t(a);s[a.sub]=i}}return i},r.getClass=function(i,n,a){var s=e[i];if(s&&s[Vl]&&(s=n?s[n]:null),a&&!s)throw new Error(n?"Component "+i+"."+(n||"")+" is used but not imported.":i+".type should be specified.");return s},r.getClassesByMainType=function(i){var n=es(i),a=[],s=e[n.main];return s&&s[Vl]?R(s,function(o,l){l!==Vl&&a.push(o)}):a.push(s),a},r.hasClass=function(i){var n=es(i);return!!e[n.main]},r.getAllClassMainTypes=function(){var i=[];return R(e,function(n,a){i.push(a)}),i},r.hasSubTypes=function(i){var n=es(i),a=e[n.main];return a&&a[Vl]};function t(i){var n=e[i.main];return(!n||!n[Vl])&&(n=e[i.main]={},n[Vl]=!0),n}}function oc(r,e){for(var t=0;t<r.length;t++)r[t][1]||(r[t][1]=r[t][0]);return e=e||!1,function(i,n,a){for(var s={},o=0;o<r.length;o++){var l=r[o][1];if(!(n&&Xe(n,l)>=0||a&&Xe(a,l)<0)){var u=i.getShallow(l,e);u!=null&&(s[r[o][0]]=u)}}return s}}var Ace=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],Dce=oc(Ace),Ece=function(){function r(){}return r.prototype.getAreaStyle=function(e,t){return Dce(this,e,t)},r}(),f2=new gg(50);function Ice(r){if(typeof r=="string"){var e=f2.get(r);return e&&e.image}else return r}function DD(r,e,t,i,n){if(r)if(typeof r=="string"){if(e&&e.__zrImageSrc===r||!t)return e;var a=f2.get(r),s={hostEl:t,cb:i,cbPayload:n};return a?(e=a.image,!E1(e)&&a.pending.push(s)):(e=Aa.loadImage(r,Ck,Ck),e.__zrImageSrc=r,f2.put(r,e.__cachedImgObj={image:e,pending:[s]})),e}else return r;else return e}function Ck(){var r=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<r.pending.length;e++){var t=r.pending[e],i=t.cb;i&&i(this,t.cbPayload),t.hostEl.dirty()}r.pending.length=0}function E1(r){return r&&r.width&&r.height}var NS=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function sH(r,e,t,i,n){if(!e)return"";var a=(r+"").split(`
|
||
`);n=oH(e,t,i,n);for(var s=0,o=a.length;s<o;s++)a[s]=lH(a[s],n);return a.join(`
|
||
`)}function oH(r,e,t,i){i=i||{};var n=Q({},i);n.font=e,t=Fe(t,"..."),n.maxIterations=Fe(i.maxIterations,2);var a=n.minChar=Fe(i.minChar,0);n.cnCharWidth=Sn("国",e);var s=n.ascCharWidth=Sn("a",e);n.placeholder=Fe(i.placeholder,"");for(var o=r=Math.max(0,r-1),l=0;l<a&&o>=s;l++)o-=s;var u=Sn(t,e);return u>o&&(t="",u=0),o=r-u,n.ellipsis=t,n.ellipsisWidth=u,n.contentWidth=o,n.containerWidth=r,n}function lH(r,e){var t=e.containerWidth,i=e.font,n=e.contentWidth;if(!t)return"";var a=Sn(r,i);if(a<=t)return r;for(var s=0;;s++){if(a<=n||s>=e.maxIterations){r+=e.ellipsis;break}var o=s===0?Pce(r,n,e.ascCharWidth,e.cnCharWidth):a>0?Math.floor(r.length*n/a):0;r=r.substr(0,o),a=Sn(r,i)}return r===""&&(r=e.placeholder),r}function Pce(r,e,t,i){for(var n=0,a=0,s=r.length;a<s&&n<e;a++){var o=r.charCodeAt(a);n+=0<=o&&o<=127?t:i}return a}function Mce(r,e){r!=null&&(r+="");var t=e.overflow,i=e.padding,n=e.font,a=t==="truncate",s=w1(n),o=Fe(e.lineHeight,s),l=!!e.backgroundColor,u=e.lineOverflow==="truncate",c=e.width,h;c!=null&&(t==="break"||t==="breakAll")?h=r?uH(r,e.font,c,t==="breakAll",0).lines:[]:h=r?r.split(`
|
||
`):[];var d=h.length*o,f=Fe(e.height,d);if(d>f&&u){var p=Math.floor(f/o);h=h.slice(0,p)}if(r&&a&&c!=null)for(var v=oH(c,n,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),g=0;g<h.length;g++)h[g]=lH(h[g],v);for(var m=f,y=0,g=0;g<h.length;g++)y=Math.max(Sn(h[g],n),y);c==null&&(c=y);var _=y;return i&&(m+=i[0]+i[2],_+=i[1]+i[3],c+=i[1]+i[3]),l&&(_=c),{lines:h,height:f,outerWidth:_,outerHeight:m,lineHeight:o,calculatedLineHeight:s,contentWidth:y,contentHeight:d,width:c}}var Lce=function(){function r(){}return r}(),Ak=function(){function r(e){this.tokens=[],e&&(this.tokens=e)}return r}(),kce=function(){function r(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[]}return r}();function Rce(r,e){var t=new kce;if(r!=null&&(r+=""),!r)return t;for(var i=e.width,n=e.height,a=e.overflow,s=(a==="break"||a==="breakAll")&&i!=null?{width:i,accumWidth:0,breakAll:a==="breakAll"}:null,o=NS.lastIndex=0,l;(l=NS.exec(r))!=null;){var u=l.index;u>o&&BS(t,r.substring(o,u),e,s),BS(t,l[2],e,s,l[1]),o=NS.lastIndex}o<r.length&&BS(t,r.substring(o,r.length),e,s);var c=[],h=0,d=0,f=e.padding,p=a==="truncate",v=e.lineOverflow==="truncate";function g(q,Z,te){q.width=Z,q.lineHeight=te,h+=te,d=Math.max(d,Z)}e:for(var m=0;m<t.lines.length;m++){for(var y=t.lines[m],_=0,b=0,T=0;T<y.tokens.length;T++){var x=y.tokens[T],C=x.styleName&&e.rich[x.styleName]||{},D=x.textPadding=C.padding,I=D?D[1]+D[3]:0,M=x.font=C.font||e.font;x.contentHeight=w1(M);var L=Fe(C.height,x.contentHeight);if(x.innerHeight=L,D&&(L+=D[0]+D[2]),x.height=L,x.lineHeight=Ta(C.lineHeight,e.lineHeight,L),x.align=C&&C.align||e.align,x.verticalAlign=C&&C.verticalAlign||"middle",v&&n!=null&&h+x.lineHeight>n){T>0?(y.tokens=y.tokens.slice(0,T),g(y,b,_),t.lines=t.lines.slice(0,m+1)):t.lines=t.lines.slice(0,m);break e}var N=C.width,O=N==null||N==="auto";if(typeof N=="string"&&N.charAt(N.length-1)==="%")x.percentWidth=N,c.push(x),x.contentWidth=Sn(x.text,M);else{if(O){var B=C.backgroundColor,F=B&&B.image;F&&(F=Ice(F),E1(F)&&(x.width=Math.max(x.width,F.width*L/F.height)))}var U=p&&i!=null?i-b:null;U!=null&&U<x.width?!O||U<I?(x.text="",x.width=x.contentWidth=0):(x.text=sH(x.text,U-I,M,e.ellipsis,{minChar:e.truncateMinChar}),x.width=x.contentWidth=Sn(x.text,M)):x.contentWidth=Sn(x.text,M)}x.width+=I,b+=x.width,C&&(_=Math.max(_,x.lineHeight))}g(y,b,_)}t.outerWidth=t.width=Fe(i,d),t.outerHeight=t.height=Fe(n,h),t.contentHeight=h,t.contentWidth=d,f&&(t.outerWidth+=f[1]+f[3],t.outerHeight+=f[0]+f[2]);for(var m=0;m<c.length;m++){var x=c[m],$=x.percentWidth;x.width=parseInt($,10)/100*t.width}return t}function BS(r,e,t,i,n){var a=e==="",s=n&&t.rich[n]||{},o=r.lines,l=s.font||t.font,u=!1,c,h;if(i){var d=s.padding,f=d?d[1]+d[3]:0;if(s.width!=null&&s.width!=="auto"){var p=Ea(s.width,i.width)+f;o.length>0&&p+i.accumWidth>i.width&&(c=e.split(`
|
||
`),u=!0),i.accumWidth=p}else{var v=uH(e,l,i.width,i.breakAll,i.accumWidth);i.accumWidth=v.accumWidth+f,h=v.linesWidths,c=v.lines}}else c=e.split(`
|
||
`);for(var g=0;g<c.length;g++){var m=c[g],y=new Lce;if(y.styleName=n,y.text=m,y.isLineHolder=!m&&!a,typeof s.width=="number"?y.width=s.width:y.width=h?h[g]:Sn(m,l),!g&&!u){var _=(o[o.length-1]||(o[0]=new Ak)).tokens,b=_.length;b===1&&_[0].isLineHolder?_[0]=y:(m||!b||a)&&_.push(y)}else o.push(new Ak([y]))}}function Oce(r){var e=r.charCodeAt(0);return e>=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}var Nce=Qn(",&?/;] ".split(""),function(r,e){return r[e]=!0,r},{});function Bce(r){return Oce(r)?!!Nce[r]:!0}function uH(r,e,t,i,n){for(var a=[],s=[],o="",l="",u=0,c=0,h=0;h<r.length;h++){var d=r.charAt(h);if(d===`
|
||
`){l&&(o+=l,c+=u),a.push(o),s.push(c),o="",l="",u=0,c=0;continue}var f=Sn(d,e),p=i?!1:!Bce(d);if(a.length?c+f>t:n+c+f>t){c?(o||l)&&(p?(o||(o=l,l="",u=0,c=u),a.push(o),s.push(c-u),l+=d,u+=f,o="",c=u):(l&&(o+=l,l="",u=0),a.push(o),s.push(c),o=d,c=f)):p?(a.push(l),s.push(u),l=d,u=f):(a.push(d),s.push(f));continue}c+=f,p?(l+=d,u+=f):(l&&(o+=l,l="",u=0),o+=d)}return!a.length&&!o&&(o=r,l="",u=0),l&&(o+=l),o&&(a.push(o),s.push(c)),a.length===1&&(c+=n),{accumWidth:c,lines:a,linesWidths:s}}var d2="__zr_style_"+Math.round(Math.random()*10),Wu={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},I1={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Wu[d2]=!0;var Dk=["z","z2","invisible"],Fce=["invisible"],Jn=function(r){j(e,r);function e(t){return r.call(this,t)||this}return e.prototype._init=function(t){for(var i=rt(t),n=0;n<i.length;n++){var a=i[n];a==="style"?this.useStyle(t[a]):r.prototype.attrKV.call(this,a,t[a])}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,i,n,a){var s=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&Uce(this,t,i)||s&&!s[0]&&!s[3])return!1;if(n&&this.__clipPaths){for(var o=0;o<this.__clipPaths.length;++o)if(this.__clipPaths[o].isZeroArea())return!1}if(a&&this.parent)for(var l=this.parent;l;){if(l.ignore)return!1;l=l.parent}return!0},e.prototype.contain=function(t,i){return this.rectContain(t,i)},e.prototype.traverse=function(t,i){t.call(i,this)},e.prototype.rectContain=function(t,i){var n=this.transformCoordToLocal(t,i),a=this.getBoundingRect();return a.contain(n[0],n[1])},e.prototype.getPaintRect=function(){var t=this._paintRect;if(!this._paintRect||this.__dirty){var i=this.transform,n=this.getBoundingRect(),a=this.style,s=a.shadowBlur||0,o=a.shadowOffsetX||0,l=a.shadowOffsetY||0;t=this._paintRect||(this._paintRect=new We(0,0,0,0)),i?We.applyTransform(t,n,i):t.copy(n),(s||o||l)&&(t.width+=s*2+Math.abs(o),t.height+=s*2+Math.abs(l),t.x=Math.min(t.x,t.x+o-s),t.y=Math.min(t.y,t.y+l-s));var u=this.dirtyRectTolerance;t.isZero()||(t.x=Math.floor(t.x-u),t.y=Math.floor(t.y-u),t.width=Math.ceil(t.width+1+u*2),t.height=Math.ceil(t.height+1+u*2))}return t},e.prototype.setPrevPaintRect=function(t){t?(this._prevPaintRect=this._prevPaintRect||new We(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){t==="style"?this.dirtyStyle():this.markRedraw()},e.prototype.attrKV=function(t,i){t!=="style"?r.prototype.attrKV.call(this,t,i):this.style?this.setStyle(i):this.useStyle(i)},e.prototype.setStyle=function(t,i){return typeof t=="string"?this.style[t]=i:Q(this.style,t),this.dirtyStyle(),this},e.prototype.dirtyStyle=function(t){t||this.markRedraw(),this.__dirty|=vp,this._rect&&(this._rect=null)},e.prototype.dirty=function(){this.dirtyStyle()},e.prototype.styleChanged=function(){return!!(this.__dirty&vp)},e.prototype.styleUpdated=function(){this.__dirty&=~vp},e.prototype.createStyle=function(t){return pg(Wu,t)},e.prototype.useStyle=function(t){t[d2]||(t=this.createStyle(t)),this.__inHover?this.__hoverStyle=t:this.style=t,this.dirtyStyle()},e.prototype.isStyleObject=function(t){return t[d2]},e.prototype._innerSaveToNormal=function(t){r.prototype._innerSaveToNormal.call(this,t);var i=this._normalState;t.style&&!i.style&&(i.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(t,i,Dk)},e.prototype._applyStateObj=function(t,i,n,a,s,o){r.prototype._applyStateObj.call(this,t,i,n,a,s,o);var l=!(i&&a),u;if(i&&i.style?s?a?u=i.style:(u=this._mergeStyle(this.createStyle(),n.style),this._mergeStyle(u,i.style)):(u=this._mergeStyle(this.createStyle(),a?this.style:n.style),this._mergeStyle(u,i.style)):l&&(u=n.style),u)if(s){var c=this.style;if(this.style=this.createStyle(l?{}:c),l)for(var h=rt(c),d=0;d<h.length;d++){var f=h[d];f in u&&(u[f]=u[f],this.style[f]=c[f])}for(var p=rt(u),d=0;d<p.length;d++){var f=p[d];this.style[f]=this.style[f]}this._transitionState(t,{style:u},o,this.getAnimationStyleProps())}else this.useStyle(u);for(var v=this.__inHover?Fce:Dk,d=0;d<v.length;d++){var f=v[d];i&&i[f]!=null?this[f]=i[f]:l&&n[f]!=null&&(this[f]=n[f])}},e.prototype._mergeStates=function(t){for(var i=r.prototype._mergeStates.call(this,t),n,a=0;a<t.length;a++){var s=t[a];s.style&&(n=n||{},this._mergeStyle(n,s.style))}return n&&(i.style=n),i},e.prototype._mergeStyle=function(t,i){return Q(t,i),t},e.prototype.getAnimationStyleProps=function(){return I1},e.initDefaultProps=function(){var t=e.prototype;t.type="displayable",t.invisible=!1,t.z=0,t.z2=0,t.zlevel=0,t.culling=!1,t.cursor="pointer",t.rectHover=!1,t.incremental=!1,t._rect=null,t.dirtyRectTolerance=0,t.__dirty=pn|vp}(),e}(C1),FS=new We(0,0,0,0),US=new We(0,0,0,0);function Uce(r,e,t){return FS.copy(r.getBoundingRect()),r.transform&&FS.applyTransform(r.transform),US.width=e,US.height=t,!FS.intersect(US)}var Gi=Math.min,Hi=Math.max,VS=Math.sin,zS=Math.cos,zl=Math.PI*2,Em=pl(),Im=pl(),Pm=pl();function P1(r,e,t){if(r.length!==0){for(var i=r[0],n=i[0],a=i[0],s=i[1],o=i[1],l=1;l<r.length;l++)i=r[l],n=Gi(n,i[0]),a=Hi(a,i[0]),s=Gi(s,i[1]),o=Hi(o,i[1]);e[0]=n,e[1]=s,t[0]=a,t[1]=o}}function Ek(r,e,t,i,n,a){n[0]=Gi(r,t),n[1]=Gi(e,i),a[0]=Hi(r,t),a[1]=Hi(e,i)}var Ik=[],Pk=[];function Vce(r,e,t,i,n,a,s,o,l,u){var c=A9,h=Lr,d=c(r,t,n,s,Ik);l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0;for(var f=0;f<d;f++){var p=h(r,t,n,s,Ik[f]);l[0]=Gi(p,l[0]),u[0]=Hi(p,u[0])}d=c(e,i,a,o,Pk);for(var f=0;f<d;f++){var v=h(e,i,a,o,Pk[f]);l[1]=Gi(v,l[1]),u[1]=Hi(v,u[1])}l[0]=Gi(r,l[0]),u[0]=Hi(r,u[0]),l[0]=Gi(s,l[0]),u[0]=Hi(s,u[0]),l[1]=Gi(e,l[1]),u[1]=Hi(e,u[1]),l[1]=Gi(o,l[1]),u[1]=Hi(o,u[1])}function zce(r,e,t,i,n,a,s,o){var l=E9,u=zr,c=Hi(Gi(l(r,t,n),1),0),h=Hi(Gi(l(e,i,a),1),0),d=u(r,t,n,c),f=u(e,i,a,h);s[0]=Gi(r,n,d),s[1]=Gi(e,a,f),o[0]=Hi(r,n,d),o[1]=Hi(e,a,f)}function Gce(r,e,t,i,n,a,s,o,l){var u=Fs,c=Us,h=Math.abs(n-a);if(h%zl<1e-4&&h>1e-4){o[0]=r-t,o[1]=e-i,l[0]=r+t,l[1]=e+i;return}if(Em[0]=zS(n)*t+r,Em[1]=VS(n)*i+e,Im[0]=zS(a)*t+r,Im[1]=VS(a)*i+e,u(o,Em,Im),c(l,Em,Im),n=n%zl,n<0&&(n=n+zl),a=a%zl,a<0&&(a=a+zl),n>a&&!s?a+=zl:n<a&&s&&(n+=zl),s){var d=a;a=n,n=d}for(var f=0;f<a;f+=Math.PI/2)f>n&&(Pm[0]=zS(f)*t+r,Pm[1]=VS(f)*i+e,u(o,Pm,o),c(l,Pm,l))}var It={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Gl=[],Hl=[],Oa=[],bo=[],Na=[],Ba=[],GS=Math.min,HS=Math.max,$l=Math.cos,Wl=Math.sin,ws=Math.abs,p2=Math.PI,Eo=p2*2,$S=typeof Float32Array<"u",Ld=[];function WS(r){var e=Math.round(r/p2*1e8)/1e8;return e%2*p2}function ED(r,e){var t=WS(r[0]);t<0&&(t+=Eo);var i=t-r[0],n=r[1];n+=i,!e&&n-t>=Eo?n=t+Eo:e&&t-n>=Eo?n=t-Eo:!e&&t>n?n=t+(Eo-WS(t-n)):e&&t<n&&(n=t-(Eo-WS(n-t))),r[0]=t,r[1]=n}var gs=function(){function r(e){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,e&&(this._saveData=!1),this._saveData&&(this.data=[])}return r.prototype.increaseVersion=function(){this._version++},r.prototype.getVersion=function(){return this._version},r.prototype.setScale=function(e,t,i){i=i||0,i>0&&(this._ux=ws(i/q0/e)||0,this._uy=ws(i/q0/t)||0)},r.prototype.setDPR=function(e){this.dpr=e},r.prototype.setContext=function(e){this._ctx=e},r.prototype.getContext=function(){return this._ctx},r.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},r.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},r.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(It.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},r.prototype.lineTo=function(e,t){var i=ws(e-this._xi),n=ws(t-this._yi),a=i>this._ux||n>this._uy;if(this.addData(It.L,e,t),this._ctx&&a&&this._ctx.lineTo(e,t),a)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var s=i*i+n*n;s>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=s)}return this},r.prototype.bezierCurveTo=function(e,t,i,n,a,s){return this._drawPendingPt(),this.addData(It.C,e,t,i,n,a,s),this._ctx&&this._ctx.bezierCurveTo(e,t,i,n,a,s),this._xi=a,this._yi=s,this},r.prototype.quadraticCurveTo=function(e,t,i,n){return this._drawPendingPt(),this.addData(It.Q,e,t,i,n),this._ctx&&this._ctx.quadraticCurveTo(e,t,i,n),this._xi=i,this._yi=n,this},r.prototype.arc=function(e,t,i,n,a,s){this._drawPendingPt(),Ld[0]=n,Ld[1]=a,ED(Ld,s),n=Ld[0],a=Ld[1];var o=a-n;return this.addData(It.A,e,t,i,i,n,o,0,s?0:1),this._ctx&&this._ctx.arc(e,t,i,n,a,s),this._xi=$l(a)*i+e,this._yi=Wl(a)*i+t,this},r.prototype.arcTo=function(e,t,i,n,a){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,i,n,a),this},r.prototype.rect=function(e,t,i,n){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,i,n),this.addData(It.R,e,t,i,n),this},r.prototype.closePath=function(){this._drawPendingPt(),this.addData(It.Z);var e=this._ctx,t=this._x0,i=this._y0;return e&&e.closePath(),this._xi=t,this._yi=i,this},r.prototype.fill=function(e){e&&e.fill(),this.toStatic()},r.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},r.prototype.len=function(){return this._len},r.prototype.setData=function(e){var t=e.length;!(this.data&&this.data.length===t)&&$S&&(this.data=new Float32Array(t));for(var i=0;i<t;i++)this.data[i]=e[i];this._len=t},r.prototype.appendPath=function(e){e instanceof Array||(e=[e]);for(var t=e.length,i=0,n=this._len,a=0;a<t;a++)i+=e[a].len();$S&&this.data instanceof Float32Array&&(this.data=new Float32Array(n+i));for(var a=0;a<t;a++)for(var s=e[a].data,o=0;o<s.length;o++)this.data[n++]=s[o];this._len=n},r.prototype.addData=function(e,t,i,n,a,s,o,l,u){if(this._saveData){var c=this.data;this._len+arguments.length>c.length&&(this._expandData(),c=this.data);for(var h=0;h<arguments.length;h++)c[this._len++]=arguments[h]}},r.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},r.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t<this._len;t++)e[t]=this.data[t];this.data=e}},r.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var e=this.data;e instanceof Array&&(e.length=this._len,$S&&this._len>11&&(this.data=new Float32Array(e)))}},r.prototype.getBoundingRect=function(){Oa[0]=Oa[1]=Na[0]=Na[1]=Number.MAX_VALUE,bo[0]=bo[1]=Ba[0]=Ba[1]=-Number.MAX_VALUE;var e=this.data,t=0,i=0,n=0,a=0,s;for(s=0;s<this._len;){var o=e[s++],l=s===1;switch(l&&(t=e[s],i=e[s+1],n=t,a=i),o){case It.M:t=n=e[s++],i=a=e[s++],Na[0]=n,Na[1]=a,Ba[0]=n,Ba[1]=a;break;case It.L:Ek(t,i,e[s],e[s+1],Na,Ba),t=e[s++],i=e[s++];break;case It.C:Vce(t,i,e[s++],e[s++],e[s++],e[s++],e[s],e[s+1],Na,Ba),t=e[s++],i=e[s++];break;case It.Q:zce(t,i,e[s++],e[s++],e[s],e[s+1],Na,Ba),t=e[s++],i=e[s++];break;case It.A:var u=e[s++],c=e[s++],h=e[s++],d=e[s++],f=e[s++],p=e[s++]+f;s+=1;var v=!e[s++];l&&(n=$l(f)*h+u,a=Wl(f)*d+c),Gce(u,c,h,d,f,p,v,Na,Ba),t=$l(p)*h+u,i=Wl(p)*d+c;break;case It.R:n=t=e[s++],a=i=e[s++];var g=e[s++],m=e[s++];Ek(n,a,n+g,a+m,Na,Ba);break;case It.Z:t=n,i=a;break}Fs(Oa,Oa,Na),Us(bo,bo,Ba)}return s===0&&(Oa[0]=Oa[1]=bo[0]=bo[1]=0),new We(Oa[0],Oa[1],bo[0]-Oa[0],bo[1]-Oa[1])},r.prototype._calculateLength=function(){var e=this.data,t=this._len,i=this._ux,n=this._uy,a=0,s=0,o=0,l=0;this._pathSegLen||(this._pathSegLen=[]);for(var u=this._pathSegLen,c=0,h=0,d=0;d<t;){var f=e[d++],p=d===1;p&&(a=e[d],s=e[d+1],o=a,l=s);var v=-1;switch(f){case It.M:a=o=e[d++],s=l=e[d++];break;case It.L:{var g=e[d++],m=e[d++],y=g-a,_=m-s;(ws(y)>i||ws(_)>n||d===t-1)&&(v=Math.sqrt(y*y+_*_),a=g,s=m);break}case It.C:{var b=e[d++],T=e[d++],g=e[d++],m=e[d++],x=e[d++],C=e[d++];v=aue(a,s,b,T,g,m,x,C,10),a=x,s=C;break}case It.Q:{var b=e[d++],T=e[d++],g=e[d++],m=e[d++];v=oue(a,s,b,T,g,m,10),a=g,s=m;break}case It.A:var D=e[d++],I=e[d++],M=e[d++],L=e[d++],N=e[d++],O=e[d++],B=O+N;d+=1,p&&(o=$l(N)*M+D,l=Wl(N)*L+I),v=HS(M,L)*GS(Eo,Math.abs(O)),a=$l(B)*M+D,s=Wl(B)*L+I;break;case It.R:{o=a=e[d++],l=s=e[d++];var F=e[d++],U=e[d++];v=F*2+U*2;break}case It.Z:{var y=o-a,_=l-s;v=Math.sqrt(y*y+_*_),a=o,s=l;break}}v>=0&&(u[h++]=v,c+=v)}return this._pathLen=c,c},r.prototype.rebuildPath=function(e,t){var i=this.data,n=this._ux,a=this._uy,s=this._len,o,l,u,c,h,d,f=t<1,p,v,g=0,m=0,y,_=0,b,T;if(!(f&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,v=this._pathLen,y=t*v,!y)))e:for(var x=0;x<s;){var C=i[x++],D=x===1;switch(D&&(u=i[x],c=i[x+1],o=u,l=c),C!==It.L&&_>0&&(e.lineTo(b,T),_=0),C){case It.M:o=u=i[x++],l=c=i[x++],e.moveTo(u,c);break;case It.L:{h=i[x++],d=i[x++];var I=ws(h-u),M=ws(d-c);if(I>n||M>a){if(f){var L=p[m++];if(g+L>y){var N=(y-g)/L;e.lineTo(u*(1-N)+h*N,c*(1-N)+d*N);break e}g+=L}e.lineTo(h,d),u=h,c=d,_=0}else{var O=I*I+M*M;O>_&&(b=h,T=d,_=O)}break}case It.C:{var B=i[x++],F=i[x++],U=i[x++],$=i[x++],q=i[x++],Z=i[x++];if(f){var L=p[m++];if(g+L>y){var N=(y-g)/L;sl(u,B,U,q,N,Gl),sl(c,F,$,Z,N,Hl),e.bezierCurveTo(Gl[1],Hl[1],Gl[2],Hl[2],Gl[3],Hl[3]);break e}g+=L}e.bezierCurveTo(B,F,U,$,q,Z),u=q,c=Z;break}case It.Q:{var B=i[x++],F=i[x++],U=i[x++],$=i[x++];if(f){var L=p[m++];if(g+L>y){var N=(y-g)/L;Cv(u,B,U,N,Gl),Cv(c,F,$,N,Hl),e.quadraticCurveTo(Gl[1],Hl[1],Gl[2],Hl[2]);break e}g+=L}e.quadraticCurveTo(B,F,U,$),u=U,c=$;break}case It.A:var te=i[x++],J=i[x++],oe=i[x++],he=i[x++],ue=i[x++],Ie=i[x++],Oe=i[x++],Ue=!i[x++],me=oe>he?oe:he,ze=ws(oe-he)>.001,Pe=ue+Ie,_e=!1;if(f){var L=p[m++];g+L>y&&(Pe=ue+Ie*(y-g)/L,_e=!0),g+=L}if(ze&&e.ellipse?e.ellipse(te,J,oe,he,Oe,ue,Pe,Ue):e.arc(te,J,me,ue,Pe,Ue),_e)break e;D&&(o=$l(ue)*oe+te,l=Wl(ue)*he+J),u=$l(Pe)*oe+te,c=Wl(Pe)*he+J;break;case It.R:o=u=i[x],l=c=i[x+1],h=i[x++],d=i[x++];var Me=i[x++],St=i[x++];if(f){var L=p[m++];if(g+L>y){var Re=y-g;e.moveTo(h,d),e.lineTo(h+GS(Re,Me),d),Re-=Me,Re>0&&e.lineTo(h+Me,d+GS(Re,St)),Re-=St,Re>0&&e.lineTo(h+HS(Me-Re,0),d+St),Re-=Me,Re>0&&e.lineTo(h,d+HS(St-Re,0));break e}g+=L}e.rect(h,d,Me,St);break;case It.Z:if(f){var L=p[m++];if(g+L>y){var N=(y-g)/L;e.lineTo(u*(1-N)+o*N,c*(1-N)+l*N);break e}g+=L}e.closePath(),u=o,c=l}}},r.prototype.clone=function(){var e=new r,t=this.data;return e.data=t.slice?t.slice():Array.prototype.slice.call(t),e._len=this._len,e},r.CMD=It,r.initDefaultProps=function(){var e=r.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0}(),r}();function ko(r,e,t,i,n,a,s){if(n===0)return!1;var o=n,l=0,u=r;if(s>e+o&&s>i+o||s<e-o&&s<i-o||a>r+o&&a>t+o||a<r-o&&a<t-o)return!1;if(r!==t)l=(e-i)/(r-t),u=(r*i-t*e)/(r-t);else return Math.abs(a-r)<=o/2;var c=l*a-s+u,h=c*c/(l*l+1);return h<=o/2*o/2}function Hce(r,e,t,i,n,a,s,o,l,u,c){if(l===0)return!1;var h=l;if(c>e+h&&c>i+h&&c>a+h&&c>o+h||c<e-h&&c<i-h&&c<a-h&&c<o-h||u>r+h&&u>t+h&&u>n+h&&u>s+h||u<r-h&&u<t-h&&u<n-h&&u<s-h)return!1;var d=D9(r,e,t,i,n,a,s,o,u,c,null);return d<=h/2}function cH(r,e,t,i,n,a,s,o,l){if(s===0)return!1;var u=s;if(l>e+u&&l>i+u&&l>a+u||l<e-u&&l<i-u&&l<a-u||o>r+u&&o>t+u&&o>n+u||o<r-u&&o<t-u&&o<n-u)return!1;var c=I9(r,e,t,i,n,a,o,l,null);return c<=u/2}var Mk=Math.PI*2;function yn(r){return r%=Mk,r<0&&(r+=Mk),r}var kd=Math.PI*2;function $ce(r,e,t,i,n,a,s,o,l){if(s===0)return!1;var u=s;o-=r,l-=e;var c=Math.sqrt(o*o+l*l);if(c-u>t||c+u<t)return!1;if(Math.abs(i-n)%kd<1e-4)return!0;if(a){var h=i;i=yn(n),n=yn(h)}else i=yn(i),n=yn(n);i>n&&(n+=kd);var d=Math.atan2(l,o);return d<0&&(d+=kd),d>=i&&d<=n||d+kd>=i&&d+kd<=n}function Ps(r,e,t,i,n,a){if(a>e&&a>i||a<e&&a<i||i===e)return 0;var s=(a-e)/(i-e),o=i<e?1:-1;(s===1||s===0)&&(o=i<e?.5:-.5);var l=s*(t-r)+r;return l===n?1/0:l>n?o:0}var So=gs.CMD,ql=Math.PI*2,Wce=1e-4;function qce(r,e){return Math.abs(r-e)<Wce}var xi=[-1,-1,-1],Un=[-1,-1];function jce(){var r=Un[0];Un[0]=Un[1],Un[1]=r}function Xce(r,e,t,i,n,a,s,o,l,u){if(u>e&&u>i&&u>a&&u>o||u<e&&u<i&&u<a&&u<o)return 0;var c=G0(e,i,a,o,u,xi);if(c===0)return 0;for(var h=0,d=-1,f=void 0,p=void 0,v=0;v<c;v++){var g=xi[v],m=g===0||g===1?.5:1,y=Lr(r,t,n,s,g);y<l||(d<0&&(d=A9(e,i,a,o,Un),Un[1]<Un[0]&&d>1&&jce(),f=Lr(e,i,a,o,Un[0]),d>1&&(p=Lr(e,i,a,o,Un[1]))),d===2?g<Un[0]?h+=f<e?m:-m:g<Un[1]?h+=p<f?m:-m:h+=o<p?m:-m:g<Un[0]?h+=f<e?m:-m:h+=o<f?m:-m)}return h}function Yce(r,e,t,i,n,a,s,o){if(o>e&&o>i&&o>a||o<e&&o<i&&o<a)return 0;var l=sue(e,i,a,o,xi);if(l===0)return 0;var u=E9(e,i,a);if(u>=0&&u<=1){for(var c=0,h=zr(e,i,a,u),d=0;d<l;d++){var f=xi[d]===0||xi[d]===1?.5:1,p=zr(r,t,n,xi[d]);p<s||(xi[d]<u?c+=h<e?f:-f:c+=a<h?f:-f)}return c}else{var f=xi[0]===0||xi[0]===1?.5:1,p=zr(r,t,n,xi[0]);return p<s?0:a<e?f:-f}}function Kce(r,e,t,i,n,a,s,o){if(o-=e,o>t||o<-t)return 0;var l=Math.sqrt(t*t-o*o);xi[0]=-l,xi[1]=l;var u=Math.abs(i-n);if(u<1e-4)return 0;if(u>=ql-1e-4){i=0,n=ql;var c=a?1:-1;return s>=xi[0]+r&&s<=xi[1]+r?c:0}if(i>n){var h=i;i=n,n=h}i<0&&(i+=ql,n+=ql);for(var d=0,f=0;f<2;f++){var p=xi[f];if(p+r>s){var v=Math.atan2(o,p),c=a?1:-1;v<0&&(v=ql+v),(v>=i&&v<=n||v+ql>=i&&v+ql<=n)&&(v>Math.PI/2&&v<Math.PI*1.5&&(c=-c),d+=c)}}return d}function hH(r,e,t,i,n){for(var a=r.data,s=r.len(),o=0,l=0,u=0,c=0,h=0,d,f,p=0;p<s;){var v=a[p++],g=p===1;switch(v===So.M&&p>1&&(t||(o+=Ps(l,u,c,h,i,n))),g&&(l=a[p],u=a[p+1],c=l,h=u),v){case So.M:c=a[p++],h=a[p++],l=c,u=h;break;case So.L:if(t){if(ko(l,u,a[p],a[p+1],e,i,n))return!0}else o+=Ps(l,u,a[p],a[p+1],i,n)||0;l=a[p++],u=a[p++];break;case So.C:if(t){if(Hce(l,u,a[p++],a[p++],a[p++],a[p++],a[p],a[p+1],e,i,n))return!0}else o+=Xce(l,u,a[p++],a[p++],a[p++],a[p++],a[p],a[p+1],i,n)||0;l=a[p++],u=a[p++];break;case So.Q:if(t){if(cH(l,u,a[p++],a[p++],a[p],a[p+1],e,i,n))return!0}else o+=Yce(l,u,a[p++],a[p++],a[p],a[p+1],i,n)||0;l=a[p++],u=a[p++];break;case So.A:var m=a[p++],y=a[p++],_=a[p++],b=a[p++],T=a[p++],x=a[p++];p+=1;var C=!!(1-a[p++]);d=Math.cos(T)*_+m,f=Math.sin(T)*b+y,g?(c=d,h=f):o+=Ps(l,u,d,f,i,n);var D=(i-m)*b/_+m;if(t){if($ce(m,y,b,T,T+x,C,e,D,n))return!0}else o+=Kce(m,y,b,T,T+x,C,D,n);l=Math.cos(T+x)*_+m,u=Math.sin(T+x)*b+y;break;case So.R:c=l=a[p++],h=u=a[p++];var I=a[p++],M=a[p++];if(d=c+I,f=h+M,t){if(ko(c,h,d,h,e,i,n)||ko(d,h,d,f,e,i,n)||ko(d,f,c,f,e,i,n)||ko(c,f,c,h,e,i,n))return!0}else o+=Ps(d,h,d,f,i,n),o+=Ps(c,f,c,h,i,n);break;case So.Z:if(t){if(ko(l,u,c,h,e,i,n))return!0}else o+=Ps(l,u,c,h,i,n);l=c,u=h;break}}return!t&&!qce(u,h)&&(o+=Ps(l,u,c,h,i,n)||0),o!==0}function Zce(r,e,t){return hH(r,0,!1,e,t)}function Qce(r,e,t,i){return hH(r,e,!0,t,i)}var X0=Ce({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Wu),Jce={style:Ce({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},I1.style)},qS=ps.concat(["invisible","culling","z","z2","zlevel","parent"]),Je=function(r){j(e,r);function e(t){return r.call(this,t)||this}return e.prototype.update=function(){var t=this;r.prototype.update.call(this);var i=this.style;if(i.decal){var n=this._decalEl=this._decalEl||new e;n.buildPath===e.prototype.buildPath&&(n.buildPath=function(l){t.buildPath(l,t.shape)}),n.silent=!0;var a=n.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 o=0;o<qS.length;++o)n[qS[o]]=this[qS[o]];n.__dirty|=pn}else this._decalEl&&(this._decalEl=null)},e.prototype.getDecalElement=function(){return this._decalEl},e.prototype._init=function(t){var i=rt(t);this.shape=this.getDefaultShape();var n=this.getDefaultStyle();n&&this.useStyle(n);for(var a=0;a<i.length;a++){var s=i[a],o=t[s];s==="style"?this.style?Q(this.style,o):this.useStyle(o):s==="shape"?Q(this.shape,o):r.prototype.attrKV.call(this,s,o)}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(t!=="none"){if(de(t)){var i=Ev(t,0);return i>.5?a2:i>.2?Fue:s2}else if(t)return s2}return a2},e.prototype.getInsideTextStroke=function(t){var i=this.style.fill;if(de(i)){var n=this.__zr,a=!!(n&&n.isDarkMode()),s=Ev(t,0)<n2;if(a===s)return i}},e.prototype.buildPath=function(t,i,n){},e.prototype.pathUpdated=function(){this.__dirty&=~fh},e.prototype.getUpdatedPathProxy=function(t){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,t),this.path},e.prototype.createPathProxy=function(){this.path=new gs(!1)},e.prototype.hasStroke=function(){var t=this.style,i=t.stroke;return!(i==null||i==="none"||!(t.lineWidth>0))},e.prototype.hasFill=function(){var t=this.style,i=t.fill;return i!=null&&i!=="none"},e.prototype.getBoundingRect=function(){var t=this._rect,i=this.style,n=!t;if(n){var a=!1;this.path||(a=!0,this.createPathProxy());var s=this.path;(a||this.__dirty&fh)&&(s.beginPath(),this.buildPath(s,this.shape,!1),this.pathUpdated()),t=s.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var o=this._rectStroke||(this._rectStroke=t.clone());if(this.__dirty||n){o.copy(t);var l=i.strokeNoScale?this.getLineScale():1,u=i.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;u=Math.max(u,c??4)}l>1e-10&&(o.width+=u/l,o.height+=u/l,o.x-=u/l/2,o.y-=u/l/2)}return o}return t},e.prototype.contain=function(t,i){var n=this.transformCoordToLocal(t,i),a=this.getBoundingRect(),s=this.style;if(t=n[0],i=n[1],a.contain(t,i)){var o=this.path;if(this.hasStroke()){var l=s.lineWidth,u=s.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),Qce(o,l/u,t,i)))return!0}if(this.hasFill())return Zce(o,t,i)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=fh,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(t){return this.animate("shape",t)},e.prototype.updateDuringAnimation=function(t){t==="style"?this.dirtyStyle():t==="shape"?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(t,i){t==="shape"?this.setShape(i):r.prototype.attrKV.call(this,t,i)},e.prototype.setShape=function(t,i){var n=this.shape;return n||(n=this.shape={}),typeof t=="string"?n[t]=i:Q(n,t),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&fh)},e.prototype.createStyle=function(t){return pg(X0,t)},e.prototype._innerSaveToNormal=function(t){r.prototype._innerSaveToNormal.call(this,t);var i=this._normalState;t.shape&&!i.shape&&(i.shape=Q({},this.shape))},e.prototype._applyStateObj=function(t,i,n,a,s,o){r.prototype._applyStateObj.call(this,t,i,n,a,s,o);var l=!(i&&a),u;if(i&&i.shape?s?a?u=i.shape:(u=Q({},n.shape),Q(u,i.shape)):(u=Q({},a?this.shape:n.shape),Q(u,i.shape)):l&&(u=n.shape),u)if(s){this.shape=Q({},this.shape);for(var c={},h=rt(u),d=0;d<h.length;d++){var f=h[d];typeof u[f]=="object"?this.shape[f]=u[f]:c[f]=u[f]}this._transitionState(t,{shape:c},o)}else this.shape=u,this.dirtyShape()},e.prototype._mergeStates=function(t){for(var i=r.prototype._mergeStates.call(this,t),n,a=0;a<t.length;a++){var s=t[a];s.shape&&(n=n||{},this._mergeStyle(n,s.shape))}return n&&(i.shape=n),i},e.prototype.getAnimationStyleProps=function(){return Jce},e.prototype.isZeroArea=function(){return!1},e.extend=function(t){var i=function(a){j(s,a);function s(o){var l=a.call(this,o)||this;return t.init&&t.init.call(l,o),l}return s.prototype.getDefaultStyle=function(){return Ee(t.style)},s.prototype.getDefaultShape=function(){return Ee(t.shape)},s}(e);for(var n in t)typeof t[n]=="function"&&(i.prototype[n]=t[n]);return i},e.initDefaultProps=function(){var t=e.prototype;t.type="path",t.strokeContainThreshold=5,t.segmentIgnoreThreshold=0,t.subPixelOptimize=!1,t.autoBatch=!1,t.__dirty=pn|vp|fh}(),e}(Jn),ehe=Ce({strokeFirst:!0,font:al,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},X0),yf=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.hasStroke=function(){var t=this.style,i=t.stroke;return i!=null&&i!=="none"&&t.lineWidth>0},e.prototype.hasFill=function(){var t=this.style,i=t.fill;return i!=null&&i!=="none"},e.prototype.createStyle=function(t){return pg(ehe,t)},e.prototype.setBoundingRect=function(t){this._rect=t},e.prototype.getBoundingRect=function(){var t=this.style;if(!this._rect){var i=t.text;i!=null?i+="":i="";var n=mg(i,t.font,t.textAlign,t.textBaseline);if(n.x+=t.x||0,n.y+=t.y||0,this.hasStroke()){var a=t.lineWidth;n.x-=a/2,n.y-=a/2,n.width+=a,n.height+=a}this._rect=n}return this._rect},e.initDefaultProps=function(){var t=e.prototype;t.dirtyRectTolerance=10}(),e}(Jn);yf.prototype.type="tspan";var the=Ce({x:0,y:0},Wu),rhe={style:Ce({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},I1.style)};function ihe(r){return!!(r&&typeof r!="string"&&r.width&&r.height)}var Ur=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.createStyle=function(t){return pg(the,t)},e.prototype._getSize=function(t){var i=this.style,n=i[t];if(n!=null)return n;var a=ihe(i.image)?i.image:this.__image;if(!a)return 0;var s=t==="width"?"height":"width",o=i[s];return o==null?a[t]:a[t]/a[s]*o},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return rhe},e.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new We(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},e}(Jn);Ur.prototype.type="image";function nhe(r,e){var t=e.x,i=e.y,n=e.width,a=e.height,s=e.r,o,l,u,c;n<0&&(t=t+n,n=-n),a<0&&(i=i+a,a=-a),typeof s=="number"?o=l=u=c=s:s instanceof Array?s.length===1?o=l=u=c=s[0]:s.length===2?(o=u=s[0],l=c=s[1]):s.length===3?(o=s[0],l=c=s[1],u=s[2]):(o=s[0],l=s[1],u=s[2],c=s[3]):o=l=u=c=0;var h;o+l>n&&(h=o+l,o*=n/h,l*=n/h),u+c>n&&(h=u+c,u*=n/h,c*=n/h),l+u>a&&(h=l+u,l*=a/h,u*=a/h),o+c>a&&(h=o+c,o*=a/h,c*=a/h),r.moveTo(t+o,i),r.lineTo(t+n-l,i),l!==0&&r.arc(t+n-l,i+l,l,-Math.PI/2,0),r.lineTo(t+n,i+a-u),u!==0&&r.arc(t+n-u,i+a-u,u,0,Math.PI/2),r.lineTo(t+c,i+a),c!==0&&r.arc(t+c,i+a-c,c,Math.PI/2,Math.PI),r.lineTo(t,i+o),o!==0&&r.arc(t+o,i+o,o,Math.PI,Math.PI*1.5)}var Ch=Math.round;function fH(r,e,t){if(e){var i=e.x1,n=e.x2,a=e.y1,s=e.y2;r.x1=i,r.x2=n,r.y1=a,r.y2=s;var o=t&&t.lineWidth;return o&&(Ch(i*2)===Ch(n*2)&&(r.x1=r.x2=wu(i,o,!0)),Ch(a*2)===Ch(s*2)&&(r.y1=r.y2=wu(a,o,!0))),r}}function dH(r,e,t){if(e){var i=e.x,n=e.y,a=e.width,s=e.height;r.x=i,r.y=n,r.width=a,r.height=s;var o=t&&t.lineWidth;return o&&(r.x=wu(i,o,!0),r.y=wu(n,o,!0),r.width=Math.max(wu(i+a,o,!1)-r.x,a===0?0:1),r.height=Math.max(wu(n+s,o,!1)-r.y,s===0?0:1)),r}}function wu(r,e,t){if(!e)return r;var i=Ch(r*2);return(i+Ch(e))%2===0?i/2:(i+(t?1:-1))/2}var ahe=function(){function r(){this.x=0,this.y=0,this.width=0,this.height=0}return r}(),she={},at=function(r){j(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new ahe},e.prototype.buildPath=function(t,i){var n,a,s,o;if(this.subPixelOptimize){var l=dH(she,i,this.style);n=l.x,a=l.y,s=l.width,o=l.height,l.r=i.r,i=l}else n=i.x,a=i.y,s=i.width,o=i.height;i.r?nhe(t,i):t.rect(n,a,s,o)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(Je);at.prototype.type="rect";var Lk={fill:"#000"},kk=2,ohe={style: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},I1.style)},nt=function(r){j(e,r);function e(t){var i=r.call(this)||this;return i.type="text",i._children=[],i._defaultStyle=Lk,i.attr(t),i}return e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){r.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t<this._children.length;t++){var i=this._children[t];i.zlevel=this.zlevel,i.z=this.z,i.z2=this.z2,i.culling=this.culling,i.cursor=this.cursor,i.invisible=this.invisible}},e.prototype.updateTransform=function(){var t=this.innerTransformable;t?(t.updateTransform(),t.transform&&(this.transform=t.transform)):r.prototype.updateTransform.call(this)},e.prototype.getLocalTransform=function(t){var i=this.innerTransformable;return i?i.getLocalTransform(t):r.prototype.getLocalTransform.call(this,t)},e.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),r.prototype.getComputedTransform.call(this)},e.prototype._updateSubTexts=function(){this._childCursor=0,che(this.style),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},e.prototype.addSelfToZr=function(t){r.prototype.addSelfToZr.call(this,t);for(var i=0;i<this._children.length;i++)this._children[i].__zr=t},e.prototype.removeSelfFromZr=function(t){r.prototype.removeSelfFromZr.call(this,t);for(var i=0;i<this._children.length;i++)this._children[i].__zr=null},e.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var t=new We(0,0,0,0),i=this._children,n=[],a=null,s=0;s<i.length;s++){var o=i[s],l=o.getBoundingRect(),u=o.getLocalTransform(n);u?(t.copy(l),t.applyTransform(u),a=a||t.clone(),a.union(t)):(a=a||l.clone(),a.union(l))}this._rect=a||t}return this._rect},e.prototype.setDefaultTextStyle=function(t){this._defaultStyle=t||Lk},e.prototype.setTextContent=function(t){},e.prototype._mergeStyle=function(t,i){if(!i)return t;var n=i.rich,a=t.rich||n&&{};return Q(t,i),n&&a?(this._mergeRich(a,n),t.rich=a):a&&(t.rich=a),t},e.prototype._mergeRich=function(t,i){for(var n=rt(i),a=0;a<n.length;a++){var s=n[a];t[s]=t[s]||{},Q(t[s],i[s])}},e.prototype.getAnimationStyleProps=function(){return ohe},e.prototype._getOrCreateChild=function(t){var i=this._children[this._childCursor];return(!i||!(i instanceof t))&&(i=new t),this._children[this._childCursor++]=i,i.__zr=this.__zr,i.parent=this,i},e.prototype._updatePlainTexts=function(){var t=this.style,i=t.font||al,n=t.padding,a=Vk(t),s=Mce(a,t),o=jS(t),l=!!t.backgroundColor,u=s.outerHeight,c=s.outerWidth,h=s.contentWidth,d=s.lines,f=s.lineHeight,p=this._defaultStyle,v=t.x||0,g=t.y||0,m=t.align||p.align||"left",y=t.verticalAlign||p.verticalAlign||"top",_=v,b=dh(g,s.contentHeight,y);if(o||n){var T=mp(v,c,m),x=dh(g,u,y);o&&this._renderBackground(t,t,T,x,c,u)}b+=f/2,n&&(_=Uk(v,m,n),y==="top"?b+=n[0]:y==="bottom"&&(b-=n[2]));for(var C=0,D=!1,I=Fk("fill"in t?t.fill:(D=!0,p.fill)),M=Bk("stroke"in t?t.stroke:!l&&(!p.autoStroke||D)?(C=kk,p.stroke):null),L=t.textShadowBlur>0,N=t.width!=null&&(t.overflow==="truncate"||t.overflow==="break"||t.overflow==="breakAll"),O=s.calculatedLineHeight,B=0;B<d.length;B++){var F=this._getOrCreateChild(yf),U=F.createStyle();F.useStyle(U),U.text=d[B],U.x=_,U.y=b,m&&(U.textAlign=m),U.textBaseline="middle",U.opacity=t.opacity,U.strokeFirst=!0,L&&(U.shadowBlur=t.textShadowBlur||0,U.shadowColor=t.textShadowColor||"transparent",U.shadowOffsetX=t.textShadowOffsetX||0,U.shadowOffsetY=t.textShadowOffsetY||0),U.stroke=M,U.fill=I,M&&(U.lineWidth=t.lineWidth||C,U.lineDash=t.lineDash,U.lineDashOffset=t.lineDashOffset||0),U.font=i,Ok(U,t),b+=f,N&&F.setBoundingRect(new We(mp(U.x,t.width,U.textAlign),dh(U.y,O,U.textBaseline),h,O))}},e.prototype._updateRichTexts=function(){var t=this.style,i=Vk(t),n=Rce(i,t),a=n.width,s=n.outerWidth,o=n.outerHeight,l=t.padding,u=t.x||0,c=t.y||0,h=this._defaultStyle,d=t.align||h.align,f=t.verticalAlign||h.verticalAlign,p=mp(u,s,d),v=dh(c,o,f),g=p,m=v;l&&(g+=l[3],m+=l[0]);var y=g+a;jS(t)&&this._renderBackground(t,t,p,v,s,o);for(var _=!!t.backgroundColor,b=0;b<n.lines.length;b++){for(var T=n.lines[b],x=T.tokens,C=x.length,D=T.lineHeight,I=T.width,M=0,L=g,N=y,O=C-1,B=void 0;M<C&&(B=x[M],!B.align||B.align==="left");)this._placeToken(B,t,D,m,L,"left",_),I-=B.width,L+=B.width,M++;for(;O>=0&&(B=x[O],B.align==="right");)this._placeToken(B,t,D,m,N,"right",_),I-=B.width,N-=B.width,O--;for(L+=(a-(L-g)-(y-N)-I)/2;M<=O;)B=x[M],this._placeToken(B,t,D,m,L+B.width/2,"center",_),L+=B.width,M++;m+=D}},e.prototype._placeToken=function(t,i,n,a,s,o,l){var u=i.rich[t.styleName]||{};u.text=t.text;var c=t.verticalAlign,h=a+n/2;c==="top"?h=a+t.height/2:c==="bottom"&&(h=a+n-t.height/2);var d=!t.isLineHolder&&jS(u);d&&this._renderBackground(u,i,o==="right"?s-t.width:o==="center"?s-t.width/2:s,h-t.height/2,t.width,t.height);var f=!!u.backgroundColor,p=t.textPadding;p&&(s=Uk(s,o,p),h-=t.height/2-p[0]-t.innerHeight/2);var v=this._getOrCreateChild(yf),g=v.createStyle();v.useStyle(g);var m=this._defaultStyle,y=!1,_=0,b=Fk("fill"in u?u.fill:"fill"in i?i.fill:(y=!0,m.fill)),T=Bk("stroke"in u?u.stroke:"stroke"in i?i.stroke:!f&&!l&&(!m.autoStroke||y)?(_=kk,m.stroke):null),x=u.textShadowBlur>0||i.textShadowBlur>0;g.text=t.text,g.x=s,g.y=h,x&&(g.shadowBlur=u.textShadowBlur||i.textShadowBlur||0,g.shadowColor=u.textShadowColor||i.textShadowColor||"transparent",g.shadowOffsetX=u.textShadowOffsetX||i.textShadowOffsetX||0,g.shadowOffsetY=u.textShadowOffsetY||i.textShadowOffsetY||0),g.textAlign=o,g.textBaseline="middle",g.font=t.font||al,g.opacity=Ta(u.opacity,i.opacity,1),Ok(g,u),T&&(g.lineWidth=Ta(u.lineWidth,i.lineWidth,_),g.lineDash=Fe(u.lineDash,i.lineDash),g.lineDashOffset=i.lineDashOffset||0,g.stroke=T),b&&(g.fill=b);var C=t.contentWidth,D=t.contentHeight;v.setBoundingRect(new We(mp(g.x,C,g.textAlign),dh(g.y,D,g.textBaseline),C,D))},e.prototype._renderBackground=function(t,i,n,a,s,o){var l=t.backgroundColor,u=t.borderWidth,c=t.borderColor,h=l&&l.image,d=l&&!h,f=t.borderRadius,p=this,v,g;if(d||t.lineHeight||u&&c){v=this._getOrCreateChild(at),v.useStyle(v.createStyle()),v.style.fill=null;var m=v.shape;m.x=n,m.y=a,m.width=s,m.height=o,m.r=f,v.dirtyShape()}if(d){var y=v.style;y.fill=l||null,y.fillOpacity=Fe(t.fillOpacity,1)}else if(h){g=this._getOrCreateChild(Ur),g.onload=function(){p.dirtyStyle()};var _=g.style;_.image=l.image,_.x=n,_.y=a,_.width=s,_.height=o}if(u&&c){var y=v.style;y.lineWidth=u,y.stroke=c,y.strokeOpacity=Fe(t.strokeOpacity,1),y.lineDash=t.borderDash,y.lineDashOffset=t.borderDashOffset||0,v.strokeContainThreshold=0,v.hasFill()&&v.hasStroke()&&(y.strokeFirst=!0,y.lineWidth*=2)}var b=(v||g).style;b.shadowBlur=t.shadowBlur||0,b.shadowColor=t.shadowColor||"transparent",b.shadowOffsetX=t.shadowOffsetX||0,b.shadowOffsetY=t.shadowOffsetY||0,b.opacity=Ta(t.opacity,i.opacity,1)},e.makeFont=function(t){var i="";return vH(t)&&(i=[t.fontStyle,t.fontWeight,pH(t.fontSize),t.fontFamily||"sans-serif"].join(" ")),i&&qn(i)||t.textFont||t.font},e}(Jn),lhe={left:!0,right:1,center:1},uhe={top:1,bottom:1,middle:1},Rk=["fontStyle","fontWeight","fontSize","fontFamily"];function pH(r){return typeof r=="string"&&(r.indexOf("px")!==-1||r.indexOf("rem")!==-1||r.indexOf("em")!==-1)?r:isNaN(+r)?lD+"px":r+"px"}function Ok(r,e){for(var t=0;t<Rk.length;t++){var i=Rk[t],n=e[i];n!=null&&(r[i]=n)}}function vH(r){return r.fontSize!=null||r.fontFamily||r.fontWeight}function che(r){return Nk(r),R(r.rich,Nk),r}function Nk(r){if(r){r.font=nt.makeFont(r);var e=r.align;e==="middle"&&(e="center"),r.align=e==null||lhe[e]?e:"left";var t=r.verticalAlign;t==="center"&&(t="middle"),r.verticalAlign=t==null||uhe[t]?t:"top";var i=r.padding;i&&(r.padding=b1(r.padding))}}function Bk(r,e){return r==null||e<=0||r==="transparent"||r==="none"?null:r.image||r.colorStops?"#000":r}function Fk(r){return r==null||r==="none"?null:r.image||r.colorStops?"#000":r}function Uk(r,e,t){return e==="right"?r-t[1]:e==="center"?r+t[3]/2-t[1]/2:r+t[3]}function Vk(r){var e=r.text;return e!=null&&(e+=""),e}function jS(r){return!!(r.backgroundColor||r.lineHeight||r.borderWidth&&r.borderColor)}var ke=lt(),v2=function(r,e,t,i){if(i){var n=ke(i);n.dataIndex=t,n.dataType=e,n.seriesIndex=r,n.ssrType="chart",i.type==="group"&&i.traverse(function(a){var s=ke(a);s.seriesIndex=r,s.dataIndex=t,s.dataType=e,s.ssrType="chart"})}},zk=1,Gk={},gH=lt(),ID=lt(),PD=0,_g=1,M1=2,Oi=["emphasis","blur","select"],Mv=["normal","emphasis","blur","select"],Uf=10,hhe=9,qu="highlight",Fy="downplay",Yp="select",Uy="unselect",Kp="toggleSelect";function qc(r){return r!=null&&r!=="none"}function L1(r,e,t){r.onHoverStateChange&&(r.hoverState||0)!==t&&r.onHoverStateChange(e),r.hoverState=t}function mH(r){L1(r,"emphasis",M1)}function yH(r){r.hoverState===M1&&L1(r,"normal",PD)}function MD(r){L1(r,"blur",_g)}function _H(r){r.hoverState===_g&&L1(r,"normal",PD)}function fhe(r){r.selected=!0}function dhe(r){r.selected=!1}function Hk(r,e,t){e(r,t)}function oo(r,e,t){Hk(r,e,t),r.isGroup&&r.traverse(function(i){Hk(i,e,t)})}function Y0(r,e){switch(e){case"emphasis":r.hoverState=M1;break;case"normal":r.hoverState=PD;break;case"blur":r.hoverState=_g;break;case"select":r.selected=!0}}function phe(r,e,t,i){for(var n=r.style,a={},s=0;s<e.length;s++){var o=e[s],l=n[o];a[o]=l??(i&&i[o])}for(var s=0;s<r.animators.length;s++){var u=r.animators[s];u.__fromStateTransition&&u.__fromStateTransition.indexOf(t)<0&&u.targetName==="style"&&u.saveTo(a,e)}return a}function vhe(r,e,t,i){var n=t&&Xe(t,"select")>=0,a=!1;if(r instanceof Je){var s=gH(r),o=n&&s.selectFill||s.normalFill,l=n&&s.selectStroke||s.normalStroke;if(qc(o)||qc(l)){i=i||{};var u=i.style||{};u.fill==="inherit"?(a=!0,i=Q({},i),u=Q({},u),u.fill=o):!qc(u.fill)&&qc(o)?(a=!0,i=Q({},i),u=Q({},u),u.fill=$0(o)):!qc(u.stroke)&&qc(l)&&(a||(i=Q({},i),u=Q({},u)),u.stroke=$0(l)),i.style=u}}if(i&&i.z2==null){a||(i=Q({},i));var c=r.z2EmphasisLift;i.z2=r.z2+(c??Uf)}return i}function ghe(r,e,t){if(t&&t.z2==null){t=Q({},t);var i=r.z2SelectLift;t.z2=r.z2+(i??hhe)}return t}function mhe(r,e,t){var i=Xe(r.currentStates,e)>=0,n=r.style.opacity,a=i?null:phe(r,["opacity"],e,{opacity:1});t=t||{};var s=t.style||{};return s.opacity==null&&(t=Q({},t),s=Q({opacity:i?n:a.opacity*.1},s),t.style=s),t}function XS(r,e){var t=this.states[r];if(this.style){if(r==="emphasis")return vhe(this,r,e,t);if(r==="blur")return mhe(this,r,t);if(r==="select")return ghe(this,r,t)}return t}function lc(r){r.stateProxy=XS;var e=r.getTextContent(),t=r.getTextGuideLine();e&&(e.stateProxy=XS),t&&(t.stateProxy=XS)}function $k(r,e){!xH(r,e)&&!r.__highByOuter&&oo(r,mH)}function Wk(r,e){!xH(r,e)&&!r.__highByOuter&&oo(r,yH)}function Js(r,e){r.__highByOuter|=1<<(e||0),oo(r,mH)}function eo(r,e){!(r.__highByOuter&=~(1<<(e||0)))&&oo(r,yH)}function bH(r){oo(r,MD)}function LD(r){oo(r,_H)}function SH(r){oo(r,fhe)}function TH(r){oo(r,dhe)}function xH(r,e){return r.__highDownSilentOnTouch&&e.zrByTouch}function wH(r){var e=r.getModel(),t=[],i=[];e.eachComponent(function(n,a){var s=ID(a),o=n==="series",l=o?r.getViewOfSeriesModel(a):r.getViewOfComponentModel(a);!o&&i.push(l),s.isBlured&&(l.group.traverse(function(u){_H(u)}),o&&t.push(a)),s.isBlured=!1}),R(i,function(n){n&&n.toggleBlurSeries&&n.toggleBlurSeries(t,!1,e)})}function g2(r,e,t,i){var n=i.getModel();t=t||"coordinateSystem";function a(u,c){for(var h=0;h<c.length;h++){var d=u.getItemGraphicEl(c[h]);d&&LD(d)}}if(r!=null&&!(!e||e==="none")){var s=n.getSeriesByIndex(r),o=s.coordinateSystem;o&&o.master&&(o=o.master);var l=[];n.eachSeries(function(u){var c=s===u,h=u.coordinateSystem;h&&h.master&&(h=h.master);var d=h&&o?h===o:c;if(!(t==="series"&&!c||t==="coordinateSystem"&&!d||e==="series"&&c)){var f=i.getViewOfSeriesModel(u);if(f.group.traverse(function(g){g.__highByOuter&&c&&e==="self"||MD(g)}),Jr(e))a(u.getData(),e);else if(Ae(e))for(var p=rt(e),v=0;v<p.length;v++)a(u.getData(p[v]),e[p[v]]);l.push(u),ID(u).isBlured=!0}}),n.eachComponent(function(u,c){if(u!=="series"){var h=i.getViewOfComponentModel(c);h&&h.toggleBlurSeries&&h.toggleBlurSeries(l,!0,n)}})}}function m2(r,e,t){if(!(r==null||e==null)){var i=t.getModel().getComponent(r,e);if(i){ID(i).isBlured=!0;var n=t.getViewOfComponentModel(i);!n||!n.focusBlurEnabled||n.group.traverse(function(a){MD(a)})}}}function yhe(r,e,t){var i=r.seriesIndex,n=r.getData(e.dataType);if(n){var a=sc(n,e);a=(ie(a)?a[0]:a)||0;var s=n.getItemGraphicEl(a);if(!s)for(var o=n.count(),l=0;!s&&l<o;)s=n.getItemGraphicEl(l++);if(s){var u=ke(s);g2(i,u.focus,u.blurScope,t)}else{var c=r.get(["emphasis","focus"]),h=r.get(["emphasis","blurScope"]);c!=null&&g2(i,c,h,t)}}}function kD(r,e,t,i){var n={focusSelf:!1,dispatchers:null};if(r==null||r==="series"||e==null||t==null)return n;var a=i.getModel().getComponent(r,e);if(!a)return n;var s=i.getViewOfComponentModel(a);if(!s||!s.findHighDownDispatchers)return n;for(var o=s.findHighDownDispatchers(t),l,u=0;u<o.length;u++)if(ke(o[u]).focus==="self"){l=!0;break}return{focusSelf:l,dispatchers:o}}function _he(r,e,t){var i=ke(r),n=kD(i.componentMainType,i.componentIndex,i.componentHighDownName,t),a=n.dispatchers,s=n.focusSelf;a?(s&&m2(i.componentMainType,i.componentIndex,t),R(a,function(o){return $k(o,e)})):(g2(i.seriesIndex,i.focus,i.blurScope,t),i.focus==="self"&&m2(i.componentMainType,i.componentIndex,t),$k(r,e))}function bhe(r,e,t){wH(t);var i=ke(r),n=kD(i.componentMainType,i.componentIndex,i.componentHighDownName,t).dispatchers;n?R(n,function(a){return Wk(a,e)}):Wk(r,e)}function She(r,e,t){if(_2(e)){var i=e.dataType,n=r.getData(i),a=sc(n,e);ie(a)||(a=[a]),r[e.type===Kp?"toggleSelect":e.type===Yp?"select":"unselect"](a,i)}}function qk(r){var e=r.getAllData();R(e,function(t){var i=t.data,n=t.type;i.eachItemGraphicEl(function(a,s){r.isSelected(s,n)?SH(a):TH(a)})})}function The(r){var e=[];return r.eachSeries(function(t){var i=t.getAllData();R(i,function(n){n.data;var a=n.type,s=t.getSelectedDataIndices();if(s.length>0){var o={dataIndex:s,seriesIndex:t.seriesIndex};a!=null&&(o.dataType=a),e.push(o)}})}),e}function Ko(r,e,t){Cu(r,!0),oo(r,lc),y2(r,e,t)}function xhe(r){Cu(r,!1)}function Kt(r,e,t,i){i?xhe(r):Ko(r,e,t)}function y2(r,e,t){var i=ke(r);e!=null?(i.focus=e,i.blurScope=t):i.focus&&(i.focus=null)}var jk=["emphasis","blur","select"],whe={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function ei(r,e,t,i){t=t||"itemStyle";for(var n=0;n<jk.length;n++){var a=jk[n],s=e.getModel([a,t]),o=r.ensureState(a);o.style=i?i(s):s[whe[t]]()}}function Cu(r,e){var t=e===!1,i=r;r.highDownSilentOnTouch&&(i.__highDownSilentOnTouch=r.highDownSilentOnTouch),(!t||i.__highDownDispatcher)&&(i.__highByOuter=i.__highByOuter||0,i.__highDownDispatcher=!t)}function Lv(r){return!!(r&&r.__highDownDispatcher)}function Che(r,e,t){var i=ke(r);i.componentMainType=e.mainType,i.componentIndex=e.componentIndex,i.componentHighDownName=t}function Ahe(r){var e=Gk[r];return e==null&&zk<=32&&(e=Gk[r]=zk++),e}function _2(r){var e=r.type;return e===Yp||e===Uy||e===Kp}function Xk(r){var e=r.type;return e===qu||e===Fy}function Dhe(r){var e=gH(r);e.normalFill=r.style.fill,e.normalStroke=r.style.stroke;var t=r.states.select||{};e.selectFill=t.style&&t.style.fill||null,e.selectStroke=t.style&&t.style.stroke||null}var jc=gs.CMD,Ehe=[[],[],[]],Yk=Math.sqrt,Ihe=Math.atan2;function CH(r,e){if(e){var t=r.data,i=r.len(),n,a,s,o,l,u,c=jc.M,h=jc.C,d=jc.L,f=jc.R,p=jc.A,v=jc.Q;for(s=0,o=0;s<i;){switch(n=t[s++],o=s,a=0,n){case c:a=1;break;case d:a=1;break;case h:a=3;break;case v:a=2;break;case p:var g=e[4],m=e[5],y=Yk(e[0]*e[0]+e[1]*e[1]),_=Yk(e[2]*e[2]+e[3]*e[3]),b=Ihe(-e[1]/_,e[0]/y);t[s]*=y,t[s++]+=g,t[s]*=_,t[s++]+=m,t[s++]*=y,t[s++]*=_,t[s++]+=b,t[s++]+=b,s+=2,o=s;break;case f:u[0]=t[s++],u[1]=t[s++],$r(u,u,e),t[o++]=u[0],t[o++]=u[1],u[0]+=t[s++],u[1]+=t[s++],$r(u,u,e),t[o++]=u[0],t[o++]=u[1]}for(l=0;l<a;l++){var T=Ehe[l];T[0]=t[s++],T[1]=t[s++],$r(T,T,e),t[o++]=T[0],t[o++]=T[1]}}r.increaseVersion()}}var YS=Math.sqrt,Mm=Math.sin,Lm=Math.cos,Rd=Math.PI;function Kk(r){return Math.sqrt(r[0]*r[0]+r[1]*r[1])}function b2(r,e){return(r[0]*e[0]+r[1]*e[1])/(Kk(r)*Kk(e))}function Zk(r,e){return(r[0]*e[1]<r[1]*e[0]?-1:1)*Math.acos(b2(r,e))}function Qk(r,e,t,i,n,a,s,o,l,u,c){var h=l*(Rd/180),d=Lm(h)*(r-t)/2+Mm(h)*(e-i)/2,f=-1*Mm(h)*(r-t)/2+Lm(h)*(e-i)/2,p=d*d/(s*s)+f*f/(o*o);p>1&&(s*=YS(p),o*=YS(p));var v=(n===a?-1:1)*YS((s*s*(o*o)-s*s*(f*f)-o*o*(d*d))/(s*s*(f*f)+o*o*(d*d)))||0,g=v*s*f/o,m=v*-o*d/s,y=(r+t)/2+Lm(h)*g-Mm(h)*m,_=(e+i)/2+Mm(h)*g+Lm(h)*m,b=Zk([1,0],[(d-g)/s,(f-m)/o]),T=[(d-g)/s,(f-m)/o],x=[(-1*d-g)/s,(-1*f-m)/o],C=Zk(T,x);if(b2(T,x)<=-1&&(C=Rd),b2(T,x)>=1&&(C=0),C<0){var D=Math.round(C/Rd*1e6)/1e6;C=Rd*2+D%2*Rd}c.addData(u,y,_,s,o,b,C,h,a)}var Phe=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,Mhe=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Lhe(r){var e=new gs;if(!r)return e;var t=0,i=0,n=t,a=i,s,o=gs.CMD,l=r.match(Phe);if(!l)return e;for(var u=0;u<l.length;u++){for(var c=l[u],h=c.charAt(0),d=void 0,f=c.match(Mhe)||[],p=f.length,v=0;v<p;v++)f[v]=parseFloat(f[v]);for(var g=0;g<p;){var m=void 0,y=void 0,_=void 0,b=void 0,T=void 0,x=void 0,C=void 0,D=t,I=i,M=void 0,L=void 0;switch(h){case"l":t+=f[g++],i+=f[g++],d=o.L,e.addData(d,t,i);break;case"L":t=f[g++],i=f[g++],d=o.L,e.addData(d,t,i);break;case"m":t+=f[g++],i+=f[g++],d=o.M,e.addData(d,t,i),n=t,a=i,h="l";break;case"M":t=f[g++],i=f[g++],d=o.M,e.addData(d,t,i),n=t,a=i,h="L";break;case"h":t+=f[g++],d=o.L,e.addData(d,t,i);break;case"H":t=f[g++],d=o.L,e.addData(d,t,i);break;case"v":i+=f[g++],d=o.L,e.addData(d,t,i);break;case"V":i=f[g++],d=o.L,e.addData(d,t,i);break;case"C":d=o.C,e.addData(d,f[g++],f[g++],f[g++],f[g++],f[g++],f[g++]),t=f[g-2],i=f[g-1];break;case"c":d=o.C,e.addData(d,f[g++]+t,f[g++]+i,f[g++]+t,f[g++]+i,f[g++]+t,f[g++]+i),t+=f[g-2],i+=f[g-1];break;case"S":m=t,y=i,M=e.len(),L=e.data,s===o.C&&(m+=t-L[M-4],y+=i-L[M-3]),d=o.C,D=f[g++],I=f[g++],t=f[g++],i=f[g++],e.addData(d,m,y,D,I,t,i);break;case"s":m=t,y=i,M=e.len(),L=e.data,s===o.C&&(m+=t-L[M-4],y+=i-L[M-3]),d=o.C,D=t+f[g++],I=i+f[g++],t+=f[g++],i+=f[g++],e.addData(d,m,y,D,I,t,i);break;case"Q":D=f[g++],I=f[g++],t=f[g++],i=f[g++],d=o.Q,e.addData(d,D,I,t,i);break;case"q":D=f[g++]+t,I=f[g++]+i,t+=f[g++],i+=f[g++],d=o.Q,e.addData(d,D,I,t,i);break;case"T":m=t,y=i,M=e.len(),L=e.data,s===o.Q&&(m+=t-L[M-4],y+=i-L[M-3]),t=f[g++],i=f[g++],d=o.Q,e.addData(d,m,y,t,i);break;case"t":m=t,y=i,M=e.len(),L=e.data,s===o.Q&&(m+=t-L[M-4],y+=i-L[M-3]),t+=f[g++],i+=f[g++],d=o.Q,e.addData(d,m,y,t,i);break;case"A":_=f[g++],b=f[g++],T=f[g++],x=f[g++],C=f[g++],D=t,I=i,t=f[g++],i=f[g++],d=o.A,Qk(D,I,t,i,x,C,_,b,T,d,e);break;case"a":_=f[g++],b=f[g++],T=f[g++],x=f[g++],C=f[g++],D=t,I=i,t+=f[g++],i+=f[g++],d=o.A,Qk(D,I,t,i,x,C,_,b,T,d,e);break}}(h==="z"||h==="Z")&&(d=o.Z,e.addData(d),t=n,i=a),s=d}return e.toStatic(),e}var AH=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.applyTransform=function(t){},e}(Je);function DH(r){return r.setData!=null}function EH(r,e){var t=Lhe(r),i=Q({},e);return i.buildPath=function(n){if(DH(n)){n.setData(t.data);var a=n.getContext();a&&n.rebuildPath(a,1)}else{var a=n;t.rebuildPath(a,1)}},i.applyTransform=function(n){CH(t,n),this.dirtyShape()},i}function IH(r,e){return new AH(EH(r,e))}function khe(r,e){var t=EH(r,e),i=function(n){j(a,n);function a(s){var o=n.call(this,s)||this;return o.applyTransform=t.applyTransform,o.buildPath=t.buildPath,o}return a}(AH);return i}function Rhe(r,e){for(var t=[],i=r.length,n=0;n<i;n++){var a=r[n];t.push(a.getUpdatedPathProxy(!0))}var s=new Je(e);return s.createPathProxy(),s.buildPath=function(o){if(DH(o)){o.appendPath(t);var l=o.getContext();l&&o.rebuildPath(l,1)}},s}function RD(r,e){e=e||{};var t=new Je;return r.shape&&t.setShape(r.shape),t.setStyle(r.style),e.bakeTransform?CH(t.path,r.getComputedTransform()):e.toLocal?t.setLocalTransform(r.getComputedTransform()):t.copyTransform(r),t.buildPath=r.buildPath,t.applyTransform=t.applyTransform,t.z=r.z,t.z2=r.z2,t.zlevel=r.zlevel,t}var Ohe=function(){function r(){this.cx=0,this.cy=0,this.r=0}return r}(),ms=function(r){j(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new Ohe},e.prototype.buildPath=function(t,i){t.moveTo(i.cx+i.r,i.cy),t.arc(i.cx,i.cy,i.r,0,Math.PI*2)},e}(Je);ms.prototype.type="circle";var Nhe=function(){function r(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return r}(),bg=function(r){j(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new Nhe},e.prototype.buildPath=function(t,i){var n=.5522848,a=i.cx,s=i.cy,o=i.rx,l=i.ry,u=o*n,c=l*n;t.moveTo(a-o,s),t.bezierCurveTo(a-o,s-c,a-u,s-l,a,s-l),t.bezierCurveTo(a+u,s-l,a+o,s-c,a+o,s),t.bezierCurveTo(a+o,s+c,a+u,s+l,a,s+l),t.bezierCurveTo(a-u,s+l,a-o,s+c,a-o,s),t.closePath()},e}(Je);bg.prototype.type="ellipse";var PH=Math.PI,KS=PH*2,jl=Math.sin,Xc=Math.cos,Bhe=Math.acos,ri=Math.atan2,Jk=Math.abs,Zp=Math.sqrt,yp=Math.max,Fa=Math.min,ha=1e-4;function Fhe(r,e,t,i,n,a,s,o){var l=t-r,u=i-e,c=s-n,h=o-a,d=h*l-c*u;if(!(d*d<ha))return d=(c*(e-a)-h*(r-n))/d,[r+d*l,e+d*u]}function km(r,e,t,i,n,a,s){var o=r-t,l=e-i,u=(s?a:-a)/Zp(o*o+l*l),c=u*l,h=-u*o,d=r+c,f=e+h,p=t+c,v=i+h,g=(d+p)/2,m=(f+v)/2,y=p-d,_=v-f,b=y*y+_*_,T=n-a,x=d*v-p*f,C=(_<0?-1:1)*Zp(yp(0,T*T*b-x*x)),D=(x*_-y*C)/b,I=(-x*y-_*C)/b,M=(x*_+y*C)/b,L=(-x*y+_*C)/b,N=D-g,O=I-m,B=M-g,F=L-m;return N*N+O*O>B*B+F*F&&(D=M,I=L),{cx:D,cy:I,x0:-c,y0:-h,x1:D*(n/T-1),y1:I*(n/T-1)}}function Uhe(r){var e;if(ie(r)){var t=r.length;if(!t)return r;t===1?e=[r[0],r[0],0,0]:t===2?e=[r[0],r[0],r[1],r[1]]:t===3?e=r.concat(r[2]):e=r}else e=[r,r,r,r];return e}function Vhe(r,e){var t,i=yp(e.r,0),n=yp(e.r0||0,0),a=i>0,s=n>0;if(!(!a&&!s)){if(a||(i=n,n=0),n>i){var o=i;i=n,n=o}var l=e.startAngle,u=e.endAngle;if(!(isNaN(l)||isNaN(u))){var c=e.cx,h=e.cy,d=!!e.clockwise,f=Jk(u-l),p=f>KS&&f%KS;if(p>ha&&(f=p),!(i>ha))r.moveTo(c,h);else if(f>KS-ha)r.moveTo(c+i*Xc(l),h+i*jl(l)),r.arc(c,h,i,l,u,!d),n>ha&&(r.moveTo(c+n*Xc(u),h+n*jl(u)),r.arc(c,h,n,u,l,d));else{var v=void 0,g=void 0,m=void 0,y=void 0,_=void 0,b=void 0,T=void 0,x=void 0,C=void 0,D=void 0,I=void 0,M=void 0,L=void 0,N=void 0,O=void 0,B=void 0,F=i*Xc(l),U=i*jl(l),$=n*Xc(u),q=n*jl(u),Z=f>ha;if(Z){var te=e.cornerRadius;te&&(t=Uhe(te),v=t[0],g=t[1],m=t[2],y=t[3]);var J=Jk(i-n)/2;if(_=Fa(J,m),b=Fa(J,y),T=Fa(J,v),x=Fa(J,g),I=C=yp(_,b),M=D=yp(T,x),(C>ha||D>ha)&&(L=i*Xc(u),N=i*jl(u),O=n*Xc(l),B=n*jl(l),f<PH)){var oe=Fhe(F,U,O,B,L,N,$,q);if(oe){var he=F-oe[0],ue=U-oe[1],Ie=L-oe[0],Oe=N-oe[1],Ue=1/jl(Bhe((he*Ie+ue*Oe)/(Zp(he*he+ue*ue)*Zp(Ie*Ie+Oe*Oe)))/2),me=Zp(oe[0]*oe[0]+oe[1]*oe[1]);I=Fa(C,(i-me)/(Ue+1)),M=Fa(D,(n-me)/(Ue-1))}}}if(!Z)r.moveTo(c+F,h+U);else if(I>ha){var ze=Fa(m,I),Pe=Fa(y,I),_e=km(O,B,F,U,i,ze,d),Me=km(L,N,$,q,i,Pe,d);r.moveTo(c+_e.cx+_e.x0,h+_e.cy+_e.y0),I<C&&ze===Pe?r.arc(c+_e.cx,h+_e.cy,I,ri(_e.y0,_e.x0),ri(Me.y0,Me.x0),!d):(ze>0&&r.arc(c+_e.cx,h+_e.cy,ze,ri(_e.y0,_e.x0),ri(_e.y1,_e.x1),!d),r.arc(c,h,i,ri(_e.cy+_e.y1,_e.cx+_e.x1),ri(Me.cy+Me.y1,Me.cx+Me.x1),!d),Pe>0&&r.arc(c+Me.cx,h+Me.cy,Pe,ri(Me.y1,Me.x1),ri(Me.y0,Me.x0),!d))}else r.moveTo(c+F,h+U),r.arc(c,h,i,l,u,!d);if(!(n>ha)||!Z)r.lineTo(c+$,h+q);else if(M>ha){var ze=Fa(v,M),Pe=Fa(g,M),_e=km($,q,L,N,n,-Pe,d),Me=km(F,U,O,B,n,-ze,d);r.lineTo(c+_e.cx+_e.x0,h+_e.cy+_e.y0),M<D&&ze===Pe?r.arc(c+_e.cx,h+_e.cy,M,ri(_e.y0,_e.x0),ri(Me.y0,Me.x0),!d):(Pe>0&&r.arc(c+_e.cx,h+_e.cy,Pe,ri(_e.y0,_e.x0),ri(_e.y1,_e.x1),!d),r.arc(c,h,n,ri(_e.cy+_e.y1,_e.cx+_e.x1),ri(Me.cy+Me.y1,Me.cx+Me.x1),d),ze>0&&r.arc(c+Me.cx,h+Me.cy,ze,ri(Me.y1,Me.x1),ri(Me.y0,Me.x0),!d))}else r.lineTo(c+$,h+q),r.arc(c,h,n,u,l,d)}r.closePath()}}}var zhe=function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return r}(),di=function(r){j(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new zhe},e.prototype.buildPath=function(t,i){Vhe(t,i)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(Je);di.prototype.type="sector";var Ghe=function(){function r(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return r}(),Vf=function(r){j(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new Ghe},e.prototype.buildPath=function(t,i){var n=i.cx,a=i.cy,s=Math.PI*2;t.moveTo(n+i.r,a),t.arc(n,a,i.r,0,s,!1),t.moveTo(n+i.r0,a),t.arc(n,a,i.r0,0,s,!0)},e}(Je);Vf.prototype.type="ring";function Hhe(r,e,t,i){var n=[],a=[],s=[],o=[],l,u,c,h;if(i){c=[1/0,1/0],h=[-1/0,-1/0];for(var d=0,f=r.length;d<f;d++)Fs(c,c,r[d]),Us(h,h,r[d]);Fs(c,c,i[0]),Us(h,h,i[1])}for(var d=0,f=r.length;d<f;d++){var p=r[d];if(t)l=r[d?d-1:f-1],u=r[(d+1)%f];else if(d===0||d===f-1){n.push(ss(r[d]));continue}else l=r[d-1],u=r[d+1];Uo(a,u,l),Gp(a,a,e);var v=U0(p,l),g=U0(p,u),m=v+g;m!==0&&(v/=m,g/=m),Gp(s,a,-v),Gp(o,a,g);var y=$w([],p,s),_=$w([],p,o);i&&(Us(y,y,c),Fs(y,y,h),Us(_,_,c),Fs(_,_,h)),n.push(y),n.push(_)}return t&&n.push(n.shift()),n}function MH(r,e,t){var i=e.smooth,n=e.points;if(n&&n.length>=2){if(i){var a=Hhe(n,i,t,e.smoothConstraint);r.moveTo(n[0][0],n[0][1]);for(var s=n.length,o=0;o<(t?s:s-1);o++){var l=a[o*2],u=a[o*2+1],c=n[(o+1)%s];r.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{r.moveTo(n[0][0],n[0][1]);for(var o=1,h=n.length;o<h;o++)r.lineTo(n[o][0],n[o][1])}t&&r.closePath()}}var $he=function(){function r(){this.points=null,this.smooth=0,this.smoothConstraint=null}return r}(),pi=function(r){j(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new $he},e.prototype.buildPath=function(t,i){MH(t,i,!0)},e}(Je);pi.prototype.type="polygon";var Whe=function(){function r(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return r}(),mi=function(r){j(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new Whe},e.prototype.buildPath=function(t,i){MH(t,i,!1)},e}(Je);mi.prototype.type="polyline";var qhe={},jhe=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return r}(),Ar=function(r){j(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new jhe},e.prototype.buildPath=function(t,i){var n,a,s,o;if(this.subPixelOptimize){var l=fH(qhe,i,this.style);n=l.x1,a=l.y1,s=l.x2,o=l.y2}else n=i.x1,a=i.y1,s=i.x2,o=i.y2;var u=i.percent;u!==0&&(t.moveTo(n,a),u<1&&(s=n*(1-u)+s*u,o=a*(1-u)+o*u),t.lineTo(s,o))},e.prototype.pointAt=function(t){var i=this.shape;return[i.x1*(1-t)+i.x2*t,i.y1*(1-t)+i.y2*t]},e}(Je);Ar.prototype.type="line";var Bi=[],Xhe=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1}return r}();function eR(r,e,t){var i=r.cpx2,n=r.cpy2;return i!=null||n!=null?[(t?ok:Lr)(r.x1,r.cpx1,r.cpx2,r.x2,e),(t?ok:Lr)(r.y1,r.cpy1,r.cpy2,r.y2,e)]:[(t?Yw:zr)(r.x1,r.cpx1,r.x2,e),(t?Yw:zr)(r.y1,r.cpy1,r.y2,e)]}var zf=function(r){j(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new Xhe},e.prototype.buildPath=function(t,i){var n=i.x1,a=i.y1,s=i.x2,o=i.y2,l=i.cpx1,u=i.cpy1,c=i.cpx2,h=i.cpy2,d=i.percent;d!==0&&(t.moveTo(n,a),c==null||h==null?(d<1&&(Cv(n,l,s,d,Bi),l=Bi[1],s=Bi[2],Cv(a,u,o,d,Bi),u=Bi[1],o=Bi[2]),t.quadraticCurveTo(l,u,s,o)):(d<1&&(sl(n,l,c,s,d,Bi),l=Bi[1],c=Bi[2],s=Bi[3],sl(a,u,h,o,d,Bi),u=Bi[1],h=Bi[2],o=Bi[3]),t.bezierCurveTo(l,u,c,h,s,o)))},e.prototype.pointAt=function(t){return eR(this.shape,t,!1)},e.prototype.tangentAt=function(t){var i=eR(this.shape,t,!0);return vc(i,i)},e}(Je);zf.prototype.type="bezier-curve";var Yhe=function(){function r(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r}(),Sg=function(r){j(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new Yhe},e.prototype.buildPath=function(t,i){var n=i.cx,a=i.cy,s=Math.max(i.r,0),o=i.startAngle,l=i.endAngle,u=i.clockwise,c=Math.cos(o),h=Math.sin(o);t.moveTo(c*s+n,h*s+a),t.arc(n,a,s,o,l,!u)},e}(Je);Sg.prototype.type="arc";var k1=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="compound",t}return e.prototype._updatePathDirty=function(){for(var t=this.shape.paths,i=this.shapeChanged(),n=0;n<t.length;n++)i=i||t[n].shapeChanged();i&&this.dirtyShape()},e.prototype.beforeBrush=function(){this._updatePathDirty();for(var t=this.shape.paths||[],i=this.getGlobalScale(),n=0;n<t.length;n++)t[n].path||t[n].createPathProxy(),t[n].path.setScale(i[0],i[1],t[n].segmentIgnoreThreshold)},e.prototype.buildPath=function(t,i){for(var n=i.paths||[],a=0;a<n.length;a++)n[a].buildPath(t,n[a].shape,!0)},e.prototype.afterBrush=function(){for(var t=this.shape.paths||[],i=0;i<t.length;i++)t[i].pathUpdated()},e.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),Je.prototype.getBoundingRect.call(this)},e}(Je),LH=function(){function r(e){this.colorStops=e||[]}return r.prototype.addColorStop=function(e,t){this.colorStops.push({offset:e,color:t})},r}(),Gf=function(r){j(e,r);function e(t,i,n,a,s,o){var l=r.call(this,s)||this;return l.x=t??0,l.y=i??0,l.x2=n??1,l.y2=a??0,l.type="linear",l.global=o||!1,l}return e}(LH),OD=function(r){j(e,r);function e(t,i,n,a,s){var o=r.call(this,a)||this;return o.x=t??.5,o.y=i??.5,o.r=n??.5,o.type="radial",o.global=s||!1,o}return e}(LH),Xl=[0,0],Yl=[0,0],Rm=new $e,Om=new $e,K0=function(){function r(e,t){this._corners=[],this._axes=[],this._origin=[0,0];for(var i=0;i<4;i++)this._corners[i]=new $e;for(var i=0;i<2;i++)this._axes[i]=new $e;e&&this.fromBoundingRect(e,t)}return r.prototype.fromBoundingRect=function(e,t){var i=this._corners,n=this._axes,a=e.x,s=e.y,o=a+e.width,l=s+e.height;if(i[0].set(a,s),i[1].set(o,s),i[2].set(o,l),i[3].set(a,l),t)for(var u=0;u<4;u++)i[u].transform(t);$e.sub(n[0],i[1],i[0]),$e.sub(n[1],i[3],i[0]),n[0].normalize(),n[1].normalize();for(var u=0;u<2;u++)this._origin[u]=n[u].dot(i[0])},r.prototype.intersect=function(e,t){var i=!0,n=!t;return Rm.set(1/0,1/0),Om.set(0,0),!this._intersectCheckOneSide(this,e,Rm,Om,n,1)&&(i=!1,n)||!this._intersectCheckOneSide(e,this,Rm,Om,n,-1)&&(i=!1,n)||n||$e.copy(t,i?Rm:Om),i},r.prototype._intersectCheckOneSide=function(e,t,i,n,a,s){for(var o=!0,l=0;l<2;l++){var u=this._axes[l];if(this._getProjMinMaxOnAxis(l,e._corners,Xl),this._getProjMinMaxOnAxis(l,t._corners,Yl),Xl[1]<Yl[0]||Xl[0]>Yl[1]){if(o=!1,a)return o;var c=Math.abs(Yl[0]-Xl[1]),h=Math.abs(Xl[0]-Yl[1]);Math.min(c,h)>n.len()&&(c<h?$e.scale(n,u,-c*s):$e.scale(n,u,h*s))}else if(i){var c=Math.abs(Yl[0]-Xl[1]),h=Math.abs(Xl[0]-Yl[1]);Math.min(c,h)<i.len()&&(c<h?$e.scale(i,u,c*s):$e.scale(i,u,-h*s))}}return o},r.prototype._getProjMinMaxOnAxis=function(e,t,i){for(var n=this._axes[e],a=this._origin,s=t[0].dot(n)+a[e],o=s,l=s,u=1;u<t.length;u++){var c=t[u].dot(n)+a[e];o=Math.min(c,o),l=Math.max(c,l)}i[0]=o,i[1]=l},r}(),Khe=[],kH=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.notClear=!0,t.incremental=!0,t._displayables=[],t._temporaryDisplayables=[],t._cursor=0,t}return e.prototype.traverse=function(t,i){t.call(i,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,i){i?this._temporaryDisplayables.push(t):this._displayables.push(t),this.markRedraw()},e.prototype.addDisplayables=function(t,i){i=i||!1;for(var n=0;n<t.length;n++)this.addDisplayable(t[n],i)},e.prototype.getDisplayables=function(){return this._displayables},e.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},e.prototype.eachPendingDisplayable=function(t){for(var i=this._cursor;i<this._displayables.length;i++)t&&t(this._displayables[i]);for(var i=0;i<this._temporaryDisplayables.length;i++)t&&t(this._temporaryDisplayables[i])},e.prototype.update=function(){this.updateTransform();for(var t=this._cursor;t<this._displayables.length;t++){var i=this._displayables[t];i.parent=this,i.update(),i.parent=null}for(var t=0;t<this._temporaryDisplayables.length;t++){var i=this._temporaryDisplayables[t];i.parent=this,i.update(),i.parent=null}},e.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new We(1/0,1/0,-1/0,-1/0),i=0;i<this._displayables.length;i++){var n=this._displayables[i],a=n.getBoundingRect().clone();n.needLocalTransform()&&a.applyTransform(n.getLocalTransform(Khe)),t.union(a)}this._rect=t}return this._rect},e.prototype.contain=function(t,i){var n=this.transformCoordToLocal(t,i),a=this.getBoundingRect();if(a.contain(n[0],n[1]))for(var s=0;s<this._displayables.length;s++){var o=this._displayables[s];if(o.contain(t,i))return!0}return!1},e}(Jn),RH=lt();function Hf(r,e,t,i,n){var a;if(e&&e.ecModel){var s=e.ecModel.getUpdatePayload();a=s&&s.animation}var o=e&&e.isAnimationEnabled(),l=r==="update";if(o){var u=void 0,c=void 0,h=void 0;i?(u=Fe(i.duration,200),c=Fe(i.easing,"cubicOut"),h=0):(u=e.getShallow(l?"animationDurationUpdate":"animationDuration"),c=e.getShallow(l?"animationEasingUpdate":"animationEasing"),h=e.getShallow(l?"animationDelayUpdate":"animationDelay")),a&&(a.duration!=null&&(u=a.duration),a.easing!=null&&(c=a.easing),a.delay!=null&&(h=a.delay)),xe(h)&&(h=h(t,n)),xe(u)&&(u=u(t));var d={duration:u||0,delay:h,easing:c};return d}else return null}function ND(r,e,t,i,n,a,s){var o=!1,l;xe(n)?(s=a,a=n,n=null):Ae(n)&&(a=n.cb,s=n.during,o=n.isFrom,l=n.removeOpt,n=n.dataIndex);var u=r==="leave";u||e.stopAnimation("leave");var c=Hf(r,i,n,u?l||{}:null,i&&i.getAnimationDelayParams?i.getAnimationDelayParams(e,n):null);if(c&&c.duration>0){var h=c.duration,d=c.delay,f=c.easing,p={duration:h,delay:d||0,easing:f,done:a,force:!!a||!!s,setToFinal:!u,scope:r,during:s};o?e.animateFrom(t,p):e.animateTo(t,p)}else e.stopAnimation(),!o&&e.attr(t),s&&s(1),a&&a()}function ct(r,e,t,i,n,a){ND("update",r,e,t,i,n,a)}function Bt(r,e,t,i,n,a){ND("enter",r,e,t,i,n,a)}function $h(r){if(!r.__zr)return!0;for(var e=0;e<r.animators.length;e++){var t=r.animators[e];if(t.scope==="leave")return!0}return!1}function ol(r,e,t,i,n,a){$h(r)||ND("leave",r,e,t,i,n,a)}function tR(r,e,t,i){r.removeTextContent(),r.removeTextGuideLine(),ol(r,{style:{opacity:0}},e,t,i)}function kv(r,e,t){function i(){r.parent&&r.parent.remove(r)}r.isGroup?r.traverse(function(n){n.isGroup||tR(n,e,t,i)}):tR(r,e,t,i)}function Ia(r){RH(r).oldStyle=r.style}function Zhe(r){return RH(r).oldStyle}var Z0=Math.max,Q0=Math.min,S2={};function OH(r){return Je.extend(r)}var Qhe=khe;function NH(r,e){return Qhe(r,e)}function ra(r,e){S2[r]=e}function R1(r){if(S2.hasOwnProperty(r))return S2[r]}function Tg(r,e,t,i){var n=IH(r,e);return t&&(i==="center"&&(t=BH(t,n.getBoundingRect())),FD(n,t)),n}function BD(r,e,t){var i=new Ur({style:{image:r,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(n){if(t==="center"){var a={width:n.width,height:n.height};i.setStyle(BH(e,a))}}});return i}function BH(r,e){var t=e.width/e.height,i=r.height*t,n;i<=r.width?n=r.height:(i=r.width,n=i/t);var a=r.x+r.width/2,s=r.y+r.height/2;return{x:a-i/2,y:s-n/2,width:i,height:n}}var vn=Rhe;function FD(r,e){if(r.applyTransform){var t=r.getBoundingRect(),i=t.calculateTransform(e);r.applyTransform(i)}}function _f(r,e){return fH(r,r,{lineWidth:e}),r}function Jhe(r){return dH(r.shape,r.shape,r.style),r}var Vy=wu;function Zo(r,e){for(var t=vg([]);r&&r!==e;)os(t,r.getLocalTransform(),t),r=r.parent;return t}function Ca(r,e,t){return e&&!Jr(e)&&(e=Vs.getLocalTransform(e)),t&&(e=gc([],e)),$r([],r,e)}function O1(r,e,t){var i=e[4]===0||e[5]===0||e[0]===0?1:Math.abs(2*e[4]/e[0]),n=e[4]===0||e[5]===0||e[2]===0?1:Math.abs(2*e[4]/e[2]),a=[r==="left"?-i:r==="right"?i:0,r==="top"?-n:r==="bottom"?n:0];return a=Ca(a,e,t),Math.abs(a[0])>Math.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function rR(r){return!r.isGroup}function efe(r){return r.shape!=null}function xg(r,e,t){if(!r||!e)return;function i(s){var o={};return s.traverse(function(l){rR(l)&&l.anid&&(o[l.anid]=l)}),o}function n(s){var o={x:s.x,y:s.y,rotation:s.rotation};return efe(s)&&(o.shape=Q({},s.shape)),o}var a=i(r);e.traverse(function(s){if(rR(s)&&s.anid){var o=a[s.anid];if(o){var l=n(s);s.attr(n(o)),ct(s,l,t,ke(s).dataIndex)}}})}function UD(r,e){return ae(r,function(t){var i=t[0];i=Z0(i,e.x),i=Q0(i,e.x+e.width);var n=t[1];return n=Z0(n,e.y),n=Q0(n,e.y+e.height),[i,n]})}function FH(r,e){var t=Z0(r.x,e.x),i=Q0(r.x+r.width,e.x+e.width),n=Z0(r.y,e.y),a=Q0(r.y+r.height,e.y+e.height);if(i>=t&&a>=n)return{x:t,y:n,width:i-t,height:a-n}}function $f(r,e,t){var i=Q({rectHover:!0},e),n=i.style={strokeNoScale:!0};if(t=t||{x:-1,y:-1,width:2,height:2},r)return r.indexOf("image://")===0?(n.image=r.slice(8),Ce(n,t),new Ur(i)):Tg(r.replace("path://",""),i,t,"center")}function _p(r,e,t,i,n){for(var a=0,s=n[n.length-1];a<n.length;a++){var o=n[a];if(UH(r,e,t,i,o[0],o[1],s[0],s[1]))return!0;s=o}}function UH(r,e,t,i,n,a,s,o){var l=t-r,u=i-e,c=s-n,h=o-a,d=ZS(c,h,l,u);if(tfe(d))return!1;var f=r-n,p=e-a,v=ZS(f,p,l,u)/d;if(v<0||v>1)return!1;var g=ZS(f,p,c,h)/d;return!(g<0||g>1)}function ZS(r,e,t,i){return r*i-t*e}function tfe(r){return r<=1e-6&&r>=-1e-6}function Wf(r){var e=r.itemTooltipOption,t=r.componentModel,i=r.itemName,n=de(e)?{formatter:e}:e,a=t.mainType,s=t.componentIndex,o={componentType:a,name:i,$vars:["name"]};o[a+"Index"]=s;var l=r.formatterParamsExtra;l&&R(rt(l),function(c){ye(o,c)||(o[c]=l[c],o.$vars.push(c))});var u=ke(r.el);u.componentMainType=a,u.componentIndex=s,u.tooltipConfig={name:i,option:Ce({content:i,encodeHTMLContent:!0,formatterParams:o},n)}}function iR(r,e){var t;r.isGroup&&(t=e(r)),t||r.traverse(e)}function gl(r,e){if(r)if(ie(r))for(var t=0;t<r.length;t++)iR(r[t],e);else iR(r,e)}ra("circle",ms);ra("ellipse",bg);ra("sector",di);ra("ring",Vf);ra("polygon",pi);ra("polyline",mi);ra("rect",at);ra("line",Ar);ra("bezierCurve",zf);ra("arc",Sg);const mc=Object.freeze(Object.defineProperty({__proto__:null,Arc:Sg,BezierCurve:zf,BoundingRect:We,Circle:ms,CompoundPath:k1,Ellipse:bg,Group:Le,Image:Ur,IncrementalDisplayable:kH,Line:Ar,LinearGradient:Gf,OrientedBoundingRect:K0,Path:Je,Point:$e,Polygon:pi,Polyline:mi,RadialGradient:OD,Rect:at,Ring:Vf,Sector:di,Text:nt,applyTransform:Ca,clipPointsByRect:UD,clipRectByRect:FH,createIcon:$f,extendPath:NH,extendShape:OH,getShapeClass:R1,getTransform:Zo,groupTransition:xg,initProps:Bt,isElementRemoved:$h,lineLineIntersect:UH,linePolygonIntersect:_p,makeImage:BD,makePath:Tg,mergePath:vn,registerShape:ra,removeElement:ol,removeElementWithFadeOut:kv,resizePath:FD,setTooltipConfig:Wf,subPixelOptimize:Vy,subPixelOptimizeLine:_f,subPixelOptimizeRect:Jhe,transformDirection:O1,traverseElements:gl,updateProps:ct},Symbol.toStringTag,{value:"Module"}));var N1={};function VH(r,e){for(var t=0;t<Oi.length;t++){var i=Oi[t],n=e[i],a=r.ensureState(i);a.style=a.style||{},a.style.text=n}var s=r.currentStates.slice();r.clearStates(!0),r.setStyle({text:e.normal}),r.useStates(s,!0)}function T2(r,e,t){var i=r.labelFetcher,n=r.labelDataIndex,a=r.labelDimIndex,s=e.normal,o;i&&(o=i.getFormattedLabel(n,"normal",null,a,s&&s.get("formatter"),t!=null?{interpolatedValue:t}:null)),o==null&&(o=xe(r.defaultText)?r.defaultText(n,r,t):r.defaultText);for(var l={normal:o},u=0;u<Oi.length;u++){var c=Oi[u],h=e[c];l[c]=Fe(i?i.getFormattedLabel(n,c,null,a,h&&h.get("formatter")):null,o)}return l}function ti(r,e,t,i){t=t||N1;for(var n=r instanceof nt,a=!1,s=0;s<Mv.length;s++){var o=e[Mv[s]];if(o&&o.getShallow("show")){a=!0;break}}var l=n?r:r.getTextContent();if(a){n||(l||(l=new nt,r.setTextContent(l)),r.stateProxy&&(l.stateProxy=r.stateProxy));var u=T2(t,e),c=e.normal,h=!!c.getShallow("show"),d=Mt(c,i&&i.normal,t,!1,!n);d.text=u.normal,n||r.setTextConfig(J0(c,t,!1));for(var s=0;s<Oi.length;s++){var f=Oi[s],o=e[f];if(o){var p=l.ensureState(f),v=!!Fe(o.getShallow("show"),h);if(v!==h&&(p.ignore=!v),p.style=Mt(o,i&&i[f],t,!0,!n),p.style.text=u[f],!n){var g=r.ensureState(f);g.textConfig=J0(o,t,!0)}}}l.silent=!!c.getShallow("silent"),l.style.x!=null&&(d.x=l.style.x),l.style.y!=null&&(d.y=l.style.y),l.ignore=!h,l.useStyle(d),l.dirty(),t.enableTextSetter&&(qf(l).setLabelText=function(m){var y=T2(t,e,m);VH(l,y)})}else l&&(l.ignore=!0);r.dirty()}function Br(r,e){e=e||"label";for(var t={normal:r.getModel(e)},i=0;i<Oi.length;i++){var n=Oi[i];t[n]=r.getModel([n,e])}return t}function Mt(r,e,t,i,n){var a={};return rfe(a,r,t,i,n),e&&Q(a,e),a}function J0(r,e,t){e=e||{};var i={},n,a=r.getShallow("rotate"),s=Fe(r.getShallow("distance"),t?null:5),o=r.getShallow("offset");return n=r.getShallow("position")||(t?null:"inside"),n==="outside"&&(n=e.defaultOutsidePosition||"top"),n!=null&&(i.position=n),o!=null&&(i.offset=o),a!=null&&(a*=Math.PI/180,i.rotation=a),s!=null&&(i.distance=s),i.outsideFill=r.get("color")==="inherit"?e.inheritColor||null:"auto",i}function rfe(r,e,t,i,n){t=t||N1;var a=e.ecModel,s=a&&a.option.textStyle,o=ife(e),l;if(o){l={};for(var u in o)if(o.hasOwnProperty(u)){var c=e.getModel(["rich",u]);oR(l[u]={},c,s,t,i,n,!1,!0)}}l&&(r.rich=l);var h=e.get("overflow");h&&(r.overflow=h);var d=e.get("minMargin");d!=null&&(r.margin=d),oR(r,e,s,t,i,n,!0,!1)}function ife(r){for(var e;r&&r!==r.ecModel;){var t=(r.option||N1).rich;if(t){e=e||{};for(var i=rt(t),n=0;n<i.length;n++){var a=i[n];e[a]=1}}r=r.parentModel}return e}var nR=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],aR=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],sR=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function oR(r,e,t,i,n,a,s,o){t=!n&&t||N1;var l=i&&i.inheritColor,u=e.getShallow("color"),c=e.getShallow("textBorderColor"),h=Fe(e.getShallow("opacity"),t.opacity);(u==="inherit"||u==="auto")&&(l?u=l:u=null),(c==="inherit"||c==="auto")&&(l?c=l:c=null),a||(u=u||t.color,c=c||t.textBorderColor),u!=null&&(r.fill=u),c!=null&&(r.stroke=c);var d=Fe(e.getShallow("textBorderWidth"),t.textBorderWidth);d!=null&&(r.lineWidth=d);var f=Fe(e.getShallow("textBorderType"),t.textBorderType);f!=null&&(r.lineDash=f);var p=Fe(e.getShallow("textBorderDashOffset"),t.textBorderDashOffset);p!=null&&(r.lineDashOffset=p),!n&&h==null&&!o&&(h=i&&i.defaultOpacity),h!=null&&(r.opacity=h),!n&&!a&&r.fill==null&&i.inheritColor&&(r.fill=i.inheritColor);for(var v=0;v<nR.length;v++){var g=nR[v],m=Fe(e.getShallow(g),t[g]);m!=null&&(r[g]=m)}for(var v=0;v<aR.length;v++){var g=aR[v],m=e.getShallow(g);m!=null&&(r[g]=m)}if(r.verticalAlign==null){var y=e.getShallow("baseline");y!=null&&(r.verticalAlign=y)}if(!s||!i.disableBox){for(var v=0;v<sR.length;v++){var g=sR[v],m=e.getShallow(g);m!=null&&(r[g]=m)}var _=e.getShallow("borderType");_!=null&&(r.borderDash=_),(r.backgroundColor==="auto"||r.backgroundColor==="inherit")&&l&&(r.backgroundColor=l),(r.borderColor==="auto"||r.borderColor==="inherit")&&l&&(r.borderColor=l)}}function VD(r,e){var t=e&&e.getModel("textStyle");return qn([r.fontStyle||t&&t.getShallow("fontStyle")||"",r.fontWeight||t&&t.getShallow("fontWeight")||"",(r.fontSize||t&&t.getShallow("fontSize")||12)+"px",r.fontFamily||t&&t.getShallow("fontFamily")||"sans-serif"].join(" "))}var qf=lt();function zH(r,e,t,i){if(r){var n=qf(r);n.prevValue=n.value,n.value=t;var a=e.normal;n.valueAnimation=a.get("valueAnimation"),n.valueAnimation&&(n.precision=a.get("precision"),n.defaultInterpolatedText=i,n.statesModels=e)}}function GH(r,e,t,i,n){var a=qf(r);if(!a.valueAnimation||a.prevValue===a.value)return;var s=a.defaultInterpolatedText,o=Fe(a.interpolatedValue,a.prevValue),l=a.value;function u(c){var h=iH(t,a.precision,o,l,c);a.interpolatedValue=c===1?null:h;var d=T2({labelDataIndex:e,labelFetcher:n,defaultText:s?s(h):h+""},a.statesModels,h);VH(r,d)}r.percent=0,(a.prevValue==null?Bt:ct)(r,{percent:1},i,e,null,u)}var nfe=["textStyle","color"],QS=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],JS=new nt,afe=function(){function r(){}return r.prototype.getTextColor=function(e){var t=this.ecModel;return this.getShallow("color")||(!e&&t?t.get(nfe):null)},r.prototype.getFont=function(){return VD({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},r.prototype.getTextRect=function(e){for(var t={text:e,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},i=0;i<QS.length;i++)t[QS[i]]=this.getShallow(QS[i]);return JS.useStyle(t),JS.update(),JS.getBoundingRect()},r}(),HH=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],sfe=oc(HH),ofe=function(){function r(){}return r.prototype.getLineStyle=function(e){return sfe(this,e)},r}(),$H=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],lfe=oc($H),ufe=function(){function r(){}return r.prototype.getItemStyle=function(e,t){return lfe(this,e,t)},r}(),ft=function(){function r(e,t,i){this.parentModel=t,this.ecModel=i,this.option=e}return r.prototype.init=function(e,t,i){},r.prototype.mergeOption=function(e,t){He(this.option,e,!0)},r.prototype.get=function(e,t){return e==null?this.option:this._doGet(this.parsePath(e),!t&&this.parentModel)},r.prototype.getShallow=function(e,t){var i=this.option,n=i==null?i:i[e];if(n==null&&!t){var a=this.parentModel;a&&(n=a.getShallow(e))}return n},r.prototype.getModel=function(e,t){var i=e!=null,n=i?this.parsePath(e):null,a=i?this._doGet(n):this.option;return t=t||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(n)),new r(a,t,this.ecModel)},r.prototype.isEmpty=function(){return this.option==null},r.prototype.restoreData=function(){},r.prototype.clone=function(){var e=this.constructor;return new e(Ee(this.option))},r.prototype.parsePath=function(e){return typeof e=="string"?e.split("."):e},r.prototype.resolveParentPath=function(e){return e},r.prototype.isAnimationEnabled=function(){if(!et.node&&this.option){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},r.prototype._doGet=function(e,t){var i=this.option;if(!e)return i;for(var n=0;n<e.length&&!(e[n]&&(i=i&&typeof i=="object"?i[e[n]]:null,i==null));n++);return i==null&&t&&(i=t._doGet(this.resolveParentPath(e),t.parentModel)),i},r}();AD(ft);xce(ft);ir(ft,ofe);ir(ft,ufe);ir(ft,Ece);ir(ft,afe);var cfe=Math.round(Math.random()*10);function jf(r){return[r||"",cfe++].join("_")}function hfe(r){var e={};r.registerSubTypeDefaulter=function(t,i){var n=es(t);e[n.main]=i},r.determineSubType=function(t,i){var n=i.type;if(!n){var a=es(t).main;r.hasSubTypes(t)&&e[a]&&(n=e[a](i))}return n}}function ffe(r,e){r.topologicalTravel=function(a,s,o,l){if(!a.length)return;var u=t(s),c=u.graph,h=u.noEntryList,d={};for(R(a,function(y){d[y]=!0});h.length;){var f=h.pop(),p=c[f],v=!!d[f];v&&(o.call(l,f,p.originalDeps.slice()),delete d[f]),R(p.successor,v?m:g)}R(d,function(){var y="";throw new Error(y)});function g(y){c[y].entryCount--,c[y].entryCount===0&&h.push(y)}function m(y){d[y]=!0,g(y)}};function t(a){var s={},o=[];return R(a,function(l){var u=i(s,l),c=u.originalDeps=e(l),h=n(c,a);u.entryCount=h.length,u.entryCount===0&&o.push(l),R(h,function(d){Xe(u.predecessor,d)<0&&u.predecessor.push(d);var f=i(s,d);Xe(f.successor,d)<0&&f.successor.push(l)})}),{graph:s,noEntryList:o}}function i(a,s){return a[s]||(a[s]={predecessor:[],successor:[]}),a[s]}function n(a,s){var o=[];return R(a,function(l){Xe(s,l)>=0&&o.push(l)}),o}}function ml(r,e){return He(He({},r,!0),e,!0)}const dfe={time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}},pfe={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:"旭日图",custom:"自定义图表",chart:"图表"}},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:""}}}};var e_="ZH",zD="EN",Wh=zD,zy={},GD={},WH=et.domSupported?function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage||Wh).toUpperCase();return r.indexOf(e_)>-1?e_:Wh}():Wh;function HD(r,e){r=r.toUpperCase(),GD[r]=new ft(e),zy[r]=e}function vfe(r){if(de(r)){var e=zy[r.toUpperCase()]||{};return r===e_||r===zD?Ee(e):He(Ee(e),Ee(zy[Wh]),!1)}else return He(Ee(r),Ee(zy[Wh]),!1)}function x2(r){return GD[r]}function gfe(){return GD[Wh]}HD(zD,dfe);HD(e_,pfe);var $D=1e3,WD=$D*60,Qp=WD*60,Hn=Qp*24,lR=Hn*365,bp={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}"},Nm="{yyyy}-{MM}-{dd}",uR={year:"{yyyy}",month:"{yyyy}-{MM}",day:Nm,hour:Nm+" "+bp.hour,minute:Nm+" "+bp.minute,second:Nm+" "+bp.second,millisecond:bp.none},eT=["year","month","day","hour","minute","second","millisecond"],qH=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function wi(r,e){return r+="","0000".substr(0,e-r.length)+r}function qh(r){switch(r){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return r}}function mfe(r){return r===qh(r)}function yfe(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function wg(r,e,t,i){var n=Cn(r),a=n[qD(t)](),s=n[jh(t)]()+1,o=Math.floor((s-1)/3)+1,l=n[B1(t)](),u=n["get"+(t?"UTC":"")+"Day"](),c=n[Rv(t)](),h=(c-1)%12+1,d=n[F1(t)](),f=n[U1(t)](),p=n[V1(t)](),v=c>=12?"pm":"am",g=v.toUpperCase(),m=i instanceof ft?i:x2(i||WH)||gfe(),y=m.getModel("time"),_=y.get("month"),b=y.get("monthAbbr"),T=y.get("dayOfWeek"),x=y.get("dayOfWeekAbbr");return(e||"").replace(/{a}/g,v+"").replace(/{A}/g,g+"").replace(/{yyyy}/g,a+"").replace(/{yy}/g,wi(a%100+"",2)).replace(/{Q}/g,o+"").replace(/{MMMM}/g,_[s-1]).replace(/{MMM}/g,b[s-1]).replace(/{MM}/g,wi(s,2)).replace(/{M}/g,s+"").replace(/{dd}/g,wi(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,T[u]).replace(/{ee}/g,x[u]).replace(/{e}/g,u+"").replace(/{HH}/g,wi(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,wi(h+"",2)).replace(/{h}/g,h+"").replace(/{mm}/g,wi(d,2)).replace(/{m}/g,d+"").replace(/{ss}/g,wi(f,2)).replace(/{s}/g,f+"").replace(/{SSS}/g,wi(p,3)).replace(/{S}/g,p+"")}function _fe(r,e,t,i,n){var a=null;if(de(t))a=t;else if(xe(t))a=t(r.value,e,{level:r.level});else{var s=Q({},bp);if(r.level>0)for(var o=0;o<eT.length;++o)s[eT[o]]="{primary|"+s[eT[o]]+"}";var l=t?t.inherit===!1?t:Ce(t,s):s,u=jH(r.value,n);if(l[u])a=l[u];else if(l.inherit){for(var c=qH.indexOf(u),o=c-1;o>=0;--o)if(l[u]){a=l[u];break}a=a||s.none}if(ie(a)){var h=r.level==null?0:r.level>=0?r.level:a.length+r.level;h=Math.min(h,a.length-1),a=a[h]}}return wg(new Date(r.value),a,n,i)}function jH(r,e){var t=Cn(r),i=t[jh(e)]()+1,n=t[B1(e)](),a=t[Rv(e)](),s=t[F1(e)](),o=t[U1(e)](),l=t[V1(e)](),u=l===0,c=u&&o===0,h=c&&s===0,d=h&&a===0,f=d&&n===1,p=f&&i===1;return p?"year":f?"month":d?"day":h?"hour":c?"minute":u?"second":"millisecond"}function cR(r,e,t){var i=ut(r)?Cn(r):r;switch(e=e||jH(r,t),e){case"year":return i[qD(t)]();case"half-year":return i[jh(t)]()>=6?1:0;case"quarter":return Math.floor((i[jh(t)]()+1)/4);case"month":return i[jh(t)]();case"day":return i[B1(t)]();case"half-day":return i[Rv(t)]()/24;case"hour":return i[Rv(t)]();case"minute":return i[F1(t)]();case"second":return i[U1(t)]();case"millisecond":return i[V1(t)]()}}function qD(r){return r?"getUTCFullYear":"getFullYear"}function jh(r){return r?"getUTCMonth":"getMonth"}function B1(r){return r?"getUTCDate":"getDate"}function Rv(r){return r?"getUTCHours":"getHours"}function F1(r){return r?"getUTCMinutes":"getMinutes"}function U1(r){return r?"getUTCSeconds":"getSeconds"}function V1(r){return r?"getUTCMilliseconds":"getMilliseconds"}function bfe(r){return r?"setUTCFullYear":"setFullYear"}function XH(r){return r?"setUTCMonth":"setMonth"}function YH(r){return r?"setUTCDate":"setDate"}function KH(r){return r?"setUTCHours":"setHours"}function ZH(r){return r?"setUTCMinutes":"setMinutes"}function QH(r){return r?"setUTCSeconds":"setSeconds"}function JH(r){return r?"setUTCMilliseconds":"setMilliseconds"}function Sfe(r,e,t,i,n,a,s,o){var l=new nt({style:{text:r,font:e,align:t,verticalAlign:i,padding:n,rich:a,overflow:s?"truncate":null,lineHeight:o}});return l.getBoundingRect()}function jD(r){if(!xD(r))return de(r)?r:"-";var e=(r+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function XD(r,e){return r=(r||"").toLowerCase().replace(/-(.)/g,function(t,i){return i.toUpperCase()}),e&&r&&(r=r.charAt(0).toUpperCase()+r.slice(1)),r}var yc=b1;function w2(r,e,t){var i="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function n(c){return c&&qn(c)?c:"-"}function a(c){return!!(c!=null&&!isNaN(c)&&isFinite(c))}var s=e==="time",o=r instanceof Date;if(s||o){var l=s?Cn(r):r;if(isNaN(+l)){if(o)return"-"}else return wg(l,i,t)}if(e==="ordinal")return B0(r)?n(r):ut(r)&&a(r)?r+"":"-";var u=vs(r);return a(u)?jD(u):B0(r)?n(r):typeof r=="boolean"?r+"":"-"}var hR=["a","b","c","d","e","f","g"],tT=function(r,e){return"{"+r+(e??"")+"}"};function YD(r,e,t){ie(e)||(e=[e]);var i=e.length;if(!i)return"";for(var n=e[0].$vars||[],a=0;a<n.length;a++){var s=hR[a];r=r.replace(tT(s),tT(s,0))}for(var o=0;o<i;o++)for(var l=0;l<n.length;l++){var u=e[o][n[l]];r=r.replace(tT(hR[l],o),t?Di(u):u)}return r}function Tfe(r,e,t){return R(e,function(i,n){r=r.replace("{"+n+"}",i)}),r}function e$(r,e){var t=de(r)?{color:r,extraCssText:e}:r||{},i=t.color,n=t.type;e=t.extraCssText;var a=t.renderMode||"html";if(!i)return"";if(a==="html")return n==="subItem"?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+Di(i)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+Di(i)+";"+(e||"")+'"></span>';var s=t.markerId||"markerX";return{renderMode:a,content:"{"+s+"|} ",style:n==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:i}:{width:10,height:10,borderRadius:5,backgroundColor:i}}}function xfe(r,e,t){(r==="week"||r==="month"||r==="quarter"||r==="half-year"||r==="year")&&(r=`MM-dd
|
||
yyyy`);var i=Cn(e),n=t?"getUTC":"get",a=i[n+"FullYear"](),s=i[n+"Month"]()+1,o=i[n+"Date"](),l=i[n+"Hours"](),u=i[n+"Minutes"](),c=i[n+"Seconds"](),h=i[n+"Milliseconds"]();return r=r.replace("MM",wi(s,2)).replace("M",s).replace("yyyy",a).replace("yy",wi(a%100+"",2)).replace("dd",wi(o,2)).replace("d",o).replace("hh",wi(l,2)).replace("h",l).replace("mm",wi(u,2)).replace("m",u).replace("ss",wi(c,2)).replace("s",c).replace("SSS",wi(h,3)),r}function wfe(r){return r&&r.charAt(0).toUpperCase()+r.substr(1)}function uc(r,e){return e=e||"transparent",de(r)?r:Ae(r)&&r.colorStops&&(r.colorStops[0]||{}).color||e}function t_(r,e){if(e==="_blank"||e==="blank"){var t=window.open();t.opener=null,t.location.href=r}else window.open(r,e)}var Gy=R,t$=["left","right","top","bottom","width","height"],Au=[["width","left","right"],["height","top","bottom"]];function KD(r,e,t,i,n){var a=0,s=0;i==null&&(i=1/0),n==null&&(n=1/0);var o=0;e.eachChild(function(l,u){var c=l.getBoundingRect(),h=e.childAt(u+1),d=h&&h.getBoundingRect(),f,p;if(r==="horizontal"){var v=c.width+(d?-d.x+c.x:0);f=a+v,f>i||l.newline?(a=0,f=v,s+=o+t,o=c.height):o=Math.max(o,c.height)}else{var g=c.height+(d?-d.y+c.y:0);p=s+g,p>n||l.newline?(a+=o+t,s=0,p=g,o=c.width):o=Math.max(o,c.width)}l.newline||(l.x=a,l.y=s,l.markRedraw(),r==="horizontal"?a=f+t:s=p+t)})}var ju=KD;Be(KD,"vertical");Be(KD,"horizontal");function Cfe(r,e,t){var i=e.width,n=e.height,a=ce(r.left,i),s=ce(r.top,n),o=ce(r.right,i),l=ce(r.bottom,n);return(isNaN(a)||isNaN(parseFloat(r.left)))&&(a=0),(isNaN(o)||isNaN(parseFloat(r.right)))&&(o=i),(isNaN(s)||isNaN(parseFloat(r.top)))&&(s=0),(isNaN(l)||isNaN(parseFloat(r.bottom)))&&(l=n),t=yc(t||0),{width:Math.max(o-a-t[1]-t[3],0),height:Math.max(l-s-t[0]-t[2],0)}}function br(r,e,t){t=yc(t||0);var i=e.width,n=e.height,a=ce(r.left,i),s=ce(r.top,n),o=ce(r.right,i),l=ce(r.bottom,n),u=ce(r.width,i),c=ce(r.height,n),h=t[2]+t[0],d=t[1]+t[3],f=r.aspect;switch(isNaN(u)&&(u=i-o-d-a),isNaN(c)&&(c=n-l-h-s),f!=null&&(isNaN(u)&&isNaN(c)&&(f>i/n?u=i*.8:c=n*.8),isNaN(u)&&(u=f*c),isNaN(c)&&(c=u/f)),isNaN(a)&&(a=i-o-u-d),isNaN(s)&&(s=n-l-c-h),r.left||r.right){case"center":a=i/2-u/2-t[3];break;case"right":a=i-u-d;break}switch(r.top||r.bottom){case"middle":case"center":s=n/2-c/2-t[0];break;case"bottom":s=n-c-h;break}a=a||0,s=s||0,isNaN(u)&&(u=i-d-a-(o||0)),isNaN(c)&&(c=n-h-s-(l||0));var p=new We(a+t[3],s+t[0],u,c);return p.margin=t,p}function z1(r,e,t,i,n,a){var s=!n||!n.hv||n.hv[0],o=!n||!n.hv||n.hv[1],l=n&&n.boundingMode||"all";if(a=a||r,a.x=r.x,a.y=r.y,!s&&!o)return!1;var u;if(l==="raw")u=r.type==="group"?new We(0,0,+e.width||0,+e.height||0):r.getBoundingRect();else if(u=r.getBoundingRect(),r.needLocalTransform()){var c=r.getLocalTransform();u=u.clone(),u.applyTransform(c)}var h=br(Ce({width:u.width,height:u.height},e),t,i),d=s?h.x-u.x:0,f=o?h.y-u.y:0;return l==="raw"?(a.x=d,a.y=f):(a.x+=d,a.y+=f),a===r&&r.markRedraw(),!0}function Afe(r,e){return r[Au[e][0]]!=null||r[Au[e][1]]!=null&&r[Au[e][2]]!=null}function Ov(r){var e=r.layoutMode||r.constructor.layoutMode;return Ae(e)?e:e?{type:e}:null}function ll(r,e,t){var i=t&&t.ignoreSize;!ie(i)&&(i=[i,i]);var n=s(Au[0],0),a=s(Au[1],1);u(Au[0],r,n),u(Au[1],r,a);function s(c,h){var d={},f=0,p={},v=0,g=2;if(Gy(c,function(_){p[_]=r[_]}),Gy(c,function(_){o(e,_)&&(d[_]=p[_]=e[_]),l(d,_)&&f++,l(p,_)&&v++}),i[h])return l(e,c[1])?p[c[2]]=null:l(e,c[2])&&(p[c[1]]=null),p;if(v===g||!f)return p;if(f>=g)return d;for(var m=0;m<c.length;m++){var y=c[m];if(!o(d,y)&&o(r,y)){d[y]=r[y];break}}return d}function o(c,h){return c.hasOwnProperty(h)}function l(c,h){return c[h]!=null&&c[h]!=="auto"}function u(c,h,d){Gy(c,function(f){h[f]=d[f]})}}function Xf(r){return r$({},r)}function r$(r,e){return e&&r&&Gy(t$,function(t){e.hasOwnProperty(t)&&(r[t]=e[t])}),r}var Dfe=lt(),Qe=function(r){j(e,r);function e(t,i,n){var a=r.call(this,t,i,n)||this;return a.uid=jf("ec_cpt_model"),a}return e.prototype.init=function(t,i,n){this.mergeDefaultAndTheme(t,n)},e.prototype.mergeDefaultAndTheme=function(t,i){var n=Ov(this),a=n?Xf(t):{},s=i.getTheme();He(t,s.get(this.mainType)),He(t,this.getDefaultOption()),n&&ll(t,a,n)},e.prototype.mergeOption=function(t,i){He(this.option,t,!0);var n=Ov(this);n&&ll(this.option,t,n)},e.prototype.optionUpdated=function(t,i){},e.prototype.getDefaultOption=function(){var t=this.constructor;if(!bce(t))return t.defaultOption;var i=Dfe(this);if(!i.defaultOption){for(var n=[],a=t;a;){var s=a.prototype.defaultOption;s&&n.push(s),a=a.superClass}for(var o={},l=n.length-1;l>=0;l--)o=He(o,n[l],!0);i.defaultOption=o}return i.defaultOption},e.prototype.getReferringComponents=function(t,i){var n=t+"Index",a=t+"Id";return yg(this.ecModel,t,{index:this.get(n,!0),id:this.get(a,!0)},i)},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.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(t){this.option.zlevel=t},e.protoInitialize=function(){var t=e.prototype;t.type="component",t.id="",t.name="",t.mainType="",t.subType="",t.componentIndex=0}(),e}(ft);aH(Qe,ft);D1(Qe);hfe(Qe);ffe(Qe,Efe);function Efe(r){var e=[];return R(Qe.getClassesByMainType(r),function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])}),e=ae(e,function(t){return es(t).main}),r!=="dataset"&&Xe(e,"dataset")<=0&&e.unshift("dataset"),e}var i$="";typeof navigator<"u"&&(i$=navigator.platform||"");var Yc="rgba(0, 0, 0, 0.2)";const Ife={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:Yc,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Yc,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Yc,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Yc,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Yc,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Yc,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:i$.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 n$=be(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),ia="original",vi="arrayRows",na="objectRows",ys="keyedColumns",Qo="typedArray",a$="unknown",ls="column",Yf="row",Xr={Must:1,Might:2,Not:3},s$=lt();function Pfe(r){s$(r).datasetMap=be()}function o$(r,e,t){var i={},n=QD(e);if(!n||!r)return i;var a=[],s=[],o=e.ecModel,l=s$(o).datasetMap,u=n.uid+"_"+t.seriesLayoutBy,c,h;r=r.slice(),R(r,function(v,g){var m=Ae(v)?v:r[g]={name:v};m.type==="ordinal"&&c==null&&(c=g,h=p(m)),i[m.name]=[]});var d=l.get(u)||l.set(u,{categoryWayDim:h,valueWayDim:0});R(r,function(v,g){var m=v.name,y=p(v);if(c==null){var _=d.valueWayDim;f(i[m],_,y),f(s,_,y),d.valueWayDim+=y}else if(c===g)f(i[m],0,y),f(a,0,y);else{var _=d.categoryWayDim;f(i[m],_,y),f(s,_,y),d.categoryWayDim+=y}});function f(v,g,m){for(var y=0;y<m;y++)v.push(g+y)}function p(v){var g=v.dimsDef;return g?g.length:1}return a.length&&(i.itemName=a),s.length&&(i.seriesName=s),i}function ZD(r,e,t){var i={},n=QD(r);if(!n)return i;var a=e.sourceFormat,s=e.dimensionsDefine,o;(a===na||a===ys)&&R(s,function(c,h){(Ae(c)?c.name:c)==="name"&&(o=h)});var l=function(){for(var c={},h={},d=[],f=0,p=Math.min(5,t);f<p;f++){var v=u$(e.data,a,e.seriesLayoutBy,s,e.startIndex,f);d.push(v);var g=v===Xr.Not;if(g&&c.v==null&&f!==o&&(c.v=f),(c.n==null||c.n===c.v||!g&&d[c.n]===Xr.Not)&&(c.n=f),m(c)&&d[c.n]!==Xr.Not)return c;g||(v===Xr.Might&&h.v==null&&f!==o&&(h.v=f),(h.n==null||h.n===h.v)&&(h.n=f))}function m(y){return y.v!=null&&y.n!=null}return m(c)?c:m(h)?h:null}();if(l){i.value=[l.v];var u=o??l.n;i.itemName=[u],i.seriesName=[u]}return i}function QD(r){var e=r.get("data",!0);if(!e)return yg(r.ecModel,"dataset",{index:r.get("datasetIndex",!0),id:r.get("datasetId",!0)},_r).models[0]}function Mfe(r){return!r.get("transform",!0)&&!r.get("fromTransformResult",!0)?[]:yg(r.ecModel,"dataset",{index:r.get("fromDatasetIndex",!0),id:r.get("fromDatasetId",!0)},_r).models}function l$(r,e){return u$(r.data,r.sourceFormat,r.seriesLayoutBy,r.dimensionsDefine,r.startIndex,e)}function u$(r,e,t,i,n,a){var s,o=5;if(Ri(r))return Xr.Not;var l,u;if(i){var c=i[a];Ae(c)?(l=c.name,u=c.type):de(c)&&(l=c)}if(u!=null)return u==="ordinal"?Xr.Must:Xr.Not;if(e===vi){var h=r;if(t===Yf){for(var d=h[a],f=0;f<(d||[]).length&&f<o;f++)if((s=b(d[n+f]))!=null)return s}else for(var f=0;f<h.length&&f<o;f++){var p=h[n+f];if(p&&(s=b(p[a]))!=null)return s}}else if(e===na){var v=r;if(!l)return Xr.Not;for(var f=0;f<v.length&&f<o;f++){var g=v[f];if(g&&(s=b(g[l]))!=null)return s}}else if(e===ys){var m=r;if(!l)return Xr.Not;var d=m[l];if(!d||Ri(d))return Xr.Not;for(var f=0;f<d.length&&f<o;f++)if((s=b(d[f]))!=null)return s}else if(e===ia)for(var y=r,f=0;f<y.length&&f<o;f++){var g=y[f],_=Ff(g);if(!ie(_))return Xr.Not;if((s=b(_[a]))!=null)return s}function b(T){var x=de(T);if(T!=null&&Number.isFinite(Number(T))&&T!=="")return x?Xr.Might:Xr.Not;if(x&&T!=="-")return Xr.Must}return Xr.Not}var C2=be();function Lfe(r,e){fi(C2.get(r)==null&&e),C2.set(r,e)}function kfe(r,e,t){var i=C2.get(e);if(!i)return t;var n=i(r);return n?t.concat(n):t}var fR=lt(),Rfe=lt(),JD=function(){function r(){}return r.prototype.getColorFromPalette=function(e,t,i){var n=wt(this.get("color",!0)),a=this.get("colorLayer",!0);return c$(this,fR,n,a,e,t,i)},r.prototype.clearColorPalette=function(){Nfe(this,fR)},r}();function A2(r,e,t,i){var n=wt(r.get(["aria","decal","decals"]));return c$(r,Rfe,n,null,e,t,i)}function Ofe(r,e){for(var t=r.length,i=0;i<t;i++)if(r[i].length>e)return r[i];return r[t-1]}function c$(r,e,t,i,n,a,s){a=a||r;var o=e(a),l=o.paletteIdx||0,u=o.paletteNameMap=o.paletteNameMap||{};if(u.hasOwnProperty(n))return u[n];var c=s==null||!i?t:Ofe(i,s);if(c=c||t,!(!c||!c.length)){var h=c[l];return n&&(u[n]=h),o.paletteIdx=(l+1)%c.length,h}}function Nfe(r,e){e(r).paletteIdx=0,e(r).paletteNameMap={}}var Bm,Od,dR,pR="\0_ec_inner",Bfe=1,eE=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(t,i,n,a,s,o){a=a||{},this.option=null,this._theme=new ft(a),this._locale=new ft(s),this._optionManager=o},e.prototype.setOption=function(t,i,n){var a=mR(i);this._optionManager.setOption(t,n,a),this._resetOption(null,a)},e.prototype.resetOption=function(t,i){return this._resetOption(t,mR(i))},e.prototype._resetOption=function(t,i){var n=!1,a=this._optionManager;if(!t||t==="recreate"){var s=a.mountOption(t==="recreate");!this.option||t==="recreate"?dR(this,s):(this.restoreData(),this._mergeOption(s,i)),n=!0}if((t==="timeline"||t==="media")&&this.restoreData(),!t||t==="recreate"||t==="timeline"){var o=a.getTimelineOption(this);o&&(n=!0,this._mergeOption(o,i))}if(!t||t==="recreate"||t==="media"){var l=a.getMediaOption(this);l.length&&R(l,function(u){n=!0,this._mergeOption(u,i)},this)}return n},e.prototype.mergeOption=function(t){this._mergeOption(t,null)},e.prototype._mergeOption=function(t,i){var n=this.option,a=this._componentsMap,s=this._componentsCount,o=[],l=be(),u=i&&i.replaceMergeMainTypeMap;Pfe(this),R(t,function(h,d){h!=null&&(Qe.hasClass(d)?d&&(o.push(d),l.set(d,!0)):n[d]=n[d]==null?Ee(h):He(n[d],h,!0))}),u&&u.each(function(h,d){Qe.hasClass(d)&&!l.get(d)&&(o.push(d),l.set(d,!0))}),Qe.topologicalTravel(o,Qe.getAllClassMainTypes(),c,this);function c(h){var d=kfe(this,h,wt(t[h])),f=a.get(h),p=f?u&&u.get(h)?"replaceMerge":"normalMerge":"replaceAll",v=eH(f,d,p);hce(v,h,Qe),n[h]=null,a.set(h,null),s.set(h,0);var g=[],m=[],y=0,_;R(v,function(b,T){var x=b.existing,C=b.newOption;if(!C)x&&(x.mergeOption({},this),x.optionUpdated({},!1));else{var D=h==="series",I=Qe.getClass(h,b.keyInfo.subType,!D);if(!I)return;if(h==="tooltip"){if(_)return;_=!0}if(x&&x.constructor===I)x.name=b.keyInfo.name,x.mergeOption(C,this),x.optionUpdated(C,!1);else{var M=Q({componentIndex:T},b.keyInfo);x=new I(C,this,this,M),Q(x,M),b.brandNew&&(x.__requireNewView=!0),x.init(C,this,this),x.optionUpdated(null,!0)}}x?(g.push(x.option),m.push(x),y++):(g.push(void 0),m.push(void 0))},this),n[h]=g,a.set(h,m),s.set(h,y),h==="series"&&Bm(this)}this._seriesIndices||Bm(this)},e.prototype.getOption=function(){var t=Ee(this.option);return R(t,function(i,n){if(Qe.hasClass(n)){for(var a=wt(i),s=a.length,o=!1,l=s-1;l>=0;l--)a[l]&&!Pv(a[l])?o=!0:(a[l]=null,!o&&s--);a.length=s,t[n]=a}}),delete t[pR],t},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(t){this._payload=t},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(t,i){var n=this._componentsMap.get(t);if(n){var a=n[i||0];if(a)return a;if(i==null){for(var s=0;s<n.length;s++)if(n[s])return n[s]}}},e.prototype.queryComponents=function(t){var i=t.mainType;if(!i)return[];var n=t.index,a=t.id,s=t.name,o=this._componentsMap.get(i);if(!o||!o.length)return[];var l;return n!=null?(l=[],R(wt(n),function(u){o[u]&&l.push(o[u])})):a!=null?l=vR("id",a,o):s!=null?l=vR("name",s,o):l=_t(o,function(u){return!!u}),gR(l,t)},e.prototype.findComponents=function(t){var i=t.query,n=t.mainType,a=o(i),s=a?this.queryComponents(a):_t(this._componentsMap.get(n),function(u){return!!u});return l(gR(s,t));function o(u){var c=n+"Index",h=n+"Id",d=n+"Name";return u&&(u[c]!=null||u[h]!=null||u[d]!=null)?{mainType:n,index:u[c],id:u[h],name:u[d]}:null}function l(u){return t.filter?_t(u,t.filter):u}},e.prototype.eachComponent=function(t,i,n){var a=this._componentsMap;if(xe(t)){var s=i,o=t;a.each(function(h,d){for(var f=0;h&&f<h.length;f++){var p=h[f];p&&o.call(s,d,p,p.componentIndex)}})}else for(var l=de(t)?a.get(t):Ae(t)?this.findComponents(t):null,u=0;l&&u<l.length;u++){var c=l[u];c&&i.call(n,c,c.componentIndex)}},e.prototype.getSeriesByName=function(t){var i=Cr(t,null);return _t(this._componentsMap.get("series"),function(n){return!!n&&i!=null&&n.name===i})},e.prototype.getSeriesByIndex=function(t){return this._componentsMap.get("series")[t]},e.prototype.getSeriesByType=function(t){return _t(this._componentsMap.get("series"),function(i){return!!i&&i.subType===t})},e.prototype.getSeries=function(){return _t(this._componentsMap.get("series"),function(t){return!!t})},e.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},e.prototype.eachSeries=function(t,i){Od(this),R(this._seriesIndices,function(n){var a=this._componentsMap.get("series")[n];t.call(i,a,n)},this)},e.prototype.eachRawSeries=function(t,i){R(this._componentsMap.get("series"),function(n){n&&t.call(i,n,n.componentIndex)})},e.prototype.eachSeriesByType=function(t,i,n){Od(this),R(this._seriesIndices,function(a){var s=this._componentsMap.get("series")[a];s.subType===t&&i.call(n,s,a)},this)},e.prototype.eachRawSeriesByType=function(t,i,n){return R(this.getSeriesByType(t),i,n)},e.prototype.isSeriesFiltered=function(t){return Od(this),this._seriesIndicesMap.get(t.componentIndex)==null},e.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},e.prototype.filterSeries=function(t,i){Od(this);var n=[];R(this._seriesIndices,function(a){var s=this._componentsMap.get("series")[a];t.call(i,s,a)&&n.push(a)},this),this._seriesIndices=n,this._seriesIndicesMap=be(n)},e.prototype.restoreData=function(t){Bm(this);var i=this._componentsMap,n=[];i.each(function(a,s){Qe.hasClass(s)&&n.push(s)}),Qe.topologicalTravel(n,Qe.getAllClassMainTypes(),function(a){R(i.get(a),function(s){s&&(a!=="series"||!Ffe(s,t))&&s.restoreData()})})},e.internalField=function(){Bm=function(t){var i=t._seriesIndices=[];R(t._componentsMap.get("series"),function(n){n&&i.push(n.componentIndex)}),t._seriesIndicesMap=be(i)},Od=function(t){},dR=function(t,i){t.option={},t.option[pR]=Bfe,t._componentsMap=be({series:[]}),t._componentsCount=be();var n=i.aria;Ae(n)&&n.enabled==null&&(n.enabled=!0),Ufe(i,t._theme.option),He(i,Ife,!1),t._mergeOption(i,null)}}(),e}(ft);function Ffe(r,e){if(e){var t=e.seriesIndex,i=e.seriesId,n=e.seriesName;return t!=null&&r.componentIndex!==t||i!=null&&r.id!==i||n!=null&&r.name!==n}}function Ufe(r,e){var t=r.color&&!r.colorLayer;R(e,function(i,n){n==="colorLayer"&&t||Qe.hasClass(n)||(typeof i=="object"?r[n]=r[n]?He(r[n],i,!1):Ee(i):r[n]==null&&(r[n]=i))})}function vR(r,e,t){if(ie(e)){var i=be();return R(e,function(a){if(a!=null){var s=Cr(a,null);s!=null&&i.set(a,!0)}}),_t(t,function(a){return a&&i.get(a[r])})}else{var n=Cr(e,null);return _t(t,function(a){return a&&n!=null&&a[r]===n})}}function gR(r,e){return e.hasOwnProperty("subType")?_t(r,function(t){return t&&t.subType===e.subType}):r}function mR(r){var e=be();return r&&R(wt(r.replaceMerge),function(t){e.set(t,!0)}),{replaceMergeMainTypeMap:e}}ir(eE,JD);var Vfe=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],h$=function(){function r(e){R(Vfe,function(t){this[t]=ge(e[t],e)},this)}return r}(),rT={},Kf=function(){function r(){this._coordinateSystems=[]}return r.prototype.create=function(e,t){var i=[];R(rT,function(n,a){var s=n.create(e,t);i=i.concat(s||[])}),this._coordinateSystems=i},r.prototype.update=function(e,t){R(this._coordinateSystems,function(i){i.update&&i.update(e,t)})},r.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},r.register=function(e,t){rT[e]=t},r.get=function(e){return rT[e]},r}(),zfe=/^(min|max)?(.+)$/,Gfe=function(){function r(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return r.prototype.setOption=function(e,t,i){e&&(R(wt(e.series),function(s){s&&s.data&&Ri(s.data)&&Tv(s.data)}),R(wt(e.dataset),function(s){s&&s.source&&Ri(s.source)&&Tv(s.source)})),e=Ee(e);var n=this._optionBackup,a=Hfe(e,t,!n);this._newBaseOption=a.baseOption,n?(a.timelineOptions.length&&(n.timelineOptions=a.timelineOptions),a.mediaList.length&&(n.mediaList=a.mediaList),a.mediaDefault&&(n.mediaDefault=a.mediaDefault)):this._optionBackup=a},r.prototype.mountOption=function(e){var t=this._optionBackup;return this._timelineOptions=t.timelineOptions,this._mediaList=t.mediaList,this._mediaDefault=t.mediaDefault,this._currentMediaIndices=[],Ee(e?t.baseOption:this._newBaseOption)},r.prototype.getTimelineOption=function(e){var t,i=this._timelineOptions;if(i.length){var n=e.getComponent("timeline");n&&(t=Ee(i[n.getCurrentIndex()]))}return t},r.prototype.getMediaOption=function(e){var t=this._api.getWidth(),i=this._api.getHeight(),n=this._mediaList,a=this._mediaDefault,s=[],o=[];if(!n.length&&!a)return o;for(var l=0,u=n.length;l<u;l++)$fe(n[l].query,t,i)&&s.push(l);return!s.length&&a&&(s=[-1]),s.length&&!qfe(s,this._currentMediaIndices)&&(o=ae(s,function(c){return Ee(c===-1?a.option:n[c].option)})),this._currentMediaIndices=s,o},r}();function Hfe(r,e,t){var i=[],n,a,s=r.baseOption,o=r.timeline,l=r.options,u=r.media,c=!!r.media,h=!!(l||o||s&&s.timeline);s?(a=s,a.timeline||(a.timeline=o)):((h||c)&&(r.options=r.media=null),a=r),c&&ie(u)&&R(u,function(f){f&&f.option&&(f.query?i.push(f):n||(n=f))}),d(a),R(l,function(f){return d(f)}),R(i,function(f){return d(f.option)});function d(f){R(e,function(p){p(f,t)})}return{baseOption:a,timelineOptions:l||[],mediaDefault:n,mediaList:i}}function $fe(r,e,t){var i={width:e,height:t,aspectratio:e/t},n=!0;return R(r,function(a,s){var o=s.match(zfe);if(!(!o||!o[1]||!o[2])){var l=o[1],u=o[2].toLowerCase();Wfe(i[u],a,l)||(n=!1)}}),n}function Wfe(r,e,t){return t==="min"?r>=e:t==="max"?r<=e:r===e}function qfe(r,e){return r.join(",")===e.join(",")}var la=R,Nv=Ae,yR=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function iT(r){var e=r&&r.itemStyle;if(e)for(var t=0,i=yR.length;t<i;t++){var n=yR[t],a=e.normal,s=e.emphasis;a&&a[n]&&(r[n]=r[n]||{},r[n].normal?He(r[n].normal,a[n]):r[n].normal=a[n],a[n]=null),s&&s[n]&&(r[n]=r[n]||{},r[n].emphasis?He(r[n].emphasis,s[n]):r[n].emphasis=s[n],s[n]=null)}}function ai(r,e,t){if(r&&r[e]&&(r[e].normal||r[e].emphasis)){var i=r[e].normal,n=r[e].emphasis;i&&(t?(r[e].normal=r[e].emphasis=null,Ce(r[e],i)):r[e]=i),n&&(r.emphasis=r.emphasis||{},r.emphasis[e]=n,n.focus&&(r.emphasis.focus=n.focus),n.blurScope&&(r.emphasis.blurScope=n.blurScope))}}function Sp(r){ai(r,"itemStyle"),ai(r,"lineStyle"),ai(r,"areaStyle"),ai(r,"label"),ai(r,"labelLine"),ai(r,"upperLabel"),ai(r,"edgeLabel")}function gr(r,e){var t=Nv(r)&&r[e],i=Nv(t)&&t.textStyle;if(i)for(var n=0,a=wk.length;n<a;n++){var s=wk[n];i.hasOwnProperty(s)&&(t[s]=i[s])}}function Fn(r){r&&(Sp(r),gr(r,"label"),r.emphasis&&gr(r.emphasis,"label"))}function jfe(r){if(Nv(r)){iT(r),Sp(r),gr(r,"label"),gr(r,"upperLabel"),gr(r,"edgeLabel"),r.emphasis&&(gr(r.emphasis,"label"),gr(r.emphasis,"upperLabel"),gr(r.emphasis,"edgeLabel"));var e=r.markPoint;e&&(iT(e),Fn(e));var t=r.markLine;t&&(iT(t),Fn(t));var i=r.markArea;i&&Fn(i);var n=r.data;if(r.type==="graph"){n=n||r.nodes;var a=r.links||r.edges;if(a&&!Ri(a))for(var s=0;s<a.length;s++)Fn(a[s]);R(r.categories,function(u){Sp(u)})}if(n&&!Ri(n))for(var s=0;s<n.length;s++)Fn(n[s]);if(e=r.markPoint,e&&e.data)for(var o=e.data,s=0;s<o.length;s++)Fn(o[s]);if(t=r.markLine,t&&t.data)for(var l=t.data,s=0;s<l.length;s++)ie(l[s])?(Fn(l[s][0]),Fn(l[s][1])):Fn(l[s]);r.type==="gauge"?(gr(r,"axisLabel"),gr(r,"title"),gr(r,"detail")):r.type==="treemap"?(ai(r.breadcrumb,"itemStyle"),R(r.levels,function(u){Sp(u)})):r.type==="tree"&&Sp(r.leaves)}}function Cs(r){return ie(r)?r:r?[r]:[]}function _R(r){return(ie(r)?r[0]:r)||{}}function Xfe(r,e){la(Cs(r.series),function(i){Nv(i)&&jfe(i)});var t=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&t.push("valueAxis","categoryAxis","logAxis","timeAxis"),la(t,function(i){la(Cs(r[i]),function(n){n&&(gr(n,"axisLabel"),gr(n.axisPointer,"label"))})}),la(Cs(r.parallel),function(i){var n=i&&i.parallelAxisDefault;gr(n,"axisLabel"),gr(n&&n.axisPointer,"label")}),la(Cs(r.calendar),function(i){ai(i,"itemStyle"),gr(i,"dayLabel"),gr(i,"monthLabel"),gr(i,"yearLabel")}),la(Cs(r.radar),function(i){gr(i,"name"),i.name&&i.axisName==null&&(i.axisName=i.name,delete i.name),i.nameGap!=null&&i.axisNameGap==null&&(i.axisNameGap=i.nameGap,delete i.nameGap)}),la(Cs(r.geo),function(i){Nv(i)&&(Fn(i),la(Cs(i.regions),function(n){Fn(n)}))}),la(Cs(r.timeline),function(i){Fn(i),ai(i,"label"),ai(i,"itemStyle"),ai(i,"controlStyle",!0);var n=i.data;ie(n)&&R(n,function(a){Ae(a)&&(ai(a,"label"),ai(a,"itemStyle"))})}),la(Cs(r.toolbox),function(i){ai(i,"iconStyle"),la(i.feature,function(n){ai(n,"iconStyle")})}),gr(_R(r.axisPointer),"label"),gr(_R(r.tooltip).axisPointer,"label")}function Yfe(r,e){for(var t=e.split(","),i=r,n=0;n<t.length&&(i=i&&i[t[n]],i!=null);n++);return i}function Kfe(r,e,t,i){for(var n=e.split(","),a=r,s,o=0;o<n.length-1;o++)s=n[o],a[s]==null&&(a[s]={}),a=a[s];a[n[o]]==null&&(a[n[o]]=t)}function bR(r){r&&R(Zfe,function(e){e[0]in r&&!(e[1]in r)&&(r[e[1]]=r[e[0]])})}var Zfe=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],Qfe=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],nT=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function Nd(r){var e=r&&r.itemStyle;if(e)for(var t=0;t<nT.length;t++){var i=nT[t][1],n=nT[t][0];e[i]!=null&&(e[n]=e[i])}}function SR(r){r&&r.alignTo==="edge"&&r.margin!=null&&r.edgeDistance==null&&(r.edgeDistance=r.margin)}function TR(r){r&&r.downplay&&!r.blur&&(r.blur=r.downplay)}function Jfe(r){r&&r.focusNodeAdjacency!=null&&(r.emphasis=r.emphasis||{},r.emphasis.focus==null&&(r.emphasis.focus="adjacency"))}function f$(r,e){if(r)for(var t=0;t<r.length;t++)e(r[t]),r[t]&&f$(r[t].children,e)}function d$(r,e){Xfe(r,e),r.series=wt(r.series),R(r.series,function(t){if(Ae(t)){var i=t.type;if(i==="line")t.clipOverflow!=null&&(t.clip=t.clipOverflow);else if(i==="pie"||i==="gauge"){t.clockWise!=null&&(t.clockwise=t.clockWise),SR(t.label);var n=t.data;if(n&&!Ri(n))for(var a=0;a<n.length;a++)SR(n[a]);t.hoverOffset!=null&&(t.emphasis=t.emphasis||{},(t.emphasis.scaleSize=null)&&(t.emphasis.scaleSize=t.hoverOffset))}else if(i==="gauge"){var s=Yfe(t,"pointer.color");s!=null&&Kfe(t,"itemStyle.color",s)}else if(i==="bar"){Nd(t),Nd(t.backgroundStyle),Nd(t.emphasis);var n=t.data;if(n&&!Ri(n))for(var a=0;a<n.length;a++)typeof n[a]=="object"&&(Nd(n[a]),Nd(n[a]&&n[a].emphasis))}else if(i==="sunburst"){var o=t.highlightPolicy;o&&(t.emphasis=t.emphasis||{},t.emphasis.focus||(t.emphasis.focus=o)),TR(t),f$(t.data,TR)}else i==="graph"||i==="sankey"?Jfe(t):i==="map"&&(t.mapType&&!t.map&&(t.map=t.mapType),t.mapLocation&&Ce(t,t.mapLocation));t.hoverAnimation!=null&&(t.emphasis=t.emphasis||{},t.emphasis&&t.emphasis.scale==null&&(t.emphasis.scale=t.hoverAnimation)),bR(t)}}),r.dataRange&&(r.visualMap=r.dataRange),R(Qfe,function(t){var i=r[t];i&&(ie(i)||(i=[i]),R(i,function(n){bR(n)}))})}function ede(r){var e=be();r.eachSeries(function(t){var i=t.get("stack");if(i){var n=e.get(i)||e.set(i,[]),a=t.getData(),s={stackResultDimension:a.getCalculationInfo("stackResultDimension"),stackedOverDimension:a.getCalculationInfo("stackedOverDimension"),stackedDimension:a.getCalculationInfo("stackedDimension"),stackedByDimension:a.getCalculationInfo("stackedByDimension"),isStackedByIndex:a.getCalculationInfo("isStackedByIndex"),data:a,seriesModel:t};if(!s.stackedDimension||!(s.isStackedByIndex||s.stackedByDimension))return;n.length&&a.setCalculationInfo("stackedOnSeries",n[n.length-1].seriesModel),n.push(s)}}),e.each(tde)}function tde(r){R(r,function(e,t){var i=[],n=[NaN,NaN],a=[e.stackResultDimension,e.stackedOverDimension],s=e.data,o=e.isStackedByIndex,l=e.seriesModel.get("stackStrategy")||"samesign";s.modify(a,function(u,c,h){var d=s.get(e.stackedDimension,h);if(isNaN(d))return n;var f,p;o?p=s.getRawIndex(h):f=s.get(e.stackedByDimension,h);for(var v=NaN,g=t-1;g>=0;g--){var m=r[g];if(o||(p=m.data.rawIndexOf(m.stackedByDimension,f)),p>=0){var y=m.data.getByRawIndex(m.stackResultDimension,p);if(l==="all"||l==="positive"&&y>0||l==="negative"&&y<0||l==="samesign"&&d>=0&&y>0||l==="samesign"&&d<=0&&y<0){d=tce(d,y),v=y;break}}}return i[0]=d,i[1]=v,i})})}var G1=function(){function r(e){this.data=e.data||(e.sourceFormat===ys?{}:[]),this.sourceFormat=e.sourceFormat||a$,this.seriesLayoutBy=e.seriesLayoutBy||ls,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var i=0;i<t.length;i++){var n=t[i];n.type==null&&l$(this,i)===Xr.Must&&(n.type="ordinal")}}return r}();function tE(r){return r instanceof G1}function D2(r,e,t){t=t||p$(r);var i=e.seriesLayoutBy,n=ide(r,t,i,e.sourceHeader,e.dimensions),a=new G1({data:r,sourceFormat:t,seriesLayoutBy:i,dimensionsDefine:n.dimensionsDefine,startIndex:n.startIndex,dimensionsDetectedCount:n.dimensionsDetectedCount,metaRawOption:Ee(e)});return a}function rE(r){return new G1({data:r,sourceFormat:Ri(r)?Qo:ia})}function rde(r){return new G1({data:r.data,sourceFormat:r.sourceFormat,seriesLayoutBy:r.seriesLayoutBy,dimensionsDefine:Ee(r.dimensionsDefine),startIndex:r.startIndex,dimensionsDetectedCount:r.dimensionsDetectedCount})}function p$(r){var e=a$;if(Ri(r))e=Qo;else if(ie(r)){r.length===0&&(e=vi);for(var t=0,i=r.length;t<i;t++){var n=r[t];if(n!=null){if(ie(n)||Ri(n)){e=vi;break}else if(Ae(n)){e=na;break}}}}else if(Ae(r)){for(var a in r)if(ye(r,a)&&Jr(r[a])){e=ys;break}}return e}function ide(r,e,t,i,n){var a,s;if(!r)return{dimensionsDefine:xR(n),startIndex:s,dimensionsDetectedCount:a};if(e===vi){var o=r;i==="auto"||i==null?wR(function(u){u!=null&&u!=="-"&&(de(u)?s==null&&(s=1):s=0)},t,o,10):s=ut(i)?i:i?1:0,!n&&s===1&&(n=[],wR(function(u,c){n[c]=u!=null?u+"":""},t,o,1/0)),a=n?n.length:t===Yf?o.length:o[0]?o[0].length:null}else if(e===na)n||(n=nde(r));else if(e===ys)n||(n=[],R(r,function(u,c){n.push(c)}));else if(e===ia){var l=Ff(r[0]);a=ie(l)&&l.length||1}return{startIndex:s,dimensionsDefine:xR(n),dimensionsDetectedCount:a}}function nde(r){for(var e=0,t;e<r.length&&!(t=r[e++]););if(t)return rt(t)}function xR(r){if(r){var e=be();return ae(r,function(t,i){t=Ae(t)?t:{name:t};var n={name:t.name,displayName:t.displayName,type:t.type};if(n.name==null)return n;n.name+="",n.displayName==null&&(n.displayName=n.name);var a=e.get(n.name);return a?n.name+="-"+a.count++:e.set(n.name,{count:1}),n})}}function wR(r,e,t,i){if(e===Yf)for(var n=0;n<t.length&&n<i;n++)r(t[n]?t[n][0]:null,n);else for(var a=t[0]||[],n=0;n<a.length&&n<i;n++)r(a[n],n)}function v$(r){var e=r.sourceFormat;return e===na||e===ys}var Kl,Zl,Ql,CR,AR,g$=function(){function r(e,t){var i=tE(e)?e:rE(e);this._source=i;var n=this._data=i.data;i.sourceFormat===Qo&&(this._offset=0,this._dimSize=t,this._data=n),AR(this,n,i)}return r.prototype.getSource=function(){return this._source},r.prototype.count=function(){return 0},r.prototype.getItem=function(e,t){},r.prototype.appendData=function(e){},r.prototype.clean=function(){},r.protoInitialize=function(){var e=r.prototype;e.pure=!1,e.persistent=!0}(),r.internalField=function(){var e;AR=function(s,o,l){var u=l.sourceFormat,c=l.seriesLayoutBy,h=l.startIndex,d=l.dimensionsDefine,f=CR[iE(u,c)];if(Q(s,f),u===Qo)s.getItem=t,s.count=n,s.fillStorage=i;else{var p=m$(u,c);s.getItem=ge(p,null,o,h,d);var v=y$(u,c);s.count=ge(v,null,o,h,d)}};var t=function(s,o){s=s-this._offset,o=o||[];for(var l=this._data,u=this._dimSize,c=u*s,h=0;h<u;h++)o[h]=l[c+h];return o},i=function(s,o,l,u){for(var c=this._data,h=this._dimSize,d=0;d<h;d++){for(var f=u[d],p=f[0]==null?1/0:f[0],v=f[1]==null?-1/0:f[1],g=o-s,m=l[d],y=0;y<g;y++){var _=c[y*h+d];m[s+y]=_,_<p&&(p=_),_>v&&(v=_)}f[0]=p,f[1]=v}},n=function(){return this._data?this._data.length/this._dimSize:0};CR=(e={},e[vi+"_"+ls]={pure:!0,appendData:a},e[vi+"_"+Yf]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[na]={pure:!0,appendData:a},e[ys]={pure:!0,appendData:function(s){var o=this._data;R(s,function(l,u){for(var c=o[u]||(o[u]=[]),h=0;h<(l||[]).length;h++)c.push(l[h])})}},e[ia]={appendData:a},e[Qo]={persistent:!1,pure:!0,appendData:function(s){this._data=s},clean:function(){this._offset+=this.count(),this._data=null}},e);function a(s){for(var o=0;o<s.length;o++)this._data.push(s[o])}}(),r}(),DR=function(r,e,t,i){return r[i]},ade=(Kl={},Kl[vi+"_"+ls]=function(r,e,t,i){return r[i+e]},Kl[vi+"_"+Yf]=function(r,e,t,i,n){i+=e;for(var a=n||[],s=r,o=0;o<s.length;o++){var l=s[o];a[o]=l?l[i]:null}return a},Kl[na]=DR,Kl[ys]=function(r,e,t,i,n){for(var a=n||[],s=0;s<t.length;s++){var o=t[s].name,l=r[o];a[s]=l?l[i]:null}return a},Kl[ia]=DR,Kl);function m$(r,e){var t=ade[iE(r,e)];return t}var ER=function(r,e,t){return r.length},sde=(Zl={},Zl[vi+"_"+ls]=function(r,e,t){return Math.max(0,r.length-e)},Zl[vi+"_"+Yf]=function(r,e,t){var i=r[0];return i?Math.max(0,i.length-e):0},Zl[na]=ER,Zl[ys]=function(r,e,t){var i=t[0].name,n=r[i];return n?n.length:0},Zl[ia]=ER,Zl);function y$(r,e){var t=sde[iE(r,e)];return t}var aT=function(r,e,t){return r[e]},ode=(Ql={},Ql[vi]=aT,Ql[na]=function(r,e,t){return r[t]},Ql[ys]=aT,Ql[ia]=function(r,e,t){var i=Ff(r);return i instanceof Array?i[e]:i},Ql[Qo]=aT,Ql);function _$(r){var e=ode[r];return e}function iE(r,e){return r===vi?r+"_"+e:r}function bf(r,e,t){if(r){var i=r.getRawDataItem(e);if(i!=null){var n=r.getStore(),a=n.getSource().sourceFormat;if(t!=null){var s=r.getDimensionIndex(t),o=n.getDimensionProperty(s);return _$(a)(i,s,o)}else{var l=i;return a===ia&&(l=Ff(i)),l}}}}var lde=/\{@(.+?)\}/g,H1=function(){function r(){}return r.prototype.getDataParams=function(e,t){var i=this.getData(t),n=this.getRawValue(e,t),a=i.getRawIndex(e),s=i.getName(e),o=i.getRawDataItem(e),l=i.getItemVisual(e,"style"),u=l&&l[i.getItemVisual(e,"drawType")||"fill"],c=l&&l.stroke,h=this.mainType,d=h==="series",f=i.userOutput&&i.userOutput.get();return{componentType:h,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:d?this.subType:null,seriesIndex:this.seriesIndex,seriesId:d?this.id:null,seriesName:d?this.name:null,name:s,dataIndex:a,data:o,dataType:t,value:n,color:u,borderColor:c,dimensionNames:f?f.fullDimensions:null,encode:f?f.encode:null,$vars:["seriesName","name","value"]}},r.prototype.getFormattedLabel=function(e,t,i,n,a,s){t=t||"normal";var o=this.getData(i),l=this.getDataParams(e,i);if(s&&(l.value=s.interpolatedValue),n!=null&&ie(l.value)&&(l.value=l.value[n]),!a){var u=o.getItemModel(e);a=u.get(t==="normal"?["label","formatter"]:[t,"label","formatter"])}if(xe(a))return l.status=t,l.dimensionIndex=n,a(l);if(de(a)){var c=YD(a,l);return c.replace(lde,function(h,d){var f=d.length,p=d;p.charAt(0)==="["&&p.charAt(f-1)==="]"&&(p=+p.slice(1,f-1));var v=bf(o,e,p);if(s&&ie(s.interpolatedValue)){var g=o.getDimensionIndex(p);g>=0&&(v=s.interpolatedValue[g])}return v!=null?v+"":""})}},r.prototype.getRawValue=function(e,t){return bf(this.getData(t),e)},r.prototype.formatTooltip=function(e,t,i){},r}();function IR(r){var e,t;return Ae(r)?r.type&&(t=r):e=r,{text:e,frag:t}}function Jp(r){return new ude(r)}var ude=function(){function r(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return r.prototype.perform=function(e){var t=this._upstream,i=e&&e.skip;if(this._dirty&&t){var n=this.context;n.data=n.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!i&&(a=this._plan(this.context));var s=c(this._modBy),o=this._modDataCount||0,l=c(e&&e.modBy),u=e&&e.modDataCount||0;(s!==l||o!==u)&&(a="reset");function c(y){return!(y>=1)&&(y=1),y}var h;(this._dirty||a==="reset")&&(this._dirty=!1,h=this._doReset(i)),this._modBy=l,this._modDataCount=u;var d=e&&e.step;if(t?this._dueEnd=t._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var f=this._dueIndex,p=Math.min(d!=null?this._dueIndex+d:1/0,this._dueEnd);if(!i&&(h||f<p)){var v=this._progress;if(ie(v))for(var g=0;g<v.length;g++)this._doProgress(v[g],f,p,l,u);else this._doProgress(v,f,p,l,u)}this._dueIndex=p;var m=this._settedOutputEnd!=null?this._settedOutputEnd:p;this._outputDueEnd=m}else this._dueIndex=this._outputDueEnd=this._settedOutputEnd!=null?this._settedOutputEnd:this._dueEnd;return this.unfinished()},r.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},r.prototype._doProgress=function(e,t,i,n,a){PR.reset(t,i,n,a),this._callingProgress=e,this._callingProgress({start:t,end:i,count:i-t,next:PR.next},this.context)},r.prototype._doReset=function(e){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null;var t,i;!e&&this._reset&&(t=this._reset(this.context),t&&t.progress&&(i=t.forceFirstProgress,t=t.progress),ie(t)&&!t.length&&(t=null)),this._progress=t,this._modBy=this._modDataCount=null;var n=this._downstream;return n&&n.dirty(),i},r.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},r.prototype.pipe=function(e){(this._downstream!==e||this._dirty)&&(this._downstream=e,e._upstream=this,e.dirty())},r.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},r.prototype.getUpstream=function(){return this._upstream},r.prototype.getDownstream=function(){return this._downstream},r.prototype.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e},r}(),PR=function(){var r,e,t,i,n,a={reset:function(l,u,c,h){e=l,r=u,t=c,i=h,n=Math.ceil(i/t),a.next=t>1&&i>0?o:s}};return a;function s(){return e<r?e++:null}function o(){var l=e%n*t+Math.ceil(e/n),u=e>=r?null:l<i?l:e;return e++,u}}();function Jo(r,e){var t=e&&e.type;return t==="ordinal"?r:(t==="time"&&!ut(r)&&r!=null&&r!=="-"&&(r=+Cn(r)),r==null||r===""?NaN:Number(r))}var cde=be({number:function(r){return parseFloat(r)},time:function(r){return+Cn(r)},trim:function(r){return de(r)?qn(r):r}});function b$(r){return cde.get(r)}var S$={lt:function(r,e){return r<e},lte:function(r,e){return r<=e},gt:function(r,e){return r>e},gte:function(r,e){return r>=e}},hde=function(){function r(e,t){if(!ut(t)){var i="";gt(i)}this._opFn=S$[e],this._rvalFloat=vs(t)}return r.prototype.evaluate=function(e){return ut(e)?this._opFn(e,this._rvalFloat):this._opFn(vs(e),this._rvalFloat)},r}(),T$=function(){function r(e,t){var i=e==="desc";this._resultLT=i?1:-1,t==null&&(t=i?"min":"max"),this._incomparable=t==="min"?-1/0:1/0}return r.prototype.evaluate=function(e,t){var i=ut(e)?e:vs(e),n=ut(t)?t:vs(t),a=isNaN(i),s=isNaN(n);if(a&&(i=this._incomparable),s&&(n=this._incomparable),a&&s){var o=de(e),l=de(t);o&&(i=l?e:0),l&&(n=o?t:0)}return i<n?this._resultLT:i>n?-this._resultLT:0},r}(),fde=function(){function r(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=vs(t)}return r.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var i=typeof e;i!==this._rvalTypeof&&(i==="number"||this._rvalTypeof==="number")&&(t=vs(e)===this._rvalFloat)}return this._isEQ?t:!t},r}();function dde(r,e){return r==="eq"||r==="ne"?new fde(r==="eq",e):ye(S$,r)?new hde(r,e):null}var pde=function(){function r(){}return r.prototype.getRawData=function(){throw new Error("not supported")},r.prototype.getRawDataItem=function(e){throw new Error("not supported")},r.prototype.cloneRawData=function(){},r.prototype.getDimensionInfo=function(e){},r.prototype.cloneAllDimensionInfo=function(){},r.prototype.count=function(){},r.prototype.retrieveValue=function(e,t){},r.prototype.retrieveValueFromItem=function(e,t){},r.prototype.convertValue=function(e,t){return Jo(e,t)},r}();function vde(r,e){var t=new pde,i=r.data,n=t.sourceFormat=r.sourceFormat,a=r.startIndex,s="";r.seriesLayoutBy!==ls&>(s);var o=[],l={},u=r.dimensionsDefine;if(u)R(u,function(v,g){var m=v.name,y={index:g,name:m,displayName:v.displayName};if(o.push(y),m!=null){var _="";ye(l,m)&>(_),l[m]=y}});else for(var c=0;c<r.dimensionsDetectedCount;c++)o.push({index:c});var h=m$(n,ls);e.__isBuiltIn&&(t.getRawDataItem=function(v){return h(i,a,o,v)},t.getRawData=ge(gde,null,r)),t.cloneRawData=ge(mde,null,r);var d=y$(n,ls);t.count=ge(d,null,i,a,o);var f=_$(n);t.retrieveValue=function(v,g){var m=h(i,a,o,v);return p(m,g)};var p=t.retrieveValueFromItem=function(v,g){if(v!=null){var m=o[g];if(m)return f(v,g,m.name)}};return t.getDimensionInfo=ge(yde,null,o,l),t.cloneAllDimensionInfo=ge(_de,null,o),t}function gde(r){var e=r.sourceFormat;if(!nE(e)){var t="";gt(t)}return r.data}function mde(r){var e=r.sourceFormat,t=r.data;if(!nE(e)){var i="";gt(i)}if(e===vi){for(var n=[],a=0,s=t.length;a<s;a++)n.push(t[a].slice());return n}else if(e===na){for(var n=[],a=0,s=t.length;a<s;a++)n.push(Q({},t[a]));return n}}function yde(r,e,t){if(t!=null){if(ut(t)||!isNaN(t)&&!ye(e,t))return r[t];if(ye(e,t))return e[t]}}function _de(r){return Ee(r)}var x$=be();function bde(r){r=Ee(r);var e=r.type,t="";e||gt(t);var i=e.split(":");i.length!==2&>(t);var n=!1;i[0]==="echarts"&&(e=i[1],n=!0),r.__isBuiltIn=n,x$.set(e,r)}function Sde(r,e,t){var i=wt(r),n=i.length,a="";n||gt(a);for(var s=0,o=n;s<o;s++){var l=i[s];e=Tde(l,e),s!==o-1&&(e.length=Math.max(e.length,1))}return e}function Tde(r,e,t,i){var n="";e.length||gt(n),Ae(r)||gt(n);var a=r.type,s=x$.get(a);s||gt(n);var o=ae(e,function(u){return vde(u,s)}),l=wt(s.transform({upstream:o[0],upstreamList:o,config:Ee(r.config)}));return ae(l,function(u,c){var h="";Ae(u)||gt(h),u.data||gt(h);var d=p$(u.data);nE(d)||gt(h);var f,p=e[0];if(p&&c===0&&!u.dimensions){var v=p.startIndex;v&&(u.data=p.data.slice(0,v).concat(u.data)),f={seriesLayoutBy:ls,sourceHeader:v,dimensions:p.metaRawOption.dimensions}}else f={seriesLayoutBy:ls,sourceHeader:0,dimensions:u.dimensions};return D2(u.data,f,null)})}function nE(r){return r===vi||r===na}var $1="undefined",xde=typeof Uint32Array===$1?Array:Uint32Array,wde=typeof Uint16Array===$1?Array:Uint16Array,w$=typeof Int32Array===$1?Array:Int32Array,MR=typeof Float64Array===$1?Array:Float64Array,C$={float:MR,int:w$,ordinal:Array,number:Array,time:MR},sT;function Bd(r){return r>65535?xde:wde}function Kc(){return[1/0,-1/0]}function Cde(r){var e=r.constructor;return e===Array?r.slice():new e(r)}function LR(r,e,t,i,n){var a=C$[t||"float"];if(n){var s=r[e],o=s&&s.length;if(o!==i){for(var l=new a(i),u=0;u<o;u++)l[u]=s[u];r[e]=l}}else r[e]=new a(i)}var E2=function(){function r(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=be()}return r.prototype.initData=function(e,t,i){this._provider=e,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var n=e.getSource(),a=this.defaultDimValueGetter=sT[n.sourceFormat];this._dimValueGetter=i||a,this._rawExtent=[],v$(n),this._dimensions=ae(t,function(s){return{type:s.type,property:s.property}}),this._initDataFromProvider(0,e.count())},r.prototype.getProvider=function(){return this._provider},r.prototype.getSource=function(){return this._provider.getSource()},r.prototype.ensureCalculationDimension=function(e,t){var i=this._calcDimNameToIdx,n=this._dimensions,a=i.get(e);if(a!=null){if(n[a].type===t)return a}else a=n.length;return n[a]={type:t},i.set(e,a),this._chunks[a]=new C$[t||"float"](this._rawCount),this._rawExtent[a]=Kc(),a},r.prototype.collectOrdinalMeta=function(e,t){var i=this._chunks[e],n=this._dimensions[e],a=this._rawExtent,s=n.ordinalOffset||0,o=i.length;s===0&&(a[e]=Kc());for(var l=a[e],u=s;u<o;u++){var c=i[u]=t.parseAndCollect(i[u]);isNaN(c)||(l[0]=Math.min(c,l[0]),l[1]=Math.max(c,l[1]))}n.ordinalMeta=t,n.ordinalOffset=o,n.type="ordinal"},r.prototype.getOrdinalMeta=function(e){var t=this._dimensions[e],i=t.ordinalMeta;return i},r.prototype.getDimensionProperty=function(e){var t=this._dimensions[e];return t&&t.property},r.prototype.appendData=function(e){var t=this._provider,i=this.count();t.appendData(e);var n=t.count();return t.persistent||(n+=i),i<n&&this._initDataFromProvider(i,n,!0),[i,n]},r.prototype.appendValues=function(e,t){for(var i=this._chunks,n=this._dimensions,a=n.length,s=this._rawExtent,o=this.count(),l=o+Math.max(e.length,t||0),u=0;u<a;u++){var c=n[u];LR(i,u,c.type,l,!0)}for(var h=[],d=o;d<l;d++)for(var f=d-o,p=0;p<a;p++){var c=n[p],v=sT.arrayRows.call(this,e[f]||h,c.property,f,p);i[p][d]=v;var g=s[p];v<g[0]&&(g[0]=v),v>g[1]&&(g[1]=v)}return this._rawCount=this._count=l,{start:o,end:l}},r.prototype._initDataFromProvider=function(e,t,i){for(var n=this._provider,a=this._chunks,s=this._dimensions,o=s.length,l=this._rawExtent,u=ae(s,function(y){return y.property}),c=0;c<o;c++){var h=s[c];l[c]||(l[c]=Kc()),LR(a,c,h.type,t,i)}if(n.fillStorage)n.fillStorage(e,t,a,l);else for(var d=[],f=e;f<t;f++){d=n.getItem(f,d);for(var p=0;p<o;p++){var v=a[p],g=this._dimValueGetter(d,u[p],f,p);v[f]=g;var m=l[p];g<m[0]&&(m[0]=g),g>m[1]&&(m[1]=g)}}!n.persistent&&n.clean&&n.clean(),this._rawCount=this._count=t,this._extent=[]},r.prototype.count=function(){return this._count},r.prototype.get=function(e,t){if(!(t>=0&&t<this._count))return NaN;var i=this._chunks[e];return i?i[this.getRawIndex(t)]:NaN},r.prototype.getValues=function(e,t){var i=[],n=[];if(t==null){t=e,e=[];for(var a=0;a<this._dimensions.length;a++)n.push(a)}else n=e;for(var a=0,s=n.length;a<s;a++)i.push(this.get(n[a],t));return i},r.prototype.getByRawIndex=function(e,t){if(!(t>=0&&t<this._rawCount))return NaN;var i=this._chunks[e];return i?i[t]:NaN},r.prototype.getSum=function(e){var t=this._chunks[e],i=0;if(t)for(var n=0,a=this.count();n<a;n++){var s=this.get(e,n);isNaN(s)||(i+=s)}return i},r.prototype.getMedian=function(e){var t=[];this.each([e],function(a){isNaN(a)||t.push(a)});var i=t.sort(function(a,s){return a-s}),n=this.count();return n===0?0:n%2===1?i[(n-1)/2]:(i[n/2]+i[n/2-1])/2},r.prototype.indexOfRawIndex=function(e){if(e>=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,i=t[e];if(i!=null&&i<this._count&&i===e)return e;for(var n=0,a=this._count-1;n<=a;){var s=(n+a)/2|0;if(t[s]<e)n=s+1;else if(t[s]>e)a=s-1;else return s}return-1},r.prototype.indicesOfNearest=function(e,t,i){var n=this._chunks,a=n[e],s=[];if(!a)return s;i==null&&(i=1/0);for(var o=1/0,l=-1,u=0,c=0,h=this.count();c<h;c++){var d=this.getRawIndex(c),f=t-a[d],p=Math.abs(f);p<=i&&((p<o||p===o&&f>=0&&l<0)&&(o=p,l=f,u=0),f===l&&(s[u++]=c))}return s.length=u,s},r.prototype.getIndices=function(){var e,t=this._indices;if(t){var i=t.constructor,n=this._count;if(i===Array){e=new i(n);for(var a=0;a<n;a++)e[a]=t[a]}else e=new i(t.buffer,0,n)}else{var i=Bd(this._rawCount);e=new i(this.count());for(var a=0;a<e.length;a++)e[a]=a}return e},r.prototype.filter=function(e,t){if(!this._count)return this;for(var i=this.clone(),n=i.count(),a=Bd(i._rawCount),s=new a(n),o=[],l=e.length,u=0,c=e[0],h=i._chunks,d=0;d<n;d++){var f=void 0,p=i.getRawIndex(d);if(l===0)f=t(d);else if(l===1){var v=h[c][p];f=t(v,d)}else{for(var g=0;g<l;g++)o[g]=h[e[g]][p];o[g]=d,f=t.apply(null,o)}f&&(s[u++]=p)}return u<n&&(i._indices=s),i._count=u,i._extent=[],i._updateGetRawIdx(),i},r.prototype.selectRange=function(e){var t=this.clone(),i=t._count;if(!i)return this;var n=rt(e),a=n.length;if(!a)return this;var s=t.count(),o=Bd(t._rawCount),l=new o(s),u=0,c=n[0],h=e[c][0],d=e[c][1],f=t._chunks,p=!1;if(!t._indices){var v=0;if(a===1){for(var g=f[n[0]],m=0;m<i;m++){var y=g[m];(y>=h&&y<=d||isNaN(y))&&(l[u++]=v),v++}p=!0}else if(a===2){for(var g=f[n[0]],_=f[n[1]],b=e[n[1]][0],T=e[n[1]][1],m=0;m<i;m++){var y=g[m],x=_[m];(y>=h&&y<=d||isNaN(y))&&(x>=b&&x<=T||isNaN(x))&&(l[u++]=v),v++}p=!0}}if(!p)if(a===1)for(var m=0;m<s;m++){var C=t.getRawIndex(m),y=f[n[0]][C];(y>=h&&y<=d||isNaN(y))&&(l[u++]=C)}else for(var m=0;m<s;m++){for(var D=!0,C=t.getRawIndex(m),I=0;I<a;I++){var M=n[I],y=f[M][C];(y<e[M][0]||y>e[M][1])&&(D=!1)}D&&(l[u++]=t.getRawIndex(m))}return u<s&&(t._indices=l),t._count=u,t._extent=[],t._updateGetRawIdx(),t},r.prototype.map=function(e,t){var i=this.clone(e);return this._updateDims(i,e,t),i},r.prototype.modify=function(e,t){this._updateDims(this,e,t)},r.prototype._updateDims=function(e,t,i){for(var n=e._chunks,a=[],s=t.length,o=e.count(),l=[],u=e._rawExtent,c=0;c<t.length;c++)u[t[c]]=Kc();for(var h=0;h<o;h++){for(var d=e.getRawIndex(h),f=0;f<s;f++)l[f]=n[t[f]][d];l[s]=h;var p=i&&i.apply(null,l);if(p!=null){typeof p!="object"&&(a[0]=p,p=a);for(var c=0;c<p.length;c++){var v=t[c],g=p[c],m=u[v],y=n[v];y&&(y[d]=g),g<m[0]&&(m[0]=g),g>m[1]&&(m[1]=g)}}}},r.prototype.lttbDownSample=function(e,t){var i=this.clone([e],!0),n=i._chunks,a=n[e],s=this.count(),o=0,l=Math.floor(1/t),u=this.getRawIndex(0),c,h,d,f=new(Bd(this._rawCount))(Math.min((Math.ceil(s/l)+2)*2,s));f[o++]=u;for(var p=1;p<s-1;p+=l){for(var v=Math.min(p+l,s-1),g=Math.min(p+l*2,s),m=(g+v)/2,y=0,_=v;_<g;_++){var b=this.getRawIndex(_),T=a[b];isNaN(T)||(y+=T)}y/=g-v;var x=p,C=Math.min(p+l,s),D=p-1,I=a[u];c=-1,d=x;for(var M=-1,L=0,_=x;_<C;_++){var b=this.getRawIndex(_),T=a[b];if(isNaN(T)){L++,M<0&&(M=b);continue}h=Math.abs((D-m)*(T-I)-(D-_)*(y-I)),h>c&&(c=h,d=b)}L>0&&L<C-x&&(f[o++]=Math.min(M,d),d=Math.max(M,d)),f[o++]=d,u=d}return f[o++]=this.getRawIndex(s-1),i._count=o,i._indices=f,i.getRawIndex=this._getRawIdx,i},r.prototype.downSample=function(e,t,i,n){for(var a=this.clone([e],!0),s=a._chunks,o=[],l=Math.floor(1/t),u=s[e],c=this.count(),h=a._rawExtent[e]=Kc(),d=new(Bd(this._rawCount))(Math.ceil(c/l)),f=0,p=0;p<c;p+=l){l>c-p&&(l=c-p,o.length=l);for(var v=0;v<l;v++){var g=this.getRawIndex(p+v);o[v]=u[g]}var m=i(o),y=this.getRawIndex(Math.min(p+n(o,m)||0,c-1));u[y]=m,m<h[0]&&(h[0]=m),m>h[1]&&(h[1]=m),d[f++]=y}return a._count=f,a._indices=d,a._updateGetRawIdx(),a},r.prototype.each=function(e,t){if(this._count)for(var i=e.length,n=this._chunks,a=0,s=this.count();a<s;a++){var o=this.getRawIndex(a);switch(i){case 0:t(a);break;case 1:t(n[e[0]][o],a);break;case 2:t(n[e[0]][o],n[e[1]][o],a);break;default:for(var l=0,u=[];l<i;l++)u[l]=n[e[l]][o];u[l]=a,t.apply(null,u)}}},r.prototype.getDataExtent=function(e){var t=this._chunks[e],i=Kc();if(!t)return i;var n=this.count(),a=!this._indices,s;if(a)return this._rawExtent[e].slice();if(s=this._extent[e],s)return s.slice();s=i;for(var o=s[0],l=s[1],u=0;u<n;u++){var c=this.getRawIndex(u),h=t[c];h<o&&(o=h),h>l&&(l=h)}return s=[o,l],this._extent[e]=s,s},r.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var i=[],n=this._chunks,a=0;a<n.length;a++)i.push(n[a][t]);return i},r.prototype.clone=function(e,t){var i=new r,n=this._chunks,a=e&&Qn(e,function(o,l){return o[l]=!0,o},{});if(a)for(var s=0;s<n.length;s++)i._chunks[s]=a[s]?Cde(n[s]):n[s];else i._chunks=n;return this._copyCommonProps(i),t||(i._indices=this._cloneIndices()),i._updateGetRawIdx(),i},r.prototype._copyCommonProps=function(e){e._count=this._count,e._rawCount=this._rawCount,e._provider=this._provider,e._dimensions=this._dimensions,e._extent=Ee(this._extent),e._rawExtent=Ee(this._rawExtent)},r.prototype._cloneIndices=function(){if(this._indices){var e=this._indices.constructor,t=void 0;if(e===Array){var i=this._indices.length;t=new e(i);for(var n=0;n<i;n++)t[n]=this._indices[n]}else t=new e(this._indices);return t}return null},r.prototype._getRawIdxIdentity=function(e){return e},r.prototype._getRawIdx=function(e){return e<this._count&&e>=0?this._indices[e]:-1},r.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},r.internalField=function(){function e(t,i,n,a){return Jo(t[a],this._dimensions[a])}sT={arrayRows:e,objectRows:function(t,i,n,a){return Jo(t[i],this._dimensions[a])},keyedColumns:e,original:function(t,i,n,a){var s=t&&(t.value==null?t:t.value);return Jo(s instanceof Array?s[a]:s,this._dimensions[a])},typedArray:function(t,i,n,a){return t[a]}}}(),r}(),A$=function(){function r(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return r.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},r.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},r.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},r.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},r.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,t=this._getUpstreamSourceManagers(),i=!!t.length,n,a;if(Fm(e)){var s=e,o=void 0,l=void 0,u=void 0;if(i){var c=t[0];c.prepareSource(),u=c.getSource(),o=u.data,l=u.sourceFormat,a=[c._getVersionSign()]}else o=s.get("data",!0),l=Ri(o)?Qo:ia,a=[];var h=this._getSourceMetaRawOption()||{},d=u&&u.metaRawOption||{},f=Fe(h.seriesLayoutBy,d.seriesLayoutBy)||null,p=Fe(h.sourceHeader,d.sourceHeader),v=Fe(h.dimensions,d.dimensions),g=f!==d.seriesLayoutBy||!!p!=!!d.sourceHeader||v;n=g?[D2(o,{seriesLayoutBy:f,sourceHeader:p,dimensions:v},l)]:[]}else{var m=e;if(i){var y=this._applyTransform(t);n=y.sourceList,a=y.upstreamSignList}else{var _=m.get("source",!0);n=[D2(_,this._getSourceMetaRawOption(),null)],a=[]}}this._setLocalSource(n,a)},r.prototype._applyTransform=function(e){var t=this._sourceHost,i=t.get("transform",!0),n=t.get("fromTransformResult",!0);if(n!=null){var a="";e.length!==1&&RR(a)}var s,o=[],l=[];return R(e,function(u){u.prepareSource();var c=u.getSource(n||0),h="";n!=null&&!c&&RR(h),o.push(c),l.push(u._getVersionSign())}),i?s=Sde(i,o,{datasetIndex:t.componentIndex}):n!=null&&(s=[rde(o[0])]),{sourceList:s,upstreamSignList:l}},r.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t<e.length;t++){var i=e[t];if(i._isDirty()||this._upstreamSignList[t]!==i._getVersionSign())return!0}},r.prototype.getSource=function(e){e=e||0;var t=this._sourceList[e];if(!t){var i=this._getUpstreamSourceManagers();return i[0]&&i[0].getSource(e)}return t},r.prototype.getSharedDataStore=function(e){var t=e.makeStoreSchema();return this._innerGetDataStore(t.dimensions,e.source,t.hash)},r.prototype._innerGetDataStore=function(e,t,i){var n=0,a=this._storeList,s=a[n];s||(s=a[n]={});var o=s[i];if(!o){var l=this._getUpstreamSourceManagers()[0];Fm(this._sourceHost)&&l?o=l._innerGetDataStore(e,t,i):(o=new E2,o.initData(new g$(t,e.length),e)),s[i]=o}return o},r.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(Fm(e)){var t=QD(e);return t?[t.getSourceManager()]:[]}else return ae(Mfe(e),function(i){return i.getSourceManager()})},r.prototype._getSourceMetaRawOption=function(){var e=this._sourceHost,t,i,n;if(Fm(e))t=e.get("seriesLayoutBy",!0),i=e.get("sourceHeader",!0),n=e.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var a=e;t=a.get("seriesLayoutBy",!0),i=a.get("sourceHeader",!0),n=a.get("dimensions",!0)}return{seriesLayoutBy:t,sourceHeader:i,dimensions:n}},r}();function kR(r){var e=r.option.transform;e&&Tv(r.option.transform)}function Fm(r){return r.mainType==="series"}function RR(r){throw new Error(r)}var D$="line-height:1";function E$(r,e){var t=r.color||"#6e7079",i=r.fontSize||12,n=r.fontWeight||"400",a=r.color||"#464646",s=r.fontSize||14,o=r.fontWeight||"900";return e==="html"?{nameStyle:"font-size:"+Di(i+"")+"px;color:"+Di(t)+";font-weight:"+Di(n+""),valueStyle:"font-size:"+Di(s+"")+"px;color:"+Di(a)+";font-weight:"+Di(o+"")}:{nameStyle:{fontSize:i,fill:t,fontWeight:n},valueStyle:{fontSize:s,fill:a,fontWeight:o}}}var Ade=[0,10,20,30],Dde=["",`
|
||
`,`
|
||
|
||
`,`
|
||
|
||
|
||
`];function Fr(r,e){return e.type=r,e}function I2(r){return r.type==="section"}function I$(r){return I2(r)?Ede:Ide}function P$(r){if(I2(r)){var e=0,t=r.blocks.length,i=t>1||t>0&&!r.noHeader;return R(r.blocks,function(n){var a=P$(n);a>=e&&(e=a+ +(i&&(!a||I2(n)&&!n.noHeader)))}),e}return 0}function Ede(r,e,t,i){var n=e.noHeader,a=Pde(P$(e)),s=[],o=e.blocks||[];fi(!o||ie(o)),o=o||[];var l=r.orderMode;if(e.sortBlocks&&l){o=o.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(ye(u,l)){var c=new T$(u[l],null);o.sort(function(p,v){return c.evaluate(p.sortParam,v.sortParam)})}else l==="seriesDesc"&&o.reverse()}R(o,function(p,v){var g=e.valueFormatter,m=I$(p)(g?Q(Q({},r),{valueFormatter:g}):r,p,v>0?a.html:0,i);m!=null&&s.push(m)});var h=r.renderMode==="richText"?s.join(a.richText):P2(s.join(""),n?t:a.html);if(n)return h;var d=w2(e.header,"ordinal",r.useUTC),f=E$(i,r.renderMode).nameStyle;return r.renderMode==="richText"?M$(r,d,f)+a.richText+h:P2('<div style="'+f+";"+D$+';">'+Di(d)+"</div>"+h,t)}function Ide(r,e,t,i){var n=r.renderMode,a=e.noName,s=e.noValue,o=!e.markerType,l=e.name,u=r.useUTC,c=e.valueFormatter||r.valueFormatter||function(b){return b=ie(b)?b:[b],ae(b,function(T,x){return w2(T,ie(f)?f[x]:f,u)})};if(!(a&&s)){var h=o?"":r.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",n),d=a?"":w2(l,"ordinal",u),f=e.valueType,p=s?[]:c(e.value,e.dataIndex),v=!o||!a,g=!o&&a,m=E$(i,n),y=m.nameStyle,_=m.valueStyle;return n==="richText"?(o?"":h)+(a?"":M$(r,d,y))+(s?"":kde(r,p,v,g,_)):P2((o?"":h)+(a?"":Mde(d,!o,y))+(s?"":Lde(p,v,g,_)),t)}}function OR(r,e,t,i,n,a){if(r){var s=I$(r),o={useUTC:n,renderMode:t,orderMode:i,markupStyleCreator:e,valueFormatter:r.valueFormatter};return s(o,r,0,a)}}function Pde(r){return{html:Ade[r],richText:Dde[r]}}function P2(r,e){var t='<div style="clear:both"></div>',i="margin: "+e+"px 0 0";return'<div style="'+i+";"+D$+';">'+r+t+"</div>"}function Mde(r,e,t){var i=e?"margin-left:2px":"";return'<span style="'+t+";"+i+'">'+Di(r)+"</span>"}function Lde(r,e,t,i){var n=t?"10px":"20px",a=e?"float:right;margin-left:"+n:"";return r=ie(r)?r:[r],'<span style="'+a+";"+i+'">'+ae(r,function(s){return Di(s)}).join(" ")+"</span>"}function M$(r,e,t){return r.markupStyleCreator.wrapRichTextStyle(e,t)}function kde(r,e,t,i,n){var a=[n],s=i?10:20;return t&&a.push({padding:[0,0,0,s],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(ie(e)?e.join(" "):e,a)}function L$(r,e){var t=r.getData().getItemVisual(e,"style"),i=t[r.visualDrawType];return uc(i)}function k$(r,e){var t=r.get("padding");return t??(e==="richText"?[8,10]:10)}var oT=function(){function r(){this.richTextStyles={},this._nextStyleNameId=K9()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(e,t,i){var n=i==="richText"?this._generateStyleName():null,a=e$({color:t,type:e,renderMode:i,markerId:n});return de(a)?a:(this.richTextStyles[n]=a.style,a.content)},r.prototype.wrapRichTextStyle=function(e,t){var i={};ie(t)?R(t,function(a){return Q(i,a)}):Q(i,t);var n=this._generateStyleName();return this.richTextStyles[n]=i,"{"+n+"|"+e+"}"},r}();function R$(r){var e=r.series,t=r.dataIndex,i=r.multipleSeries,n=e.getData(),a=n.mapDimensionsAll("defaultedTooltip"),s=a.length,o=e.getRawValue(t),l=ie(o),u=L$(e,t),c,h,d,f;if(s>1||l&&!s){var p=Rde(o,e,t,a,u);c=p.inlineValues,h=p.inlineValueTypes,d=p.blocks,f=p.inlineValues[0]}else if(s){var v=n.getDimensionInfo(a[0]);f=c=bf(n,t,a[0]),h=v.type}else f=c=l?o[0]:o;var g=wD(e),m=g&&e.name||"",y=n.getName(t),_=i?m:y;return Fr("section",{header:m,noHeader:i||!g,sortParam:f,blocks:[Fr("nameValue",{markerType:"item",markerColor:u,name:_,noName:!qn(_),value:c,valueType:h,dataIndex:t})].concat(d||[])})}function Rde(r,e,t,i,n){var a=e.getData(),s=Qn(r,function(h,d,f){var p=a.getDimensionInfo(f);return h=h||p&&p.tooltip!==!1&&p.displayName!=null},!1),o=[],l=[],u=[];i.length?R(i,function(h){c(bf(a,t,h),h)}):R(r,c);function c(h,d){var f=a.getDimensionInfo(d);!f||f.otherDims.tooltip===!1||(s?u.push(Fr("nameValue",{markerType:"subItem",markerColor:n,name:f.displayName,value:h,valueType:f.type})):(o.push(h),l.push(f.type)))}return{inlineValues:o,inlineValueTypes:l,blocks:u}}var To=lt();function Um(r,e){return r.getName(e)||r.getId(e)}var Hy="__universalTransitionEnabled",Ct=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return e.prototype.init=function(t,i,n){this.seriesIndex=this.componentIndex,this.dataTask=Jp({count:Nde,reset:Bde}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n);var a=To(this).sourceManager=new A$(this);a.prepareSource();var s=this.getInitialData(t,n);BR(s,this),this.dataTask.context.data=s,To(this).dataBeforeProcessed=s,NR(this),this._initSelectedMapFromData(s)},e.prototype.mergeDefaultAndTheme=function(t,i){var n=Ov(this),a=n?Xf(t):{},s=this.subType;Qe.hasClass(s)&&(s+="Series"),He(t,i.getTheme().get(this.subType)),He(t,this.getDefaultOption()),ac(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&ll(t,a,n)},e.prototype.mergeOption=function(t,i){t=He(this.option,t,!0),this.fillDataTextStyle(t.data);var n=Ov(this);n&&ll(this.option,t,n);var a=To(this).sourceManager;a.dirty(),a.prepareSource();var s=this.getInitialData(t,i);BR(s,this),this.dataTask.dirty(),this.dataTask.context.data=s,To(this).dataBeforeProcessed=s,NR(this),this._initSelectedMapFromData(s)},e.prototype.fillDataTextStyle=function(t){if(t&&!Ri(t))for(var i=["show"],n=0;n<t.length;n++)t[n]&&t[n].label&&ac(t[n],"label",i)},e.prototype.getInitialData=function(t,i){},e.prototype.appendData=function(t){var i=this.getRawData();i.appendData(t.data)},e.prototype.getData=function(t){var i=M2(this);if(i){var n=i.context.data;return t==null||!n.getLinkedData?n:n.getLinkedData(t)}else return To(this).data},e.prototype.getAllData=function(){var t=this.getData();return t&&t.getLinkedDataAll?t.getLinkedDataAll():[{data:t}]},e.prototype.setData=function(t){var i=M2(this);if(i){var n=i.context;n.outputData=t,i!==this.dataTask&&(n.data=t)}To(this).data=t},e.prototype.getEncode=function(){var t=this.get("encode",!0);if(t)return be(t)},e.prototype.getSourceManager=function(){return To(this).sourceManager},e.prototype.getSource=function(){return this.getSourceManager().getSource()},e.prototype.getRawData=function(){return To(this).dataBeforeProcessed},e.prototype.getColorBy=function(){var t=this.get("colorBy");return t||"series"},e.prototype.isColorBySeries=function(){return this.getColorBy()==="series"},e.prototype.getBaseAxis=function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},e.prototype.formatTooltip=function(t,i,n){return R$({series:this,dataIndex:t,multipleSeries:i})},e.prototype.isAnimationEnabled=function(){var t=this.ecModel;if(et.node&&!(t&&t.ssr))return!1;var i=this.getShallow("animation");return i&&this.getData().count()>this.getShallow("animationThreshold")&&(i=!1),!!i},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,i,n){var a=this.ecModel,s=JD.prototype.getColorFromPalette.call(this,t,i,n);return s||(s=a.getColorFromPalette(t,i,n)),s},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,i){this._innerSelect(this.getData(i),t)},e.prototype.unselect=function(t,i){var n=this.option.selectedMap;if(n){var a=this.option.selectedMode,s=this.getData(i);if(a==="series"||n==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var o=0;o<t.length;o++){var l=t[o],u=Um(s,l);n[u]=!1,this._selectedDataIndicesMap[u]=-1}}},e.prototype.toggleSelect=function(t,i){for(var n=[],a=0;a<t.length;a++)n[0]=t[a],this.isSelected(t[a],i)?this.unselect(n,i):this.select(n,i)},e.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap==="all")return[].slice.call(this.getData().getIndices());for(var t=this._selectedDataIndicesMap,i=rt(t),n=[],a=0;a<i.length;a++){var s=t[i[a]];s>=0&&n.push(s)}return n},e.prototype.isSelected=function(t,i){var n=this.option.selectedMap;if(!n)return!1;var a=this.getData(i);return(n==="all"||n[Um(a,t)])&&!a.getItemModel(t).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[Hy])return!0;var t=this.option.universalTransition;return t?t===!0?!0:t&&t.enabled:!1},e.prototype._innerSelect=function(t,i){var n,a,s=this.option,o=s.selectedMode,l=i.length;if(!(!o||!l)){if(o==="series")s.selectedMap="all";else if(o==="multiple"){Ae(s.selectedMap)||(s.selectedMap={});for(var u=s.selectedMap,c=0;c<l;c++){var h=i[c],d=Um(t,h);u[d]=!0,this._selectedDataIndicesMap[d]=t.getRawIndex(h)}}else if(o==="single"||o===!0){var f=i[l-1],d=Um(t,f);s.selectedMap=(n={},n[d]=!0,n),this._selectedDataIndicesMap=(a={},a[d]=t.getRawIndex(f),a)}}},e.prototype._initSelectedMapFromData=function(t){if(!this.option.selectedMap){var i=[];t.hasItemOption&&t.each(function(n){var a=t.getRawDataItem(n);a&&a.selected&&i.push(n)}),i.length>0&&this._innerSelect(t,i)}},e.registerClass=function(t){return Qe.registerClass(t)},e.protoInitialize=function(){var t=e.prototype;t.type="series.__base__",t.seriesIndex=0,t.ignoreStyleOnData=!1,t.hasSymbolVisual=!1,t.defaultSymbol="circle",t.visualStyleAccessPath="itemStyle",t.visualDrawType="fill"}(),e}(Qe);ir(Ct,H1);ir(Ct,JD);aH(Ct,Qe);function NR(r){var e=r.name;wD(r)||(r.name=Ode(r)||e)}function Ode(r){var e=r.getRawData(),t=e.mapDimensionsAll("seriesName"),i=[];return R(t,function(n){var a=e.getDimensionInfo(n);a.displayName&&i.push(a.displayName)}),i.join(" ")}function Nde(r){return r.model.getRawData().count()}function Bde(r){var e=r.model;return e.setData(e.getRawData().cloneShallow()),Fde}function Fde(r,e){e.outputData&&r.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function BR(r,e){R(xv(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(t){r.wrapMethod(t,Be(Ude,e))})}function Ude(r,e){var t=M2(r);return t&&t.setOutputEnd((e||this).count()),e}function M2(r){var e=(r.ecModel||{}).scheduler,t=e&&e.getPipeline(r.uid);if(t){var i=t.currentTask;if(i){var n=i.agentStubMap;n&&(i=n.get(r.uid))}return i}}var Nt=function(){function r(){this.group=new Le,this.uid=jf("viewComponent")}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,i,n){},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,i,n){},r.prototype.updateLayout=function(e,t,i,n){},r.prototype.updateVisual=function(e,t,i,n){},r.prototype.toggleBlurSeries=function(e,t,i){},r.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},r}();AD(Nt);D1(Nt);function Zf(){var r=lt();return function(e){var t=r(e),i=e.pipelineContext,n=!!t.large,a=!!t.progressiveRender,s=t.large=!!(i&&i.large),o=t.progressiveRender=!!(i&&i.progressiveRender);return(n!==s||a!==o)&&"reset"}}var O$=lt(),Vde=Zf(),Tt=function(){function r(){this.group=new Le,this.uid=jf("viewChart"),this.renderTask=Jp({plan:zde,reset:Gde}),this.renderTask.context={view:this}}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,i,n){},r.prototype.highlight=function(e,t,i,n){var a=e.getData(n&&n.dataType);a&&UR(a,n,"emphasis")},r.prototype.downplay=function(e,t,i,n){var a=e.getData(n&&n.dataType);a&&UR(a,n,"normal")},r.prototype.remove=function(e,t){this.group.removeAll()},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,i,n){this.render(e,t,i,n)},r.prototype.updateLayout=function(e,t,i,n){this.render(e,t,i,n)},r.prototype.updateVisual=function(e,t,i,n){this.render(e,t,i,n)},r.prototype.eachRendered=function(e){gl(this.group,e)},r.markUpdateMethod=function(e,t){O$(e).updateMethod=t},r.protoInitialize=function(){var e=r.prototype;e.type="chart"}(),r}();function FR(r,e,t){r&&Lv(r)&&(e==="emphasis"?Js:eo)(r,t)}function UR(r,e,t){var i=sc(r,e),n=e&&e.highlightKey!=null?Ahe(e.highlightKey):null;i!=null?R(wt(i),function(a){FR(r.getItemGraphicEl(a),t,n)}):r.eachItemGraphicEl(function(a){FR(a,t,n)})}AD(Tt);D1(Tt);function zde(r){return Vde(r.model)}function Gde(r){var e=r.model,t=r.ecModel,i=r.api,n=r.payload,a=e.pipelineContext.progressiveRender,s=r.view,o=n&&O$(n).updateMethod,l=a?"incrementalPrepareRender":o&&s[o]?o:"render";return l!=="render"&&s[l](e,t,i,n),Hde[l]}var Hde={incrementalPrepareRender:{progress:function(r,e){e.view.incrementalRender(r,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(r,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},r_="\0__throttleOriginMethod",VR="\0__throttleRate",zR="\0__throttleType";function W1(r,e,t){var i,n=0,a=0,s=null,o,l,u,c;e=e||0;function h(){a=new Date().getTime(),s=null,r.apply(l,u||[])}var d=function(){for(var f=[],p=0;p<arguments.length;p++)f[p]=arguments[p];i=new Date().getTime(),l=this,u=f;var v=c||e,g=c||t;c=null,o=i-(g?n:a)-v,clearTimeout(s),g?s=setTimeout(h,v):o>=0?h():s=setTimeout(h,-o),n=i};return d.clear=function(){s&&(clearTimeout(s),s=null)},d.debounceNextCall=function(f){c=f},d}function Qf(r,e,t,i){var n=r[e];if(n){var a=n[r_]||n,s=n[zR],o=n[VR];if(o!==t||s!==i){if(t==null||!i)return r[e]=a;n=r[e]=W1(a,t,i==="debounce"),n[r_]=a,n[zR]=i,n[VR]=t}return n}}function Bv(r,e){var t=r[e];t&&t[r_]&&(t.clear&&t.clear(),r[e]=t[r_])}var GR=lt(),HR={itemStyle:oc($H,!0),lineStyle:oc(HH,!0)},$de={lineStyle:"stroke",itemStyle:"fill"};function N$(r,e){var t=r.visualStyleMapper||HR[e];return t||(console.warn("Unknown style type '"+e+"'."),HR.itemStyle)}function B$(r,e){var t=r.visualDrawType||$de[e];return t||(console.warn("Unknown style type '"+e+"'."),"fill")}var Wde={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData(),i=r.visualStyleAccessPath||"itemStyle",n=r.getModel(i),a=N$(r,i),s=a(n),o=n.getShallow("decal");o&&(t.setVisual("decal",o),o.dirty=!0);var l=B$(r,i),u=s[l],c=xe(u)?u:null,h=s.fill==="auto"||s.stroke==="auto";if(!s[l]||c||h){var d=r.getColorFromPalette(r.name,null,e.getSeriesCount());s[l]||(s[l]=d,t.setVisual("colorFromPalette",!0)),s.fill=s.fill==="auto"||xe(s.fill)?d:s.fill,s.stroke=s.stroke==="auto"||xe(s.stroke)?d:s.stroke}if(t.setVisual("style",s),t.setVisual("drawType",l),!e.isSeriesFiltered(r)&&c)return t.setVisual("colorFromPalette",!1),{dataEach:function(f,p){var v=r.getDataParams(p),g=Q({},s);g[l]=c(v),f.setItemVisual(p,"style",g)}}}},Fd=new ft,qde={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){if(!(r.ignoreStyleOnData||e.isSeriesFiltered(r))){var t=r.getData(),i=r.visualStyleAccessPath||"itemStyle",n=N$(r,i),a=t.getVisual("drawType");return{dataEach:t.hasItemOption?function(s,o){var l=s.getRawDataItem(o);if(l&&l[i]){Fd.option=l[i];var u=n(Fd),c=s.ensureUniqueItemVisual(o,"style");Q(c,u),Fd.option.decal&&(s.setItemVisual(o,"decal",Fd.option.decal),Fd.option.decal.dirty=!0),a in u&&s.setItemVisual(o,"colorFromPalette",!1)}}:null}}}},jde={performRawSeries:!0,overallReset:function(r){var e=be();r.eachSeries(function(t){var i=t.getColorBy();if(!t.isColorBySeries()){var n=t.type+"-"+i,a=e.get(n);a||(a={},e.set(n,a)),GR(t).scope=a}}),r.eachSeries(function(t){if(!(t.isColorBySeries()||r.isSeriesFiltered(t))){var i=t.getRawData(),n={},a=t.getData(),s=GR(t).scope,o=t.visualStyleAccessPath||"itemStyle",l=B$(t,o);a.each(function(u){var c=a.getRawIndex(u);n[c]=u}),i.each(function(u){var c=n[u],h=a.getItemVisual(c,"colorFromPalette");if(h){var d=a.ensureUniqueItemVisual(c,"style"),f=i.getName(u)||u+"",p=i.count();d[l]=t.getColorFromPalette(f,s,p)}})}})}},Vm=Math.PI;function Xde(r,e){e=e||{},Ce(e,{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var t=new Le,i=new at({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});t.add(i);var n=new nt({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),a=new at({style:{fill:"none"},textContent:n,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});t.add(a);var s;return e.showSpinner&&(s=new Sg({shape:{startAngle:-Vm/2,endAngle:-Vm/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001}),s.animateShape(!0).when(1e3,{endAngle:Vm*3/2}).start("circularInOut"),s.animateShape(!0).when(1e3,{startAngle:Vm*3/2}).delay(300).start("circularInOut"),t.add(s)),t.resize=function(){var o=n.getBoundingRect().width,l=e.showSpinner?e.spinnerRadius:0,u=(r.getWidth()-l*2-(e.showSpinner&&o?10:0)-o)/2-(e.showSpinner&&o?0:5+o/2)+(e.showSpinner?0:o/2)+(o?0:l),c=r.getHeight()/2;e.showSpinner&&s.setShape({cx:u,cy:c}),a.setShape({x:u-l,y:c-l,width:l*2,height:l*2}),i.setShape({x:0,y:0,width:r.getWidth(),height:r.getHeight()})},t.resize(),t}var F$=function(){function r(e,t,i,n){this._stageTaskMap=be(),this.ecInstance=e,this.api=t,i=this._dataProcessorHandlers=i.slice(),n=this._visualHandlers=n.slice(),this._allHandlers=i.concat(n)}return r.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(i){var n=i.overallTask;n&&n.dirty()})},r.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var i=this._pipelineMap.get(e.__pipeline.id),n=i.context,a=!t&&i.progressiveEnabled&&(!n||n.progressiveRender)&&e.__idxInPipeline>i.blockIndex,s=a?i.step:null,o=n&&n.modDataCount,l=o!=null?Math.ceil(o/s):null;return{step:s,modBy:l,modDataCount:o}}},r.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},r.prototype.updateStreamModes=function(e,t){var i=this._pipelineMap.get(e.uid),n=e.getData(),a=n.count(),s=i.progressiveEnabled&&t.incrementalPrepareRender&&a>=i.threshold,o=e.get("large")&&a>=e.get("largeThreshold"),l=e.get("progressiveChunkMode")==="mod"?a:null;e.pipelineContext=i.context={progressiveRender:s,modDataCount:l,large:o}},r.prototype.restorePipelines=function(e){var t=this,i=t._pipelineMap=be();e.eachSeries(function(n){var a=n.getProgressive(),s=n.uid;i.set(s,{id:s,head:null,tail:null,threshold:n.getProgressiveThreshold(),progressiveEnabled:a&&!(n.preventIncremental&&n.preventIncremental()),blockIndex:-1,step:Math.round(a||700),count:0}),t._pipe(n,n.dataTask)})},r.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),i=this.api;R(this._allHandlers,function(n){var a=e.get(n.uid)||e.set(n.uid,{}),s="";fi(!(n.reset&&n.overallReset),s),n.reset&&this._createSeriesStageTask(n,a,t,i),n.overallReset&&this._createOverallStageTask(n,a,t,i)},this)},r.prototype.prepareView=function(e,t,i,n){var a=e.renderTask,s=a.context;s.model=t,s.ecModel=i,s.api=n,a.__block=!e.incrementalPrepareRender,this._pipe(t,a)},r.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},r.prototype.performVisualTasks=function(e,t,i){this._performStageTasks(this._visualHandlers,e,t,i)},r.prototype._performStageTasks=function(e,t,i,n){n=n||{};var a=!1,s=this;R(e,function(l,u){if(!(n.visualType&&n.visualType!==l.visualType)){var c=s._stageTaskMap.get(l.uid),h=c.seriesTaskMap,d=c.overallTask;if(d){var f,p=d.agentStubMap;p.each(function(g){o(n,g)&&(g.dirty(),f=!0)}),f&&d.dirty(),s.updatePayload(d,i);var v=s.getPerformArgs(d,n.block);p.each(function(g){g.perform(v)}),d.perform(v)&&(a=!0)}else h&&h.each(function(g,m){o(n,g)&&g.dirty();var y=s.getPerformArgs(g,n.block);y.skip=!l.performRawSeries&&t.isSeriesFiltered(g.context.model),s.updatePayload(g,i),g.perform(y)&&(a=!0)})}});function o(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=a||this.unfinished},r.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(i){t=i.dataTask.perform()||t}),this.unfinished=t||this.unfinished},r.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},r.prototype.updatePayload=function(e,t){t!=="remain"&&(e.context.payload=t)},r.prototype._createSeriesStageTask=function(e,t,i,n){var a=this,s=t.seriesTaskMap,o=t.seriesTaskMap=be(),l=e.seriesType,u=e.getTargetSeries;e.createOnAllSeries?i.eachRawSeries(c):l?i.eachRawSeriesByType(l,c):u&&u(i,n).each(c);function c(h){var d=h.uid,f=o.set(d,s&&s.get(d)||Jp({plan:Jde,reset:epe,count:rpe}));f.context={model:h,ecModel:i,api:n,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:a},a._pipe(h,f)}},r.prototype._createOverallStageTask=function(e,t,i,n){var a=this,s=t.overallTask=t.overallTask||Jp({reset:Yde});s.context={ecModel:i,api:n,overallReset:e.overallReset,scheduler:a};var o=s.agentStubMap,l=s.agentStubMap=be(),u=e.seriesType,c=e.getTargetSeries,h=!0,d=!1,f="";fi(!e.createOnAllSeries,f),u?i.eachRawSeriesByType(u,p):c?c(i,n).each(p):(h=!1,R(i.getSeries(),p));function p(v){var g=v.uid,m=l.set(g,o&&o.get(g)||(d=!0,Jp({reset:Kde,onDirty:Qde})));m.context={model:v,overallProgress:h},m.agent=s,m.__block=h,a._pipe(v,m)}d&&s.dirty()},r.prototype._pipe=function(e,t){var i=e.uid,n=this._pipelineMap.get(i);!n.head&&(n.head=t),n.tail&&n.tail.pipe(t),n.tail=t,t.__idxInPipeline=n.count++,t.__pipeline=n},r.wrapStageHandler=function(e,t){return xe(e)&&(e={overallReset:e,seriesType:ipe(e)}),e.uid=jf("stageHandler"),t&&(e.visualType=t),e},r}();function Yde(r){r.overallReset(r.ecModel,r.api,r.payload)}function Kde(r){return r.overallProgress&&Zde}function Zde(){this.agent.dirty(),this.getDownstream().dirty()}function Qde(){this.agent&&this.agent.dirty()}function Jde(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function epe(r){r.useClearVisual&&r.data.clearAllVisual();var e=r.resetDefines=wt(r.reset(r.model,r.ecModel,r.api,r.payload));return e.length>1?ae(e,function(t,i){return U$(i)}):tpe}var tpe=U$(0);function U$(r){return function(e,t){var i=t.data,n=t.resetDefines[r];if(n&&n.dataEach)for(var a=e.start;a<e.end;a++)n.dataEach(i,a);else n&&n.progress&&n.progress(e,i)}}function rpe(r){return r.data.count()}function ipe(r){i_=null;try{r(Fv,V$)}catch{}return i_}var Fv={},V$={},i_;z$(Fv,eE);z$(V$,h$);Fv.eachSeriesByType=Fv.eachRawSeriesByType=function(r){i_=r};Fv.eachComponent=function(r){r.mainType==="series"&&r.subType&&(i_=r.subType)};function z$(r,e){for(var t in e.prototype)r[t]=tr}var $R=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"];const npe={color:$R,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],$R]};var Ti="#B9B8CE",WR="#100C2A",zm=function(){return{axisLine:{lineStyle:{color:Ti}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},qR=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],G$={darkMode:!0,color:qR,backgroundColor:WR,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:Ti}},textStyle:{color:Ti},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:Ti}},dataZoom:{borderColor:"#71708A",textStyle:{color:Ti},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:Ti}},timeline:{lineStyle:{color:Ti},label:{color:Ti},controlStyle:{color:Ti,borderColor:Ti}},calendar:{itemStyle:{color:WR},dayLabel:{color:Ti},monthLabel:{color:Ti},yearLabel:{color:Ti}},timeAxis:zm(),logAxis:zm(),valueAxis:zm(),categoryAxis:zm(),line:{symbol:"circle"},graph:{color:qR},gauge:{title:{color:Ti},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:Ti},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}};G$.categoryAxis.splitLine.show=!1;var ape=function(){function r(){}return r.prototype.normalizeQuery=function(e){var t={},i={},n={};if(de(e)){var a=es(e);t.mainType=a.main||null,t.subType=a.sub||null}else{var s=["Index","Name","Id"],o={name:1,dataIndex:1,dataType:1};R(e,function(l,u){for(var c=!1,h=0;h<s.length;h++){var d=s[h],f=u.lastIndexOf(d);if(f>0&&f===u.length-d.length){var p=u.slice(0,f);p!=="data"&&(t.mainType=p,t[d.toLowerCase()]=l,c=!0)}}o.hasOwnProperty(u)&&(i[u]=l,c=!0),c||(n[u]=l)})}return{cptQuery:t,dataQuery:i,otherQuery:n}},r.prototype.filter=function(e,t){var i=this.eventInfo;if(!i)return!0;var n=i.targetEl,a=i.packedEvent,s=i.model,o=i.view;if(!s||!o)return!0;var l=t.cptQuery,u=t.dataQuery;return c(l,s,"mainType")&&c(l,s,"subType")&&c(l,s,"index","componentIndex")&&c(l,s,"name")&&c(l,s,"id")&&c(u,a,"name")&&c(u,a,"dataIndex")&&c(u,a,"dataType")&&(!o.filterForExposedEvent||o.filterForExposedEvent(e,t.otherQuery,n,a));function c(h,d,f,p){return h[f]==null||d[p||f]===h[f]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r}(),L2=["symbol","symbolSize","symbolRotate","symbolOffset"],jR=L2.concat(["symbolKeepAspect"]),spe={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData();if(r.legendIcon&&t.setVisual("legendIcon",r.legendIcon),!r.hasSymbolVisual)return;for(var i={},n={},a=!1,s=0;s<L2.length;s++){var o=L2[s],l=r.get(o);xe(l)?(a=!0,n[o]=l):i[o]=l}if(i.symbol=i.symbol||r.defaultSymbol,t.setVisual(Q({legendIcon:r.legendIcon||i.symbol,symbolKeepAspect:r.get("symbolKeepAspect")},i)),e.isSeriesFiltered(r))return;var u=rt(n);function c(h,d){for(var f=r.getRawValue(d),p=r.getDataParams(d),v=0;v<u.length;v++){var g=u[v];h.setItemVisual(d,g,n[g](f,p))}}return{dataEach:a?c:null}}},ope={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){if(!r.hasSymbolVisual||e.isSeriesFiltered(r))return;var t=r.getData();function i(n,a){for(var s=n.getItemModel(a),o=0;o<jR.length;o++){var l=jR[o],u=s.getShallow(l,!0);u!=null&&n.setItemVisual(a,l,u)}}return{dataEach:t.hasItemOption?i:null}}};function aE(r,e,t){switch(t){case"color":var i=r.getItemVisual(e,"style");return i[r.getVisual("drawType")];case"opacity":return r.getItemVisual(e,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return r.getItemVisual(e,t)}}function Cg(r,e){switch(e){case"color":var t=r.getVisual("style");return t[r.getVisual("drawType")];case"opacity":return r.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return r.getVisual(e)}}function H$(r,e,t,i){switch(t){case"color":var n=r.ensureUniqueItemVisual(e,"style");n[r.getVisual("drawType")]=i,r.setItemVisual(e,"colorFromPalette",!1);break;case"opacity":r.ensureUniqueItemVisual(e,"style").opacity=i;break;case"symbol":case"symbolSize":case"liftZ":r.setItemVisual(e,t,i);break}}function $$(r,e){function t(i,n){var a=[];return i.eachComponent({mainType:"series",subType:r,query:n},function(s){a.push(s.seriesIndex)}),a}R([[r+"ToggleSelect","toggleSelect"],[r+"Select","select"],[r+"UnSelect","unselect"]],function(i){e(i[0],function(n,a,s){n=Q({},n),s.dispatchAction(Q(n,{type:i[1],seriesIndex:t(a,n)}))})})}function Zc(r,e,t,i,n){var a=r+e;t.isSilent(a)||i.eachComponent({mainType:"series",subType:"pie"},function(s){for(var o=s.seriesIndex,l=s.option.selectedMap,u=n.selected,c=0;c<u.length;c++)if(u[c].seriesIndex===o){var h=s.getData(),d=sc(h,n.fromActionPayload);t.trigger(a,{type:a,seriesId:s.id,name:ie(d)?h.getName(d[0]):h.getName(d),selected:de(l)?l:Q({},l)})}})}function lpe(r,e,t){r.on("selectchanged",function(i){var n=t.getModel();i.isFromClick?(Zc("map","selectchanged",e,n,i),Zc("pie","selectchanged",e,n,i)):i.fromAction==="select"?(Zc("map","selected",e,n,i),Zc("pie","selected",e,n,i)):i.fromAction==="unselect"&&(Zc("map","unselected",e,n,i),Zc("pie","unselected",e,n,i))})}function Du(r,e,t){for(var i;r&&!(e(r)&&(i=r,t));)r=r.__hostTarget||r.parent;return i}var upe=Math.round(Math.random()*9),cpe=typeof Object.defineProperty=="function",hpe=function(){function r(){this._id="__ec_inner_"+upe++}return r.prototype.get=function(e){return this._guard(e)[this._id]},r.prototype.set=function(e,t){var i=this._guard(e);return cpe?Object.defineProperty(i,this._id,{value:t,enumerable:!1,configurable:!0}):i[this._id]=t,this},r.prototype.delete=function(e){return this.has(e)?(delete this._guard(e)[this._id],!0):!1},r.prototype.has=function(e){return!!this._guard(e)[this._id]},r.prototype._guard=function(e){if(e!==Object(e))throw TypeError("Value of WeakMap is not a non-null object.");return e},r}(),fpe=Je.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,e){var t=e.cx,i=e.cy,n=e.width/2,a=e.height/2;r.moveTo(t,i-a),r.lineTo(t+n,i+a),r.lineTo(t-n,i+a),r.closePath()}}),dpe=Je.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,e){var t=e.cx,i=e.cy,n=e.width/2,a=e.height/2;r.moveTo(t,i-a),r.lineTo(t+n,i),r.lineTo(t,i+a),r.lineTo(t-n,i),r.closePath()}}),ppe=Je.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,e){var t=e.x,i=e.y,n=e.width/5*3,a=Math.max(n,e.height),s=n/2,o=s*s/(a-s),l=i-a+s+o,u=Math.asin(o/s),c=Math.cos(u)*s,h=Math.sin(u),d=Math.cos(u),f=s*.6,p=s*.7;r.moveTo(t-c,l+o),r.arc(t,l,s,Math.PI-u,Math.PI*2+u),r.bezierCurveTo(t+c-h*f,l+o+d*f,t,i-p,t,i),r.bezierCurveTo(t,i-p,t-c+h*f,l+o+d*f,t-c,l+o),r.closePath()}}),vpe=Je.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,e){var t=e.height,i=e.width,n=e.x,a=e.y,s=i/3*2;r.moveTo(n,a),r.lineTo(n+s,a+t),r.lineTo(n,a+t/4*3),r.lineTo(n-s,a+t),r.lineTo(n,a),r.closePath()}}),gpe={line:Ar,rect:at,roundRect:at,square:at,circle:ms,diamond:dpe,pin:ppe,arrow:vpe,triangle:fpe},mpe={line:function(r,e,t,i,n){n.x1=r,n.y1=e+i/2,n.x2=r+t,n.y2=e+i/2},rect:function(r,e,t,i,n){n.x=r,n.y=e,n.width=t,n.height=i},roundRect:function(r,e,t,i,n){n.x=r,n.y=e,n.width=t,n.height=i,n.r=Math.min(t,i)/4},square:function(r,e,t,i,n){var a=Math.min(t,i);n.x=r,n.y=e,n.width=a,n.height=a},circle:function(r,e,t,i,n){n.cx=r+t/2,n.cy=e+i/2,n.r=Math.min(t,i)/2},diamond:function(r,e,t,i,n){n.cx=r+t/2,n.cy=e+i/2,n.width=t,n.height=i},pin:function(r,e,t,i,n){n.x=r+t/2,n.y=e+i/2,n.width=t,n.height=i},arrow:function(r,e,t,i,n){n.x=r+t/2,n.y=e+i/2,n.width=t,n.height=i},triangle:function(r,e,t,i,n){n.cx=r+t/2,n.cy=e+i/2,n.width=t,n.height=i}},n_={};R(gpe,function(r,e){n_[e]=new r});var ype=Je.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(r,e,t){var i=j0(r,e,t),n=this.shape;return n&&n.symbolType==="pin"&&e.position==="inside"&&(i.y=t.y+t.height*.4),i},buildPath:function(r,e,t){var i=e.symbolType;if(i!=="none"){var n=n_[i];n||(i="rect",n=n_[i]),mpe[i](e.x,e.y,e.width,e.height,n.shape),n.buildPath(r,n.shape,t)}}});function _pe(r,e){if(this.type!=="image"){var t=this.style;this.__isEmptyBrush?(t.stroke=r,t.fill=e||"#fff",t.lineWidth=2):this.shape.symbolType==="line"?t.stroke=r:t.fill=r,this.markRedraw()}}function cr(r,e,t,i,n,a,s){var o=r.indexOf("empty")===0;o&&(r=r.substr(5,1).toLowerCase()+r.substr(6));var l;return r.indexOf("image://")===0?l=BD(r.slice(8),new We(e,t,i,n),s?"center":"cover"):r.indexOf("path://")===0?l=Tg(r.slice(7),{},new We(e,t,i,n),s?"center":"cover"):l=new ype({shape:{symbolType:r,x:e,y:t,width:i,height:n}}),l.__isEmptyBrush=o,l.setColor=_pe,a&&l.setColor(a),l}function Jf(r){return ie(r)||(r=[+r,+r]),[r[0]||0,r[1]||0]}function _c(r,e){if(r!=null)return ie(r)||(r=[r,r]),[ce(r[0],e[0])||0,ce(Fe(r[1],r[0]),e[1])||0]}function Eu(r){return isFinite(r)}function bpe(r,e,t){var i=e.x==null?0:e.x,n=e.x2==null?1:e.x2,a=e.y==null?0:e.y,s=e.y2==null?0:e.y2;e.global||(i=i*t.width+t.x,n=n*t.width+t.x,a=a*t.height+t.y,s=s*t.height+t.y),i=Eu(i)?i:0,n=Eu(n)?n:1,a=Eu(a)?a:0,s=Eu(s)?s:0;var o=r.createLinearGradient(i,a,n,s);return o}function Spe(r,e,t){var i=t.width,n=t.height,a=Math.min(i,n),s=e.x==null?.5:e.x,o=e.y==null?.5:e.y,l=e.r==null?.5:e.r;e.global||(s=s*i+t.x,o=o*n+t.y,l=l*a),s=Eu(s)?s:.5,o=Eu(o)?o:.5,l=l>=0&&Eu(l)?l:.5;var u=r.createRadialGradient(s,o,0,s,o,l);return u}function k2(r,e,t){for(var i=e.type==="radial"?Spe(r,e,t):bpe(r,e,t),n=e.colorStops,a=0;a<n.length;a++)i.addColorStop(n[a].offset,n[a].color);return i}function Tpe(r,e){if(r===e||!r&&!e)return!1;if(!r||!e||r.length!==e.length)return!0;for(var t=0;t<r.length;t++)if(r[t]!==e[t])return!0;return!1}function Gm(r){return parseInt(r,10)}function Ah(r,e,t){var i=["width","height"][e],n=["clientWidth","clientHeight"][e],a=["paddingLeft","paddingTop"][e],s=["paddingRight","paddingBottom"][e];if(t[i]!=null&&t[i]!=="auto")return parseFloat(t[i]);var o=document.defaultView.getComputedStyle(r);return(r[n]||Gm(o[i])||Gm(r.style[i]))-(Gm(o[a])||0)-(Gm(o[s])||0)|0}function xpe(r,e){return!r||r==="solid"||!(e>0)?null:r==="dashed"?[4*e,2*e]:r==="dotted"?[e]:ut(r)?[r]:ie(r)?r:null}function sE(r){var e=r.style,t=e.lineDash&&e.lineWidth>0&&xpe(e.lineDash,e.lineWidth),i=e.lineDashOffset;if(t){var n=e.strokeNoScale&&r.getLineScale?r.getLineScale():1;n&&n!==1&&(t=ae(t,function(a){return a/n}),i/=n)}return[t,i]}var wpe=new gs(!0);function a_(r){var e=r.stroke;return!(e==null||e==="none"||!(r.lineWidth>0))}function XR(r){return typeof r=="string"&&r!=="none"}function s_(r){var e=r.fill;return e!=null&&e!=="none"}function YR(r,e){if(e.fillOpacity!=null&&e.fillOpacity!==1){var t=r.globalAlpha;r.globalAlpha=e.fillOpacity*e.opacity,r.fill(),r.globalAlpha=t}else r.fill()}function KR(r,e){if(e.strokeOpacity!=null&&e.strokeOpacity!==1){var t=r.globalAlpha;r.globalAlpha=e.strokeOpacity*e.opacity,r.stroke(),r.globalAlpha=t}else r.stroke()}function R2(r,e,t){var i=DD(e.image,e.__image,t);if(E1(i)){var n=r.createPattern(i,e.repeat||"repeat");if(typeof DOMMatrix=="function"&&n&&n.setTransform){var a=new DOMMatrix;a.translateSelf(e.x||0,e.y||0),a.rotateSelf(0,0,(e.rotation||0)*zp),a.scaleSelf(e.scaleX||1,e.scaleY||1),n.setTransform(a)}return n}}function Cpe(r,e,t,i){var n,a=a_(t),s=s_(t),o=t.strokePercent,l=o<1,u=!e.path;(!e.silent||l)&&u&&e.createPathProxy();var c=e.path||wpe,h=e.__dirty;if(!i){var d=t.fill,f=t.stroke,p=s&&!!d.colorStops,v=a&&!!f.colorStops,g=s&&!!d.image,m=a&&!!f.image,y=void 0,_=void 0,b=void 0,T=void 0,x=void 0;(p||v)&&(x=e.getBoundingRect()),p&&(y=h?k2(r,d,x):e.__canvasFillGradient,e.__canvasFillGradient=y),v&&(_=h?k2(r,f,x):e.__canvasStrokeGradient,e.__canvasStrokeGradient=_),g&&(b=h||!e.__canvasFillPattern?R2(r,d,e):e.__canvasFillPattern,e.__canvasFillPattern=b),m&&(T=h||!e.__canvasStrokePattern?R2(r,f,e):e.__canvasStrokePattern,e.__canvasStrokePattern=b),p?r.fillStyle=y:g&&(b?r.fillStyle=b:s=!1),v?r.strokeStyle=_:m&&(T?r.strokeStyle=T:a=!1)}var C=e.getGlobalScale();c.setScale(C[0],C[1],e.segmentIgnoreThreshold);var D,I;r.setLineDash&&t.lineDash&&(n=sE(e),D=n[0],I=n[1]);var M=!0;(u||h&fh)&&(c.setDPR(r.dpr),l?c.setContext(null):(c.setContext(r),M=!1),c.reset(),e.buildPath(c,e.shape,i),c.toStatic(),e.pathUpdated()),M&&c.rebuildPath(r,l?o:1),D&&(r.setLineDash(D),r.lineDashOffset=I),i||(t.strokeFirst?(a&&KR(r,t),s&&YR(r,t)):(s&&YR(r,t),a&&KR(r,t))),D&&r.setLineDash([])}function Ape(r,e,t){var i=e.__image=DD(t.image,e.__image,e,e.onload);if(!(!i||!E1(i))){var n=t.x||0,a=t.y||0,s=e.getWidth(),o=e.getHeight(),l=i.width/i.height;if(s==null&&o!=null?s=o*l:o==null&&s!=null?o=s/l:s==null&&o==null&&(s=i.width,o=i.height),t.sWidth&&t.sHeight){var u=t.sx||0,c=t.sy||0;r.drawImage(i,u,c,t.sWidth,t.sHeight,n,a,s,o)}else if(t.sx&&t.sy){var u=t.sx,c=t.sy,h=s-u,d=o-c;r.drawImage(i,u,c,h,d,n,a,s,o)}else r.drawImage(i,n,a,s,o)}}function Dpe(r,e,t){var i,n=t.text;if(n!=null&&(n+=""),n){r.font=t.font||al,r.textAlign=t.textAlign,r.textBaseline=t.textBaseline;var a=void 0,s=void 0;r.setLineDash&&t.lineDash&&(i=sE(e),a=i[0],s=i[1]),a&&(r.setLineDash(a),r.lineDashOffset=s),t.strokeFirst?(a_(t)&&r.strokeText(n,t.x,t.y),s_(t)&&r.fillText(n,t.x,t.y)):(s_(t)&&r.fillText(n,t.x,t.y),a_(t)&&r.strokeText(n,t.x,t.y)),a&&r.setLineDash([])}}var ZR=["shadowBlur","shadowOffsetX","shadowOffsetY"],QR=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function W$(r,e,t,i,n){var a=!1;if(!i&&(t=t||{},e===t))return!1;if(i||e.opacity!==t.opacity){Wi(r,n),a=!0;var s=Math.max(Math.min(e.opacity,1),0);r.globalAlpha=isNaN(s)?Wu.opacity:s}(i||e.blend!==t.blend)&&(a||(Wi(r,n),a=!0),r.globalCompositeOperation=e.blend||Wu.blend);for(var o=0;o<ZR.length;o++){var l=ZR[o];(i||e[l]!==t[l])&&(a||(Wi(r,n),a=!0),r[l]=r.dpr*(e[l]||0))}return(i||e.shadowColor!==t.shadowColor)&&(a||(Wi(r,n),a=!0),r.shadowColor=e.shadowColor||Wu.shadowColor),a}function JR(r,e,t,i,n){var a=Uv(e,n.inHover),s=i?null:t&&Uv(t,n.inHover)||{};if(a===s)return!1;var o=W$(r,a,s,i,n);if((i||a.fill!==s.fill)&&(o||(Wi(r,n),o=!0),XR(a.fill)&&(r.fillStyle=a.fill)),(i||a.stroke!==s.stroke)&&(o||(Wi(r,n),o=!0),XR(a.stroke)&&(r.strokeStyle=a.stroke)),(i||a.opacity!==s.opacity)&&(o||(Wi(r,n),o=!0),r.globalAlpha=a.opacity==null?1:a.opacity),e.hasStroke()){var l=a.lineWidth,u=l/(a.strokeNoScale&&e.getLineScale?e.getLineScale():1);r.lineWidth!==u&&(o||(Wi(r,n),o=!0),r.lineWidth=u)}for(var c=0;c<QR.length;c++){var h=QR[c],d=h[0];(i||a[d]!==s[d])&&(o||(Wi(r,n),o=!0),r[d]=a[d]||h[1])}return o}function Epe(r,e,t,i,n){return W$(r,Uv(e,n.inHover),t&&Uv(t,n.inHover),i,n)}function q$(r,e){var t=e.transform,i=r.dpr||1;t?r.setTransform(i*t[0],i*t[1],i*t[2],i*t[3],i*t[4],i*t[5]):r.setTransform(i,0,0,i,0,0)}function Ipe(r,e,t){for(var i=!1,n=0;n<r.length;n++){var a=r[n];i=i||a.isZeroArea(),q$(e,a),e.beginPath(),a.buildPath(e,a.shape),e.clip()}t.allClipped=i}function Ppe(r,e){return r&&e?r[0]!==e[0]||r[1]!==e[1]||r[2]!==e[2]||r[3]!==e[3]||r[4]!==e[4]||r[5]!==e[5]:!(!r&&!e)}var eO=1,tO=2,rO=3,iO=4;function Mpe(r){var e=s_(r),t=a_(r);return!(r.lineDash||!(+e^+t)||e&&typeof r.fill!="string"||t&&typeof r.stroke!="string"||r.strokePercent<1||r.strokeOpacity<1||r.fillOpacity<1)}function Wi(r,e){e.batchFill&&r.fill(),e.batchStroke&&r.stroke(),e.batchFill="",e.batchStroke=""}function Uv(r,e){return e&&r.__hoverStyle||r.style}function oE(r,e){Iu(r,e,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function Iu(r,e,t,i){var n=e.transform;if(!e.shouldBePainted(t.viewWidth,t.viewHeight,!1,!1)){e.__dirty&=~pn,e.__isRendered=!1;return}var a=e.__clipPaths,s=t.prevElClipPaths,o=!1,l=!1;if((!s||Tpe(a,s))&&(s&&s.length&&(Wi(r,t),r.restore(),l=o=!0,t.prevElClipPaths=null,t.allClipped=!1,t.prevEl=null),a&&a.length&&(Wi(r,t),r.save(),Ipe(a,r,t),o=!0),t.prevElClipPaths=a),t.allClipped){e.__isRendered=!1;return}e.beforeBrush&&e.beforeBrush(),e.innerBeforeBrush();var u=t.prevEl;u||(l=o=!0);var c=e instanceof Je&&e.autoBatch&&Mpe(e.style);o||Ppe(n,u.transform)?(Wi(r,t),q$(r,e)):c||Wi(r,t);var h=Uv(e,t.inHover);e instanceof Je?(t.lastDrawType!==eO&&(l=!0,t.lastDrawType=eO),JR(r,e,u,l,t),(!c||!t.batchFill&&!t.batchStroke)&&r.beginPath(),Cpe(r,e,h,c),c&&(t.batchFill=h.fill||"",t.batchStroke=h.stroke||"")):e instanceof yf?(t.lastDrawType!==rO&&(l=!0,t.lastDrawType=rO),JR(r,e,u,l,t),Dpe(r,e,h)):e instanceof Ur?(t.lastDrawType!==tO&&(l=!0,t.lastDrawType=tO),Epe(r,e,u,l,t),Ape(r,e,h)):e.getTemporalDisplayables&&(t.lastDrawType!==iO&&(l=!0,t.lastDrawType=iO),Lpe(r,e,t)),c&&i&&Wi(r,t),e.innerAfterBrush(),e.afterBrush&&e.afterBrush(),t.prevEl=e,e.__dirty=0,e.__isRendered=!0}function Lpe(r,e,t){var i=e.getDisplayables(),n=e.getTemporalDisplayables();r.save();var a={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:t.viewWidth,viewHeight:t.viewHeight,inHover:t.inHover},s,o;for(s=e.getCursor(),o=i.length;s<o;s++){var l=i[s];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),Iu(r,l,a,s===o-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),a.prevEl=l}for(var u=0,c=n.length;u<c;u++){var l=n[u];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),Iu(r,l,a,u===c-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),a.prevEl=l}e.clearTemporalDisplayables(),e.notClear=!0,r.restore()}var lT=new hpe,nO=new gg(100),aO=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function Sf(r,e){if(r==="none")return null;var t=e.getDevicePixelRatio(),i=e.getZr(),n=i.painter.type==="svg";r.dirty&&lT.delete(r);var a=lT.get(r);if(a)return a;var s=Ce(r,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});s.backgroundColor==="none"&&(s.backgroundColor=null);var o={repeat:"repeat"};return l(o),o.rotation=s.rotation,o.scaleX=o.scaleY=n?1:1/t,lT.set(r,o),r.dirty=!1,o;function l(u){for(var c=[t],h=!0,d=0;d<aO.length;++d){var f=s[aO[d]];if(f!=null&&!ie(f)&&!de(f)&&!ut(f)&&typeof f!="boolean"){h=!1;break}c.push(f)}var p;if(h){p=c.join(",")+(n?"-svg":"");var v=nO.get(p);v&&(n?u.svgElement=v:u.image=v)}var g=X$(s.dashArrayX),m=kpe(s.dashArrayY),y=j$(s.symbol),_=Rpe(g),b=Y$(m),T=!n&&Aa.createCanvas(),x=n&&{tag:"g",attrs:{},key:"dcl",children:[]},C=I(),D;T&&(T.width=C.width*t,T.height=C.height*t,D=T.getContext("2d")),M(),h&&nO.put(p,T||x),u.image=T,u.svgElement=x,u.svgWidth=C.width,u.svgHeight=C.height;function I(){for(var L=1,N=0,O=_.length;N<O;++N)L=Tk(L,_[N]);for(var B=1,N=0,O=y.length;N<O;++N)B=Tk(B,y[N].length);L*=B;var F=b*_.length*y.length;return{width:Math.max(1,Math.min(L,s.maxTileWidth)),height:Math.max(1,Math.min(F,s.maxTileHeight))}}function M(){D&&(D.clearRect(0,0,T.width,T.height),s.backgroundColor&&(D.fillStyle=s.backgroundColor,D.fillRect(0,0,T.width,T.height)));for(var L=0,N=0;N<m.length;++N)L+=m[N];if(L<=0)return;for(var O=-b,B=0,F=0,U=0;O<C.height;){if(B%2===0){for(var $=F/2%y.length,q=0,Z=0,te=0;q<C.width*2;){for(var J=0,N=0;N<g[U].length;++N)J+=g[U][N];if(J<=0)break;if(Z%2===0){var oe=(1-s.symbolSize)*.5,he=q+g[U][Z]*oe,ue=O+m[B]*oe,Ie=g[U][Z]*s.symbolSize,Oe=m[B]*s.symbolSize,Ue=te/2%y[$].length;me(he,ue,Ie,Oe,y[$][Ue])}q+=g[U][Z],++te,++Z,Z===g[U].length&&(Z=0)}++U,U===g.length&&(U=0)}O+=m[B],++F,++B,B===m.length&&(B=0)}function me(ze,Pe,_e,Me,St){var Re=n?1:t,Ge=cr(St,ze*Re,Pe*Re,_e*Re,Me*Re,s.color,s.symbolKeepAspect);if(n){var Lt=i.painter.renderOneToVNode(Ge);Lt&&x.children.push(Lt)}else oE(D,Ge)}}}}function j$(r){if(!r||r.length===0)return[["rect"]];if(de(r))return[[r]];for(var e=!0,t=0;t<r.length;++t)if(!de(r[t])){e=!1;break}if(e)return j$([r]);for(var i=[],t=0;t<r.length;++t)de(r[t])?i.push([r[t]]):i.push(r[t]);return i}function X$(r){if(!r||r.length===0)return[[0,0]];if(ut(r)){var e=Math.ceil(r);return[[e,e]]}for(var t=!0,i=0;i<r.length;++i)if(!ut(r[i])){t=!1;break}if(t)return X$([r]);for(var n=[],i=0;i<r.length;++i)if(ut(r[i])){var e=Math.ceil(r[i]);n.push([e,e])}else{var e=ae(r[i],function(o){return Math.ceil(o)});e.length%2===1?n.push(e.concat(e)):n.push(e)}return n}function kpe(r){if(!r||typeof r=="object"&&r.length===0)return[0,0];if(ut(r)){var e=Math.ceil(r);return[e,e]}var t=ae(r,function(i){return Math.ceil(i)});return r.length%2?t.concat(t):t}function Rpe(r){return ae(r,function(e){return Y$(e)})}function Y$(r){for(var e=0,t=0;t<r.length;++t)e+=r[t];return r.length%2===1?e*2:e}function Ope(r,e){r.eachRawSeries(function(t){if(!r.isSeriesFiltered(t)){var i=t.getData();i.hasItemVisual()&&i.each(function(s){var o=i.getItemVisual(s,"decal");if(o){var l=i.ensureUniqueItemVisual(s,"style");l.decal=Sf(o,e)}});var n=i.getVisual("decal");if(n){var a=i.getVisual("style");a.decal=Sf(n,e)}}})}var da=new ta,K$={};function Npe(r,e){K$[r]=e}function Z$(r){return K$[r]}var Bpe="5.5.1",Fpe={zrender:"5.6.0"},Upe=1,Vpe=800,zpe=900,Gpe=1e3,Hpe=2e3,$pe=5e3,Q$=1e3,Wpe=1100,lE=2e3,J$=3e3,qpe=4e3,q1=4500,jpe=4600,Xpe=5e3,Ype=6e3,eW=7e3,tW={PROCESSOR:{FILTER:Gpe,SERIES_FILTER:Vpe,STATISTIC:$pe},VISUAL:{LAYOUT:Q$,PROGRESSIVE_LAYOUT:Wpe,GLOBAL:lE,CHART:J$,POST_CHART_LAYOUT:jpe,COMPONENT:qpe,BRUSH:Xpe,CHART_ITEM:q1,ARIA:Ype,DECAL:eW}},ii="__flagInMainProcess",Fi="__pendingUpdate",uT="__needsUpdateStatus",sO=/^[a-zA-Z0-9_]+$/,cT="__connectUpdateStatus",oO=0,Kpe=1,Zpe=2;function rW(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(this.isDisposed()){this.id;return}return nW(this,r,e)}}function iW(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return nW(this,r,e)}}function nW(r,e,t){return t[0]=t[0]&&t[0].toLowerCase(),ta.prototype[e].apply(r,t)}var aW=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e}(ta),sW=aW.prototype;sW.on=iW("on");sW.off=iW("off");var Qc,hT,Hm,xo,fT,dT,pT,Ud,Vd,lO,uO,vT,cO,$m,hO,oW,Mn,fO,o_=function(r){j(e,r);function e(t,i,n){var a=r.call(this,new ape)||this;a._chartsViews=[],a._chartsMap={},a._componentsViews=[],a._componentsMap={},a._pendingActions=[],n=n||{},de(i)&&(i=lW[i]),a._dom=t;var s="canvas",o="auto",l=!1;n.ssr&&W9(function(d){var f=ke(d),p=f.dataIndex;if(p!=null){var v=be();return v.set("series_index",f.seriesIndex),v.set("data_index",p),f.ssrType&&v.set("ssr_type",f.ssrType),v}});var u=a._zr=o2(t,{renderer:n.renderer||s,devicePixelRatio:n.devicePixelRatio,width:n.width,height:n.height,ssr:n.ssr,useDirtyRect:Fe(n.useDirtyRect,l),useCoarsePointer:Fe(n.useCoarsePointer,o),pointerSize:n.pointerSize});a._ssr=n.ssr,a._throttledZrFlush=W1(ge(u.flush,u),17),i=Ee(i),i&&d$(i,!0),a._theme=i,a._locale=vfe(n.locale||WH),a._coordSysMgr=new Kf;var c=a._api=hO(a);function h(d,f){return d.__prio-f.__prio}return Ly(u_,h),Ly(O2,h),a._scheduler=new F$(a,c,O2,u_),a._messageCenter=new aW,a._initEvents(),a.resize=ge(a.resize,a),u.animation.on("frame",a._onframe,a),lO(u,a),uO(u,a),Tv(a),a}return e.prototype._onframe=function(){if(!this._disposed){fO(this);var t=this._scheduler;if(this[Fi]){var i=this[Fi].silent;this[ii]=!0;try{Qc(this),xo.update.call(this,null,this[Fi].updateParams)}catch(l){throw this[ii]=!1,this[Fi]=null,l}this._zr.flush(),this[ii]=!1,this[Fi]=null,Ud.call(this,i),Vd.call(this,i)}else if(t.unfinished){var n=Upe,a=this._model,s=this._api;t.unfinished=!1;do{var o=+new Date;t.performSeriesTasks(a),t.performDataProcessorTasks(a),dT(this,a),t.performVisualTasks(a),$m(this,this._model,s,"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.isSSR=function(){return this._ssr},e.prototype.setOption=function(t,i,n){if(!this[ii]){if(this._disposed){this.id;return}var a,s,o;if(Ae(i)&&(n=i.lazyUpdate,a=i.silent,s=i.replaceMerge,o=i.transition,i=i.notMerge),this[ii]=!0,!this._model||i){var l=new Gfe(this._api),u=this._theme,c=this._model=new eE;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,u,this._locale,l)}this._model.setOption(t,{replaceMerge:s},N2);var h={seriesTransition:o,optionChanged:!0};if(n)this[Fi]={silent:a,updateParams:h},this[ii]=!1,this.getZr().wakeUp();else{try{Qc(this),xo.update.call(this,null,h)}catch(d){throw this[Fi]=null,this[ii]=!1,d}this._ssr||this._zr.flush(),this[Fi]=null,this[ii]=!1,Ud.call(this,a),Vd.call(this,a)}}},e.prototype.setTheme=function(){},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||et.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},e.prototype.renderToCanvas=function(t){t=t||{};var i=this._zr.painter;return i.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(t){t=t||{};var i=this._zr.painter;return i.renderToString({useViewBox:t.useViewBox})},e.prototype.getSvgDataURL=function(){if(et.svgSupported){var t=this._zr,i=t.storage.getDisplayList();return R(i,function(n){n.stopAnimation(null,!0)}),t.painter.toDataURL()}},e.prototype.getDataURL=function(t){if(this._disposed){this.id;return}t=t||{};var i=t.excludeComponents,n=this._model,a=[],s=this;R(i,function(l){n.eachComponent({mainType:l},function(u){var c=s._componentsMap[u.__viewId];c.group.ignore||(a.push(c),c.group.ignore=!0)})});var o=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return R(a,function(l){l.group.ignore=!1}),o},e.prototype.getConnectedDataURL=function(t){if(this._disposed){this.id;return}var i=t.type==="svg",n=this.group,a=Math.min,s=Math.max,o=1/0;if(c_[n]){var l=o,u=o,c=-o,h=-o,d=[],f=t&&t.pixelRatio||this.getDevicePixelRatio();R(Xu,function(_,b){if(_.group===n){var T=i?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(Ee(t)),x=_.getDom().getBoundingClientRect();l=a(x.left,l),u=a(x.top,u),c=s(x.right,c),h=s(x.bottom,h),d.push({dom:T,left:x.left,top:x.top})}}),l*=f,u*=f,c*=f,h*=f;var p=c-l,v=h-u,g=Aa.createCanvas(),m=o2(g,{renderer:i?"svg":"canvas"});if(m.resize({width:p,height:v}),i){var y="";return R(d,function(_){var b=_.left-l,T=_.top-u;y+='<g transform="translate('+b+","+T+')">'+_.dom+"</g>"}),m.painter.getSvgRoot().innerHTML=y,t.connectedBackgroundColor&&m.painter.setBackgroundColor(t.connectedBackgroundColor),m.refreshImmediately(),m.painter.toDataURL()}else return t.connectedBackgroundColor&&m.add(new at({shape:{x:0,y:0,width:p,height:v},style:{fill:t.connectedBackgroundColor}})),R(d,function(_){var b=new Ur({style:{x:_.left*f-l,y:_.top*f-u,image:_.dom}});m.add(b)}),m.refreshImmediately(),g.toDataURL("image/"+(t&&t.type||"png"))}else return this.getDataURL(t)},e.prototype.convertToPixel=function(t,i){return fT(this,"convertToPixel",t,i)},e.prototype.convertFromPixel=function(t,i){return fT(this,"convertFromPixel",t,i)},e.prototype.containPixel=function(t,i){if(this._disposed){this.id;return}var n=this._model,a,s=Xp(n,t);return R(s,function(o,l){l.indexOf("Models")>=0&&R(o,function(u){var c=u.coordinateSystem;if(c&&c.containPoint)a=a||!!c.containPoint(i);else if(l==="seriesModels"){var h=this._chartsMap[u.__viewId];h&&h.containPoint&&(a=a||h.containPoint(i,u))}},this)},this),!!a},e.prototype.getVisual=function(t,i){var n=this._model,a=Xp(n,t,{defaultMainType:"series"}),s=a.seriesModel,o=s.getData(),l=a.hasOwnProperty("dataIndexInside")?a.dataIndexInside:a.hasOwnProperty("dataIndex")?o.indexOfRawIndex(a.dataIndex):null;return l!=null?aE(o,l,i):Cg(o,i)},e.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},e.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},e.prototype._initEvents=function(){var t=this;R(Qpe,function(i){var n=function(a){var s=t.getModel(),o=a.target,l,u=i==="globalout";if(u?l={}:o&&Du(o,function(p){var v=ke(p);if(v&&v.dataIndex!=null){var g=v.dataModel||s.getSeriesByIndex(v.seriesIndex);return l=g&&g.getDataParams(v.dataIndex,v.dataType,o)||{},!0}else if(v.eventData)return l=Q({},v.eventData),!0},!0),l){var c=l.componentType,h=l.componentIndex;(c==="markLine"||c==="markPoint"||c==="markArea")&&(c="series",h=l.seriesIndex);var d=c&&h!=null&&s.getComponent(c,h),f=d&&t[d.mainType==="series"?"_chartsMap":"_componentsMap"][d.__viewId];l.event=a,l.type=i,t._$eventProcessor.eventInfo={targetEl:o,packedEvent:l,model:d,view:f},t.trigger(i,l)}};n.zrEventfulCallAtLast=!0,t._zr.on(i,n,t)}),R(ev,function(i,n){t._messageCenter.on(n,function(a){this.trigger(n,a)},t)}),R(["selectchanged"],function(i){t._messageCenter.on(i,function(n){this.trigger(i,n)},t)}),lpe(this._messageCenter,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var t=this.getDom();t&&rH(this.getDom(),cE,"");var i=this,n=i._api,a=i._model;R(i._componentsViews,function(s){s.dispose(a,n)}),R(i._chartsViews,function(s){s.dispose(a,n)}),i._zr.dispose(),i._dom=i._model=i._chartsMap=i._componentsMap=i._chartsViews=i._componentsViews=i._scheduler=i._api=i._zr=i._throttledZrFlush=i._theme=i._coordSysMgr=i._messageCenter=null,delete Xu[i.id]},e.prototype.resize=function(t){if(!this[ii]){if(this._disposed){this.id;return}this._zr.resize(t);var i=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!i){var n=i.resetOption("media"),a=t&&t.silent;this[Fi]&&(a==null&&(a=this[Fi].silent),n=!0,this[Fi]=null),this[ii]=!0;try{n&&Qc(this),xo.update.call(this,{type:"resize",animation:Q({duration:0},t&&t.animation)})}catch(s){throw this[ii]=!1,s}this[ii]=!1,Ud.call(this,a),Vd.call(this,a)}}},e.prototype.showLoading=function(t,i){if(this._disposed){this.id;return}if(Ae(t)&&(i=t,t=""),t=t||"default",this.hideLoading(),!!B2[t]){var n=B2[t](this._api,i),a=this._zr;this._loadingFX=n,a.add(n)}},e.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},e.prototype.makeActionFromEvent=function(t){var i=Q({},t);return i.type=ev[t.type],i},e.prototype.dispatchAction=function(t,i){if(this._disposed){this.id;return}if(Ae(i)||(i={silent:!!i}),!!l_[t.type]&&this._model){if(this[ii]){this._pendingActions.push(t);return}var n=i.silent;pT.call(this,t,n);var a=i.flush;a?this._zr.flush():a!==!1&&et.browser.weChat&&this._throttledZrFlush(),Ud.call(this,n),Vd.call(this,n)}},e.prototype.updateLabelLayout=function(){da.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(t){if(this._disposed){this.id;return}var i=t.seriesIndex,n=this.getModel(),a=n.getSeriesByIndex(i);a.appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=function(){Qc=function(h){var d=h._scheduler;d.restorePipelines(h._model),d.prepareStageTasks(),hT(h,!0),hT(h,!1),d.plan()},hT=function(h,d){for(var f=h._model,p=h._scheduler,v=d?h._componentsViews:h._chartsViews,g=d?h._componentsMap:h._chartsMap,m=h._zr,y=h._api,_=0;_<v.length;_++)v[_].__alive=!1;d?f.eachComponent(function(x,C){x!=="series"&&b(C)}):f.eachSeries(b);function b(x){var C=x.__requireNewView;x.__requireNewView=!1;var D="_ec_"+x.id+"_"+x.type,I=!C&&g[D];if(!I){var M=es(x.type),L=d?Nt.getClass(M.main,M.sub):Tt.getClass(M.sub);I=new L,I.init(f,y),g[D]=I,v.push(I),m.add(I.group)}x.__viewId=I.__id=D,I.__alive=!0,I.__model=x,I.group.__ecComponentInfo={mainType:x.mainType,index:x.componentIndex},!d&&p.prepareView(I,x,f,y)}for(var _=0;_<v.length;){var T=v[_];T.__alive?_++:(!d&&T.renderTask.dispose(),m.remove(T.group),T.dispose(f,y),v.splice(_,1),g[T.__id]===T&&delete g[T.__id],T.__id=T.group.__ecComponentInfo=null)}},Hm=function(h,d,f,p,v){var g=h._model;if(g.setUpdatePayload(f),!p){R([].concat(h._componentsViews).concat(h._chartsViews),T);return}var m={};m[p+"Id"]=f[p+"Id"],m[p+"Index"]=f[p+"Index"],m[p+"Name"]=f[p+"Name"];var y={mainType:p,query:m};v&&(y.subType=v);var _=f.excludeSeriesId,b;_!=null&&(b=be(),R(wt(_),function(x){var C=Cr(x,null);C!=null&&b.set(C,!0)})),g&&g.eachComponent(y,function(x){var C=b&&b.get(x.id)!=null;if(!C)if(Xk(f))if(x instanceof Ct)f.type===qu&&!f.notBlur&&!x.get(["emphasis","disabled"])&&yhe(x,f,h._api);else{var D=kD(x.mainType,x.componentIndex,f.name,h._api),I=D.focusSelf,M=D.dispatchers;f.type===qu&&I&&!f.notBlur&&m2(x.mainType,x.componentIndex,h._api),M&&R(M,function(L){f.type===qu?Js(L):eo(L)})}else _2(f)&&x instanceof Ct&&(She(x,f,h._api),qk(x),Mn(h))},h),g&&g.eachComponent(y,function(x){var C=b&&b.get(x.id)!=null;C||T(h[p==="series"?"_chartsMap":"_componentsMap"][x.__viewId])},h);function T(x){x&&x.__alive&&x[d]&&x[d](x.__model,g,h._api,f)}},xo={prepareAndUpdate:function(h){Qc(this),xo.update.call(this,h,{optionChanged:h.newOption!=null})},update:function(h,d){var f=this._model,p=this._api,v=this._zr,g=this._coordSysMgr,m=this._scheduler;if(f){f.setUpdatePayload(h),m.restoreData(f,h),m.performSeriesTasks(f),g.create(f,p),m.performDataProcessorTasks(f,h),dT(this,f),g.update(f,p),t(f),m.performVisualTasks(f,h),vT(this,f,p,h,d);var y=f.get("backgroundColor")||"transparent",_=f.get("darkMode");v.setBackgroundColor(y),_!=null&&_!=="auto"&&v.setDarkMode(_),da.trigger("afterupdate",f,p)}},updateTransform:function(h){var d=this,f=this._model,p=this._api;if(f){f.setUpdatePayload(h);var v=[];f.eachComponent(function(m,y){if(m!=="series"){var _=d.getViewOfComponentModel(y);if(_&&_.__alive)if(_.updateTransform){var b=_.updateTransform(y,f,p,h);b&&b.update&&v.push(_)}else v.push(_)}});var g=be();f.eachSeries(function(m){var y=d._chartsMap[m.__viewId];if(y.updateTransform){var _=y.updateTransform(m,f,p,h);_&&_.update&&g.set(m.uid,1)}else g.set(m.uid,1)}),t(f),this._scheduler.performVisualTasks(f,h,{setDirty:!0,dirtyMap:g}),$m(this,f,p,h,{},g),da.trigger("afterupdate",f,p)}},updateView:function(h){var d=this._model;d&&(d.setUpdatePayload(h),Tt.markUpdateMethod(h,"updateView"),t(d),this._scheduler.performVisualTasks(d,h,{setDirty:!0}),vT(this,d,this._api,h,{}),da.trigger("afterupdate",d,this._api))},updateVisual:function(h){var d=this,f=this._model;f&&(f.setUpdatePayload(h),f.eachSeries(function(p){p.getData().clearAllVisual()}),Tt.markUpdateMethod(h,"updateVisual"),t(f),this._scheduler.performVisualTasks(f,h,{visualType:"visual",setDirty:!0}),f.eachComponent(function(p,v){if(p!=="series"){var g=d.getViewOfComponentModel(v);g&&g.__alive&&g.updateVisual(v,f,d._api,h)}}),f.eachSeries(function(p){var v=d._chartsMap[p.__viewId];v.updateVisual(p,f,d._api,h)}),da.trigger("afterupdate",f,this._api))},updateLayout:function(h){xo.update.call(this,h)}},fT=function(h,d,f,p){if(h._disposed){h.id;return}for(var v=h._model,g=h._coordSysMgr.getCoordinateSystems(),m,y=Xp(v,f),_=0;_<g.length;_++){var b=g[_];if(b[d]&&(m=b[d](v,y,p))!=null)return m}},dT=function(h,d){var f=h._chartsMap,p=h._scheduler;d.eachSeries(function(v){p.updateStreamModes(v,f[v.__viewId])})},pT=function(h,d){var f=this,p=this.getModel(),v=h.type,g=h.escapeConnect,m=l_[v],y=m.actionInfo,_=(y.update||"update").split(":"),b=_.pop(),T=_[0]!=null&&es(_[0]);this[ii]=!0;var x=[h],C=!1;h.batch&&(C=!0,x=ae(h.batch,function(B){return B=Ce(Q({},B),h),B.batch=null,B}));var D=[],I,M=_2(h),L=Xk(h);if(L&&wH(this._api),R(x,function(B){if(I=m.action(B,f._model,f._api),I=I||Q({},B),I.type=y.event||I.type,D.push(I),L){var F=CD(h),U=F.queryOptionMap,$=F.mainTypeSpecified,q=$?U.keys()[0]:"series";Hm(f,b,B,q),Mn(f)}else M?(Hm(f,b,B,"series"),Mn(f)):T&&Hm(f,b,B,T.main,T.sub)}),b!=="none"&&!L&&!M&&!T)try{this[Fi]?(Qc(this),xo.update.call(this,h),this[Fi]=null):xo[b].call(this,h)}catch(B){throw this[ii]=!1,B}if(C?I={type:y.event||v,escapeConnect:g,batch:D}:I=D[0],this[ii]=!1,!d){var N=this._messageCenter;if(N.trigger(I.type,I),M){var O={type:"selectchanged",escapeConnect:g,selected:The(p),isFromClick:h.isFromClick||!1,fromAction:h.type,fromActionPayload:h};N.trigger(O.type,O)}}},Ud=function(h){for(var d=this._pendingActions;d.length;){var f=d.shift();pT.call(this,f,h)}},Vd=function(h){!h&&this.trigger("updated")},lO=function(h,d){h.on("rendered",function(f){d.trigger("rendered",f),h.animation.isFinished()&&!d[Fi]&&!d._scheduler.unfinished&&!d._pendingActions.length&&d.trigger("finished")})},uO=function(h,d){h.on("mouseover",function(f){var p=f.target,v=Du(p,Lv);v&&(_he(v,f,d._api),Mn(d))}).on("mouseout",function(f){var p=f.target,v=Du(p,Lv);v&&(bhe(v,f,d._api),Mn(d))}).on("click",function(f){var p=f.target,v=Du(p,function(y){return ke(y).dataIndex!=null},!0);if(v){var g=v.selected?"unselect":"select",m=ke(v);d._api.dispatchAction({type:g,dataType:m.dataType,dataIndexInside:m.dataIndex,seriesIndex:m.seriesIndex,isFromClick:!0})}})};function t(h){h.clearColorPalette(),h.eachSeries(function(d){d.clearColorPalette()})}function i(h){var d=[],f=[],p=!1;if(h.eachComponent(function(y,_){var b=_.get("zlevel")||0,T=_.get("z")||0,x=_.getZLevelKey();p=p||!!x,(y==="series"?f:d).push({zlevel:b,z:T,idx:_.componentIndex,type:y,key:x})}),p){var v=d.concat(f),g,m;Ly(v,function(y,_){return y.zlevel===_.zlevel?y.z-_.z:y.zlevel-_.zlevel}),R(v,function(y){var _=h.getComponent(y.type,y.idx),b=y.zlevel,T=y.key;g!=null&&(b=Math.max(g,b)),T?(b===g&&T!==m&&b++,m=T):m&&(b===g&&b++,m=""),g=b,_.setZLevel(b)})}}vT=function(h,d,f,p,v){i(d),cO(h,d,f,p,v),R(h._chartsViews,function(g){g.__alive=!1}),$m(h,d,f,p,v),R(h._chartsViews,function(g){g.__alive||g.remove(d,f)})},cO=function(h,d,f,p,v,g){R(g||h._componentsViews,function(m){var y=m.__model;u(y,m),m.render(y,d,f,p),o(y,m),c(y,m)})},$m=function(h,d,f,p,v,g){var m=h._scheduler;v=Q(v||{},{updatedSeries:d.getSeries()}),da.trigger("series:beforeupdate",d,f,v);var y=!1;d.eachSeries(function(_){var b=h._chartsMap[_.__viewId];b.__alive=!0;var T=b.renderTask;m.updatePayload(T,p),u(_,b),g&&g.get(_.uid)&&T.dirty(),T.perform(m.getPerformArgs(T))&&(y=!0),b.group.silent=!!_.get("silent"),s(_,b),qk(_)}),m.unfinished=y||m.unfinished,da.trigger("series:layoutlabels",d,f,v),da.trigger("series:transition",d,f,v),d.eachSeries(function(_){var b=h._chartsMap[_.__viewId];o(_,b),c(_,b)}),a(h,d),da.trigger("series:afterupdate",d,f,v)},Mn=function(h){h[uT]=!0,h.getZr().wakeUp()},fO=function(h){h[uT]&&(h.getZr().storage.traverse(function(d){$h(d)||n(d)}),h[uT]=!1)};function n(h){for(var d=[],f=h.currentStates,p=0;p<f.length;p++){var v=f[p];v==="emphasis"||v==="blur"||v==="select"||d.push(v)}h.selected&&h.states.select&&d.push("select"),h.hoverState===M1&&h.states.emphasis?d.push("emphasis"):h.hoverState===_g&&h.states.blur&&d.push("blur"),h.useStates(d)}function a(h,d){var f=h._zr,p=f.storage,v=0;p.traverse(function(g){g.isGroup||v++}),v>d.get("hoverLayerThreshold")&&!et.node&&!et.worker&&d.eachSeries(function(g){if(!g.preventUsingHoverLayer){var m=h._chartsMap[g.__viewId];m.__alive&&m.eachRendered(function(y){y.states.emphasis&&(y.states.emphasis.hoverLayer=!0)})}})}function s(h,d){var f=h.get("blendMode")||null;d.eachRendered(function(p){p.isGroup||(p.style.blend=f)})}function o(h,d){if(!h.preventAutoZ){var f=h.get("z")||0,p=h.get("zlevel")||0;d.eachRendered(function(v){return l(v,f,p,-1/0),!0})}}function l(h,d,f,p){var v=h.getTextContent(),g=h.getTextGuideLine(),m=h.isGroup;if(m)for(var y=h.childrenRef(),_=0;_<y.length;_++)p=Math.max(l(y[_],d,f,p),p);else h.z=d,h.zlevel=f,p=Math.max(h.z2,p);if(v&&(v.z=d,v.zlevel=f,isFinite(p)&&(v.z2=p+2)),g){var b=h.textGuideLineConfig;g.z=d,g.zlevel=f,isFinite(p)&&(g.z2=p+(b&&b.showAbove?1:-1))}return p}function u(h,d){d.eachRendered(function(f){if(!$h(f)){var p=f.getTextContent(),v=f.getTextGuideLine();f.stateTransition&&(f.stateTransition=null),p&&p.stateTransition&&(p.stateTransition=null),v&&v.stateTransition&&(v.stateTransition=null),f.hasState()?(f.prevStates=f.currentStates,f.clearStates()):f.prevStates&&(f.prevStates=null)}})}function c(h,d){var f=h.getModel("stateAnimation"),p=h.isAnimationEnabled(),v=f.get("duration"),g=v>0?{duration:v,delay:f.get("delay"),easing:f.get("easing")}:null;d.eachRendered(function(m){if(m.states&&m.states.emphasis){if($h(m))return;if(m instanceof Je&&Dhe(m),m.__dirty){var y=m.prevStates;y&&m.useStates(y)}if(p){m.stateTransition=g;var _=m.getTextContent(),b=m.getTextGuideLine();_&&(_.stateTransition=g),b&&(b.stateTransition=g)}m.__dirty&&n(m)}})}hO=function(h){return new(function(d){j(f,d);function f(){return d!==null&&d.apply(this,arguments)||this}return f.prototype.getCoordinateSystems=function(){return h._coordSysMgr.getCoordinateSystems()},f.prototype.getComponentByElement=function(p){for(;p;){var v=p.__ecComponentInfo;if(v!=null)return h._model.getComponent(v.mainType,v.index);p=p.parent}},f.prototype.enterEmphasis=function(p,v){Js(p,v),Mn(h)},f.prototype.leaveEmphasis=function(p,v){eo(p,v),Mn(h)},f.prototype.enterBlur=function(p){bH(p),Mn(h)},f.prototype.leaveBlur=function(p){LD(p),Mn(h)},f.prototype.enterSelect=function(p){SH(p),Mn(h)},f.prototype.leaveSelect=function(p){TH(p),Mn(h)},f.prototype.getModel=function(){return h.getModel()},f.prototype.getViewOfComponentModel=function(p){return h.getViewOfComponentModel(p)},f.prototype.getViewOfSeriesModel=function(p){return h.getViewOfSeriesModel(p)},f}(h$))(h)},oW=function(h){function d(f,p){for(var v=0;v<f.length;v++){var g=f[v];g[cT]=p}}R(ev,function(f,p){h._messageCenter.on(p,function(v){if(c_[h.group]&&h[cT]!==oO){if(v&&v.escapeConnect)return;var g=h.makeActionFromEvent(v),m=[];R(Xu,function(y){y!==h&&y.group===h.group&&m.push(y)}),d(m,oO),R(m,function(y){y[cT]!==Kpe&&y.dispatchAction(g)}),d(m,Zpe)}})})}}(),e}(ta),uE=o_.prototype;uE.on=rW("on");uE.off=rW("off");uE.one=function(r,e,t){var i=this;function n(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];e&&e.apply&&e.apply(this,a),i.off(r,n)}this.on.call(this,r,n,t)};var Qpe=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];var l_={},ev={},O2=[],N2=[],u_=[],lW={},B2={},Xu={},c_={},Jpe=+new Date-0,eve=+new Date-0,cE="_echarts_instance_";function hE(r,e,t){var i=!(t&&t.ssr);if(i){var n=fE(r);if(n)return n}var a=new o_(r,e,t);return a.id="ec_"+Jpe++,Xu[a.id]=a,i&&rH(r,cE,a.id),oW(a),da.trigger("afterinit",a),a}function tve(r){if(ie(r)){var e=r;r=null,R(e,function(t){t.group!=null&&(r=t.group)}),r=r||"g_"+eve++,R(e,function(t){t.group=r})}return c_[r]=!0,r}function uW(r){c_[r]=!1}var rve=uW;function ive(r){de(r)?r=Xu[r]:r instanceof o_||(r=fE(r)),r instanceof o_&&!r.isDisposed()&&r.dispose()}function fE(r){return Xu[gce(r,cE)]}function nve(r){return Xu[r]}function dE(r,e){lW[r]=e}function pE(r){Xe(N2,r)<0&&N2.push(r)}function vE(r,e){gE(O2,r,e,Hpe)}function cW(r){j1("afterinit",r)}function hW(r){j1("afterupdate",r)}function j1(r,e){da.on(r,e)}function La(r,e,t){xe(e)&&(t=e,e="");var i=Ae(r)?r.type:[r,r={event:e}][0];r.event=(r.event||i).toLowerCase(),e=r.event,!ev[e]&&(fi(sO.test(i)&&sO.test(e)),l_[i]||(l_[i]={action:t,actionInfo:r}),ev[e]=i)}function fW(r,e){Kf.register(r,e)}function ave(r){var e=Kf.get(r);if(e)return e.getDimensionsInfo?e.getDimensionsInfo():e.dimensions.slice()}function dW(r,e){gE(u_,r,e,Q$,"layout")}function yl(r,e){gE(u_,r,e,J$,"visual")}var dO=[];function gE(r,e,t,i,n){if((xe(e)||Ae(e))&&(t=e,e=i),!(Xe(dO,t)>=0)){dO.push(t);var a=F$.wrapStageHandler(t,n);a.__prio=e,a.__raw=t,r.push(a)}}function mE(r,e){B2[r]=e}function sve(r){o9({createCanvas:r})}function pW(r,e,t){var i=Z$("registerMap");i&&i(r,e,t)}function ove(r){var e=Z$("getMap");return e&&e(r)}var vW=bde;yl(lE,Wde);yl(q1,qde);yl(q1,jde);yl(lE,spe);yl(q1,ope);yl(eW,Ope);pE(d$);vE(zpe,ede);mE("default",Xde);La({type:qu,event:qu,update:qu},tr);La({type:Fy,event:Fy,update:Fy},tr);La({type:Yp,event:Yp,update:Yp},tr);La({type:Uy,event:Uy,update:Uy},tr);La({type:Kp,event:Kp,update:Kp},tr);dE("light",npe);dE("dark",G$);var lve={},pO=[],uve={registerPreprocessor:pE,registerProcessor:vE,registerPostInit:cW,registerPostUpdate:hW,registerUpdateLifecycle:j1,registerAction:La,registerCoordinateSystem:fW,registerLayout:dW,registerVisual:yl,registerTransform:vW,registerLoading:mE,registerMap:pW,registerImpl:Npe,PRIORITY:tW,ComponentModel:Qe,ComponentView:Nt,SeriesModel:Ct,ChartView:Tt,registerComponentModel:function(r){Qe.registerClass(r)},registerComponentView:function(r){Nt.registerClass(r)},registerSeriesModel:function(r){Ct.registerClass(r)},registerChartView:function(r){Tt.registerClass(r)},registerSubTypeDefaulter:function(r,e){Qe.registerSubTypeDefaulter(r,e)},registerPainter:function(r,e){H9(r,e)}};function Ye(r){if(ie(r)){R(r,function(e){Ye(e)});return}Xe(pO,r)>=0||(pO.push(r),xe(r)&&(r={install:r}),r.install(uve))}function zd(r){return r==null?0:r.length||1}function vO(r){return r}var to=function(){function r(e,t,i,n,a,s){this._old=e,this._new=t,this._oldKeyGetter=i||vO,this._newKeyGetter=n||vO,this.context=a,this._diffModeMultiple=s==="multiple"}return r.prototype.add=function(e){return this._add=e,this},r.prototype.update=function(e){return this._update=e,this},r.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},r.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},r.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},r.prototype.remove=function(e){return this._remove=e,this},r.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},r.prototype._executeOneToOne=function(){var e=this._old,t=this._new,i={},n=new Array(e.length),a=new Array(t.length);this._initIndexMap(e,null,n,"_oldKeyGetter"),this._initIndexMap(t,i,a,"_newKeyGetter");for(var s=0;s<e.length;s++){var o=n[s],l=i[o],u=zd(l);if(u>1){var c=l.shift();l.length===1&&(i[o]=l[0]),this._update&&this._update(c,s)}else u===1?(i[o]=null,this._update&&this._update(l,s)):this._remove&&this._remove(s)}this._performRestAdd(a,i)},r.prototype._executeMultiple=function(){var e=this._old,t=this._new,i={},n={},a=[],s=[];this._initIndexMap(e,i,a,"_oldKeyGetter"),this._initIndexMap(t,n,s,"_newKeyGetter");for(var o=0;o<a.length;o++){var l=a[o],u=i[l],c=n[l],h=zd(u),d=zd(c);if(h>1&&d===1)this._updateManyToOne&&this._updateManyToOne(c,u),n[l]=null;else if(h===1&&d>1)this._updateOneToMany&&this._updateOneToMany(c,u),n[l]=null;else if(h===1&&d===1)this._update&&this._update(c,u),n[l]=null;else if(h>1&&d>1)this._updateManyToMany&&this._updateManyToMany(c,u),n[l]=null;else if(h>1)for(var f=0;f<h;f++)this._remove&&this._remove(u[f]);else this._remove&&this._remove(u)}this._performRestAdd(s,n)},r.prototype._performRestAdd=function(e,t){for(var i=0;i<e.length;i++){var n=e[i],a=t[n],s=zd(a);if(s>1)for(var o=0;o<s;o++)this._add&&this._add(a[o]);else s===1&&this._add&&this._add(a);t[n]=null}},r.prototype._initIndexMap=function(e,t,i,n){for(var a=this._diffModeMultiple,s=0;s<e.length;s++){var o="_ec_"+this[n](e[s],s);if(a||(i[s]=o),!!t){var l=t[o],u=zd(l);u===0?(t[o]=s,a&&i.push(o)):u===1?t[o]=[l,s]:l.push(s)}}},r}(),cve=function(){function r(e,t){this._encode=e,this._schema=t}return r.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},r.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},r}();function hve(r,e){var t={},i=t.encode={},n=be(),a=[],s=[],o={};R(r.dimensions,function(d){var f=r.getDimensionInfo(d),p=f.coordDim;if(p){var v=f.coordDimIndex;gT(i,p)[v]=d,f.isExtraCoord||(n.set(p,1),fve(f.type)&&(a[0]=d),gT(o,p)[v]=r.getDimensionIndex(f.name)),f.defaultTooltip&&s.push(d)}n$.each(function(g,m){var y=gT(i,m),_=f.otherDims[m];_!=null&&_!==!1&&(y[_]=f.name)})});var l=[],u={};n.each(function(d,f){var p=i[f];u[f]=p[0],l=l.concat(p)}),t.dataDimsOnCoord=l,t.dataDimIndicesOnCoord=ae(l,function(d){return r.getDimensionInfo(d).storeDimIndex}),t.encodeFirstDimNotExtra=u;var c=i.label;c&&c.length&&(a=c.slice());var h=i.tooltip;return h&&h.length?s=h.slice():s.length||(s=a.slice()),i.defaultedLabel=a,i.defaultedTooltip=s,t.userOutput=new cve(o,e),t}function gT(r,e){return r.hasOwnProperty(e)||(r[e]=[]),r[e]}function h_(r){return r==="category"?"ordinal":r==="time"?"time":"float"}function fve(r){return!(r==="ordinal"||r==="time")}var $y=function(){function r(e){this.otherDims={},e!=null&&Q(this,e)}return r}(),dve=lt(),pve={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},gW=function(){function r(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return r.prototype.isDimensionOmitted=function(){return this._dimOmitted},r.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||(this._dimNameMap=_W(this.source)))},r.prototype.getSourceDimensionIndex=function(e){return Fe(this._dimNameMap.get(e),-1)},r.prototype.getSourceDimension=function(e){var t=this.source.dimensionsDefine;if(t)return t[e]},r.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,t=v$(this.source),i=!bW(e),n="",a=[],s=0,o=0;s<e;s++){var l=void 0,u=void 0,c=void 0,h=this.dimensions[o];if(h&&h.storeDimIndex===s)l=t?h.name:null,u=h.type,c=h.ordinalMeta,o++;else{var d=this.getSourceDimension(s);d&&(l=t?d.name:null,u=d.type)}a.push({property:l,type:u,ordinalMeta:c}),t&&l!=null&&(!h||!h.isCalculationCoord)&&(n+=i?l.replace(/\`/g,"`1").replace(/\$/g,"`2"):l),n+="$",n+=pve[u]||"f",c&&(n+=c.uid),n+="$"}var f=this.source,p=[f.seriesLayoutBy,f.startIndex,n].join("$$");return{dimensions:a,hash:p}},r.prototype.makeOutputDimensionNames=function(){for(var e=[],t=0,i=0;t<this._fullDimCount;t++){var n=void 0,a=this.dimensions[i];if(a&&a.storeDimIndex===t)a.isCalculationCoord||(n=a.name),i++;else{var s=this.getSourceDimension(t);s&&(n=s.name)}e.push(n)}return e},r.prototype.appendCalculationDimension=function(e){this.dimensions.push(e),e.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},r}();function mW(r){return r instanceof gW}function yW(r){for(var e=be(),t=0;t<(r||[]).length;t++){var i=r[t],n=Ae(i)?i.name:i;n!=null&&e.get(n)==null&&e.set(n,t)}return e}function _W(r){var e=dve(r);return e.dimNameMap||(e.dimNameMap=yW(r.dimensionsDefine))}function bW(r){return r>30}var Gd=Ae,wo=ae,vve=typeof Int32Array>"u"?Array:Int32Array,gve="e\0\0",gO=-1,mve=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],yve=["_approximateExtent"],mO,Wm,Hd,$d,mT,qm,yT,hi=function(){function r(e,t){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var i,n=!1;mW(e)?(i=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(n=!0,i=e),i=i||["x","y"];for(var a={},s=[],o={},l=!1,u={},c=0;c<i.length;c++){var h=i[c],d=de(h)?new $y({name:h}):h instanceof $y?h:new $y(h),f=d.name;d.type=d.type||"float",d.coordDim||(d.coordDim=f,d.coordDimIndex=0);var p=d.otherDims=d.otherDims||{};s.push(f),a[f]=d,u[f]!=null&&(l=!0),d.createInvertedIndices&&(o[f]=[]),p.itemName===0&&(this._nameDimIdx=c),p.itemId===0&&(this._idDimIdx=c),n&&(d.storeDimIndex=c)}if(this.dimensions=s,this._dimInfos=a,this._initGetDimensionInfo(l),this.hostModel=t,this._invertedIndicesMap=o,this._dimOmitted){var v=this._dimIdxToName=be();R(s,function(g){v.set(a[g].storeDimIndex,g)})}}return r.prototype.getDimension=function(e){var t=this._recognizeDimIndex(e);if(t==null)return e;if(t=e,!this._dimOmitted)return this.dimensions[t];var i=this._dimIdxToName.get(t);if(i!=null)return i;var n=this._schema.getSourceDimension(t);if(n)return n.name},r.prototype.getDimensionIndex=function(e){var t=this._recognizeDimIndex(e);if(t!=null)return t;if(e==null)return-1;var i=this._getDimInfo(e);return i?i.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(e):-1},r.prototype._recognizeDimIndex=function(e){if(ut(e)||e!=null&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(e)<0))return+e},r.prototype._getStoreDimIndex=function(e){var t=this.getDimensionIndex(e);return t},r.prototype.getDimensionInfo=function(e){return this._getDimInfo(this.getDimension(e))},r.prototype._initGetDimensionInfo=function(e){var t=this._dimInfos;this._getDimInfo=e?function(i){return t.hasOwnProperty(i)?t[i]:void 0}:function(i){return t[i]}},r.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},r.prototype.mapDimension=function(e,t){var i=this._dimSummary;if(t==null)return i.encodeFirstDimNotExtra[e];var n=i.encode[e];return n?n[t]:null},r.prototype.mapDimensionsAll=function(e){var t=this._dimSummary,i=t.encode[e];return(i||[]).slice()},r.prototype.getStore=function(){return this._store},r.prototype.initData=function(e,t,i){var n=this,a;if(e instanceof E2&&(a=e),!a){var s=this.dimensions,o=tE(e)||Jr(e)?new g$(e,s.length):e;a=new E2;var l=wo(s,function(u){return{type:n._dimInfos[u].type,property:u}});a.initData(o,l,i)}this._store=a,this._nameList=(t||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,a.count()),this._dimSummary=hve(this,this._schema),this.userOutput=this._dimSummary.userOutput},r.prototype.appendData=function(e){var t=this._store.appendData(e);this._doInit(t[0],t[1])},r.prototype.appendValues=function(e,t){var i=this._store.appendValues(e,t.length),n=i.start,a=i.end,s=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),t)for(var o=n;o<a;o++){var l=o-n;this._nameList[o]=t[l],s&&yT(this,o)}},r.prototype._updateOrdinalMeta=function(){for(var e=this._store,t=this.dimensions,i=0;i<t.length;i++){var n=this._dimInfos[t[i]];n.ordinalMeta&&e.collectOrdinalMeta(n.storeDimIndex,n.ordinalMeta)}},r.prototype._shouldMakeIdFromName=function(){var e=this._store.getProvider();return this._idDimIdx==null&&e.getSource().sourceFormat!==Qo&&!e.fillStorage},r.prototype._doInit=function(e,t){if(!(e>=t)){var i=this._store,n=i.getProvider();this._updateOrdinalMeta();var a=this._nameList,s=this._idList,o=n.getSource().sourceFormat,l=o===ia;if(l&&!n.pure)for(var u=[],c=e;c<t;c++){var h=n.getItem(c,u);if(!this.hasItemOption&&ice(h)&&(this.hasItemOption=!0),h){var d=h.name;a[c]==null&&d!=null&&(a[c]=Cr(d,null));var f=h.id;s[c]==null&&f!=null&&(s[c]=Cr(f,null))}}if(this._shouldMakeIdFromName())for(var c=e;c<t;c++)yT(this,c);mO(this)}},r.prototype.getApproximateExtent=function(e){return this._approximateExtent[e]||this._store.getDataExtent(this._getStoreDimIndex(e))},r.prototype.setApproximateExtent=function(e,t){t=this.getDimension(t),this._approximateExtent[t]=e.slice()},r.prototype.getCalculationInfo=function(e){return this._calculationInfo[e]},r.prototype.setCalculationInfo=function(e,t){Gd(e)?Q(this._calculationInfo,e):this._calculationInfo[e]=t},r.prototype.getName=function(e){var t=this.getRawIndex(e),i=this._nameList[t];return i==null&&this._nameDimIdx!=null&&(i=Hd(this,this._nameDimIdx,t)),i==null&&(i=""),i},r.prototype._getCategory=function(e,t){var i=this._store.get(e,t),n=this._store.getOrdinalMeta(e);return n?n.categories[i]:i},r.prototype.getId=function(e){return Wm(this,this.getRawIndex(e))},r.prototype.count=function(){return this._store.count()},r.prototype.get=function(e,t){var i=this._store,n=this._dimInfos[e];if(n)return i.get(n.storeDimIndex,t)},r.prototype.getByRawIndex=function(e,t){var i=this._store,n=this._dimInfos[e];if(n)return i.getByRawIndex(n.storeDimIndex,t)},r.prototype.getIndices=function(){return this._store.getIndices()},r.prototype.getDataExtent=function(e){return this._store.getDataExtent(this._getStoreDimIndex(e))},r.prototype.getSum=function(e){return this._store.getSum(this._getStoreDimIndex(e))},r.prototype.getMedian=function(e){return this._store.getMedian(this._getStoreDimIndex(e))},r.prototype.getValues=function(e,t){var i=this,n=this._store;return ie(e)?n.getValues(wo(e,function(a){return i._getStoreDimIndex(a)}),t):n.getValues(e)},r.prototype.hasValue=function(e){for(var t=this._dimSummary.dataDimIndicesOnCoord,i=0,n=t.length;i<n;i++)if(isNaN(this._store.get(t[i],e)))return!1;return!0},r.prototype.indexOfName=function(e){for(var t=0,i=this._store.count();t<i;t++)if(this.getName(t)===e)return t;return-1},r.prototype.getRawIndex=function(e){return this._store.getRawIndex(e)},r.prototype.indexOfRawIndex=function(e){return this._store.indexOfRawIndex(e)},r.prototype.rawIndexOf=function(e,t){var i=e&&this._invertedIndicesMap[e],n=i[t];return n==null||isNaN(n)?gO:n},r.prototype.indicesOfNearest=function(e,t,i){return this._store.indicesOfNearest(this._getStoreDimIndex(e),t,i)},r.prototype.each=function(e,t,i){xe(e)&&(i=t,t=e,e=[]);var n=i||this,a=wo($d(e),this._getStoreDimIndex,this);this._store.each(a,n?ge(t,n):t)},r.prototype.filterSelf=function(e,t,i){xe(e)&&(i=t,t=e,e=[]);var n=i||this,a=wo($d(e),this._getStoreDimIndex,this);return this._store=this._store.filter(a,n?ge(t,n):t),this},r.prototype.selectRange=function(e){var t=this,i={},n=rt(e);return R(n,function(a){var s=t._getStoreDimIndex(a);i[s]=e[a]}),this._store=this._store.selectRange(i),this},r.prototype.mapArray=function(e,t,i){xe(e)&&(i=t,t=e,e=[]),i=i||this;var n=[];return this.each(e,function(){n.push(t&&t.apply(this,arguments))},i),n},r.prototype.map=function(e,t,i,n){var a=i||n||this,s=wo($d(e),this._getStoreDimIndex,this),o=qm(this);return o._store=this._store.map(s,a?ge(t,a):t),o},r.prototype.modify=function(e,t,i,n){var a=i||n||this,s=wo($d(e),this._getStoreDimIndex,this);this._store.modify(s,a?ge(t,a):t)},r.prototype.downSample=function(e,t,i,n){var a=qm(this);return a._store=this._store.downSample(this._getStoreDimIndex(e),t,i,n),a},r.prototype.lttbDownSample=function(e,t){var i=qm(this);return i._store=this._store.lttbDownSample(this._getStoreDimIndex(e),t),i},r.prototype.getRawDataItem=function(e){return this._store.getRawDataItem(e)},r.prototype.getItemModel=function(e){var t=this.hostModel,i=this.getRawDataItem(e);return new ft(i,t,t&&t.ecModel)},r.prototype.diff=function(e){var t=this;return new to(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(i){return Wm(e,i)},function(i){return Wm(t,i)})},r.prototype.getVisual=function(e){var t=this._visual;return t&&t[e]},r.prototype.setVisual=function(e,t){this._visual=this._visual||{},Gd(e)?Q(this._visual,e):this._visual[e]=t},r.prototype.getItemVisual=function(e,t){var i=this._itemVisuals[e],n=i&&i[t];return n??this.getVisual(t)},r.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},r.prototype.ensureUniqueItemVisual=function(e,t){var i=this._itemVisuals,n=i[e];n||(n=i[e]={});var a=n[t];return a==null&&(a=this.getVisual(t),ie(a)?a=a.slice():Gd(a)&&(a=Q({},a)),n[t]=a),a},r.prototype.setItemVisual=function(e,t,i){var n=this._itemVisuals[e]||{};this._itemVisuals[e]=n,Gd(t)?Q(n,t):n[t]=i},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(e,t){Gd(e)?Q(this._layout,e):this._layout[e]=t},r.prototype.getLayout=function(e){return this._layout[e]},r.prototype.getItemLayout=function(e){return this._itemLayouts[e]},r.prototype.setItemLayout=function(e,t,i){this._itemLayouts[e]=i?Q(this._itemLayouts[e]||{},t):t},r.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},r.prototype.setItemGraphicEl=function(e,t){var i=this.hostModel&&this.hostModel.seriesIndex;v2(i,this.dataType,e,t),this._graphicEls[e]=t},r.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},r.prototype.eachItemGraphicEl=function(e,t){R(this._graphicEls,function(i,n){i&&e&&e.call(t,i,n)})},r.prototype.cloneShallow=function(e){return e||(e=new r(this._schema?this._schema:wo(this.dimensions,this._getDimInfo,this),this.hostModel)),mT(e,this),e._store=this._store,e},r.prototype.wrapMethod=function(e,t){var i=this[e];xe(i)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var n=i.apply(this,arguments);return t.apply(this,[n].concat(_1(arguments)))})},r.internalField=function(){mO=function(e){var t=e._invertedIndicesMap;R(t,function(i,n){var a=e._dimInfos[n],s=a.ordinalMeta,o=e._store;if(s){i=t[n]=new vve(s.categories.length);for(var l=0;l<i.length;l++)i[l]=gO;for(var l=0;l<o.count();l++)i[o.get(a.storeDimIndex,l)]=l}})},Hd=function(e,t,i){return Cr(e._getCategory(t,i),null)},Wm=function(e,t){var i=e._idList[t];return i==null&&e._idDimIdx!=null&&(i=Hd(e,e._idDimIdx,t)),i==null&&(i=gve+t),i},$d=function(e){return ie(e)||(e=e!=null?[e]:[]),e},qm=function(e){var t=new r(e._schema?e._schema:wo(e.dimensions,e._getDimInfo,e),e.hostModel);return mT(t,e),t},mT=function(e,t){R(mve.concat(t.__wrappedMethods||[]),function(i){t.hasOwnProperty(i)&&(e[i]=t[i])}),e.__wrappedMethods=t.__wrappedMethods,R(yve,function(i){e[i]=Ee(t[i])}),e._calculationInfo=Q({},t._calculationInfo)},yT=function(e,t){var i=e._nameList,n=e._idList,a=e._nameDimIdx,s=e._idDimIdx,o=i[t],l=n[t];if(o==null&&a!=null&&(i[t]=o=Hd(e,a,t)),l==null&&s!=null&&(n[t]=l=Hd(e,s,t)),l==null&&o!=null){var u=e._nameRepeatCount,c=u[o]=(u[o]||0)+1;l=o,c>1&&(l+="__ec__"+c),n[t]=l}}}(),r}();function _ve(r,e){return ed(r,e).dimensions}function ed(r,e){tE(r)||(r=rE(r)),e=e||{};var t=e.coordDimensions||[],i=e.dimensionsDefine||r.dimensionsDefine||[],n=be(),a=[],s=Sve(r,t,i,e.dimensionsCount),o=e.canOmitUnusedDimensions&&bW(s),l=i===r.dimensionsDefine,u=l?_W(r):yW(i),c=e.encodeDefine;!c&&e.encodeDefaulter&&(c=e.encodeDefaulter(r,s));for(var h=be(c),d=new w$(s),f=0;f<d.length;f++)d[f]=-1;function p(I){var M=d[I];if(M<0){var L=i[I],N=Ae(L)?L:{name:L},O=new $y,B=N.name;B!=null&&u.get(B)!=null&&(O.name=O.displayName=B),N.type!=null&&(O.type=N.type),N.displayName!=null&&(O.displayName=N.displayName);var F=a.length;return d[I]=F,O.storeDimIndex=I,a.push(O),O}return a[M]}if(!o)for(var f=0;f<s;f++)p(f);h.each(function(I,M){var L=wt(I).slice();if(L.length===1&&!de(L[0])&&L[0]<0){h.set(M,!1);return}var N=h.set(M,[]);R(L,function(O,B){var F=de(O)?u.get(O):O;F!=null&&F<s&&(N[B]=F,g(p(F),M,B))})});var v=0;R(t,function(I){var M,L,N,O;if(de(I))M=I,O={};else{O=I,M=O.name;var B=O.ordinalMeta;O.ordinalMeta=null,O=Q({},O),O.ordinalMeta=B,L=O.dimsDef,N=O.otherDims,O.name=O.coordDim=O.coordDimIndex=O.dimsDef=O.otherDims=null}var F=h.get(M);if(F!==!1){if(F=wt(F),!F.length)for(var U=0;U<(L&&L.length||1);U++){for(;v<s&&p(v).coordDim!=null;)v++;v<s&&F.push(v++)}R(F,function($,q){var Z=p($);if(l&&O.type!=null&&(Z.type=O.type),g(Ce(Z,O),M,q),Z.name==null&&L){var te=L[q];!Ae(te)&&(te={name:te}),Z.name=Z.displayName=te.name,Z.defaultTooltip=te.defaultTooltip}N&&Ce(Z.otherDims,N)})}});function g(I,M,L){n$.get(M)!=null?I.otherDims[M]=L:(I.coordDim=M,I.coordDimIndex=L,n.set(M,!0))}var m=e.generateCoord,y=e.generateCoordCount,_=y!=null;y=m?y||1:0;var b=m||"value";function T(I){I.name==null&&(I.name=I.coordDim)}if(o)R(a,function(I){T(I)}),a.sort(function(I,M){return I.storeDimIndex-M.storeDimIndex});else for(var x=0;x<s;x++){var C=p(x),D=C.coordDim;D==null&&(C.coordDim=Tve(b,n,_),C.coordDimIndex=0,(!m||y<=0)&&(C.isExtraCoord=!0),y--),T(C),C.type==null&&(l$(r,x)===Xr.Must||C.isExtraCoord&&(C.otherDims.itemName!=null||C.otherDims.seriesName!=null))&&(C.type="ordinal")}return bve(a),new gW({source:r,dimensions:a,fullDimensionCount:s,dimensionOmitted:o})}function bve(r){for(var e=be(),t=0;t<r.length;t++){var i=r[t],n=i.name,a=e.get(n)||0;a>0&&(i.name=n+(a-1)),a++,e.set(n,a)}}function Sve(r,e,t,i){var n=Math.max(r.dimensionsDetectedCount||1,e.length,t.length,i||0);return R(e,function(a){var s;Ae(a)&&(s=a.dimsDef)&&(n=Math.max(n,s.length))}),n}function Tve(r,e,t){if(t||e.hasKey(r)){for(var i=0;e.hasKey(r+i);)i++;r+=i}return e.set(r,!0),r}var xve=function(){function r(e){this.coordSysDims=[],this.axisMap=be(),this.categoryAxisMap=be(),this.coordSysName=e}return r}();function wve(r){var e=r.get("coordinateSystem"),t=new xve(e),i=Cve[e];if(i)return i(r,t,t.axisMap,t.categoryAxisMap),t}var Cve={cartesian2d:function(r,e,t,i){var n=r.getReferringComponents("xAxis",_r).models[0],a=r.getReferringComponents("yAxis",_r).models[0];e.coordSysDims=["x","y"],t.set("x",n),t.set("y",a),Jc(n)&&(i.set("x",n),e.firstCategoryDimIndex=0),Jc(a)&&(i.set("y",a),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(r,e,t,i){var n=r.getReferringComponents("singleAxis",_r).models[0];e.coordSysDims=["single"],t.set("single",n),Jc(n)&&(i.set("single",n),e.firstCategoryDimIndex=0)},polar:function(r,e,t,i){var n=r.getReferringComponents("polar",_r).models[0],a=n.findAxisModel("radiusAxis"),s=n.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],t.set("radius",a),t.set("angle",s),Jc(a)&&(i.set("radius",a),e.firstCategoryDimIndex=0),Jc(s)&&(i.set("angle",s),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(r,e,t,i){e.coordSysDims=["lng","lat"]},parallel:function(r,e,t,i){var n=r.ecModel,a=n.getComponent("parallel",r.get("parallelIndex")),s=e.coordSysDims=a.dimensions.slice();R(a.parallelAxisIndex,function(o,l){var u=n.getComponent("parallelAxis",o),c=s[l];t.set(c,u),Jc(u)&&(i.set(c,u),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=l))})}};function Jc(r){return r.get("type")==="category"}function SW(r,e,t){t=t||{};var i=t.byIndex,n=t.stackedCoordDimension,a,s,o;Ave(e)?a=e:(s=e.schema,a=s.dimensions,o=e.store);var l=!!(r&&r.get("stack")),u,c,h,d;if(R(a,function(y,_){de(y)&&(a[_]=y={name:y}),l&&!y.isExtraCoord&&(!i&&!u&&y.ordinalMeta&&(u=y),!c&&y.type!=="ordinal"&&y.type!=="time"&&(!n||n===y.coordDim)&&(c=y))}),c&&!i&&!u&&(i=!0),c){h="__\0ecstackresult_"+r.id,d="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var f=c.coordDim,p=c.type,v=0;R(a,function(y){y.coordDim===f&&v++});var g={name:h,coordDim:f,coordDimIndex:v,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},m={name:d,coordDim:d,coordDimIndex:v+1,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};s?(o&&(g.storeDimIndex=o.ensureCalculationDimension(d,p),m.storeDimIndex=o.ensureCalculationDimension(h,p)),s.appendCalculationDimension(g),s.appendCalculationDimension(m)):(a.push(g),a.push(m))}return{stackedDimension:c&&c.name,stackedByDimension:u&&u.name,isStackedByIndex:i,stackedOverDimension:d,stackResultDimension:h}}function Ave(r){return!mW(r.schema)}function ro(r,e){return!!e&&e===r.getCalculationInfo("stackedDimension")}function yE(r,e){return ro(r,e)?r.getCalculationInfo("stackResultDimension"):e}function Dve(r,e){var t=r.get("coordinateSystem"),i=Kf.get(t),n;return e&&e.coordSysDims&&(n=ae(e.coordSysDims,function(a){var s={name:a},o=e.axisMap.get(a);if(o){var l=o.get("type");s.type=h_(l)}return s})),n||(n=i&&(i.getDimensionsInfo?i.getDimensionsInfo():i.dimensions.slice())||["x","y"]),n}function Eve(r,e,t){var i,n;return t&&R(r,function(a,s){var o=a.coordDim,l=t.categoryAxisMap.get(o);l&&(i==null&&(i=s),a.ordinalMeta=l.getOrdinalMeta(),e&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(n=!0)}),!n&&i!=null&&(r[i].otherDims.itemName=0),i}function _s(r,e,t){t=t||{};var i=e.getSourceManager(),n,a=!1;r?(a=!0,n=rE(r)):(n=i.getSource(),a=n.sourceFormat===ia);var s=wve(e),o=Dve(e,s),l=t.useEncodeDefaulter,u=xe(l)?l:l?Be(o$,o,e):null,c={coordDimensions:o,generateCoord:t.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!a},h=ed(n,c),d=Eve(h.dimensions,t.createInvertedIndices,s),f=a?null:i.getSharedDataStore(h),p=SW(e,{schema:h,store:f}),v=new hi(h,e);v.setCalculationInfo(p);var g=d!=null&&Ive(n)?function(m,y,_,b){return b===d?_:this.defaultDimValueGetter(m,y,_,b)}:null;return v.hasItemOption=!1,v.initData(a?n:f,null,g),v}function Ive(r){if(r.sourceFormat===ia){var e=Pve(r.data||[]);return!ie(Ff(e))}}function Pve(r){for(var e=0;e<r.length&&r[e]==null;)e++;return r[e]}var bs=function(){function r(e){this._setting=e||{},this._extent=[1/0,-1/0]}return r.prototype.getSetting=function(e){return this._setting[e]},r.prototype.unionExtent=function(e){var t=this._extent;e[0]<t[0]&&(t[0]=e[0]),e[1]>t[1]&&(t[1]=e[1])},r.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(e,t){var i=this._extent;isNaN(e)||(i[0]=e),isNaN(t)||(i[1]=t)},r.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},r.prototype.isBlank=function(){return this._isBlank},r.prototype.setBlank=function(e){this._isBlank=e},r}();D1(bs);var Mve=0,F2=function(){function r(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++Mve}return r.createByAxisModel=function(e){var t=e.option,i=t.data,n=i&&ae(i,Lve);return new r({categories:n,needCollect:!n,deduplication:t.dedplication!==!1})},r.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},r.prototype.parseAndCollect=function(e){var t,i=this._needCollect;if(!de(e)&&!i)return e;if(i&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,t;var n=this._getOrCreateMap();return t=n.get(e),t==null&&(i?(t=this.categories.length,this.categories[t]=e,n.set(e,t)):t=NaN),t},r.prototype._getOrCreateMap=function(){return this._map||(this._map=be(this.categories))},r}();function Lve(r){return Ae(r)&&r.value!=null?r.value:r+""}function U2(r){return r.type==="interval"||r.type==="log"}function kve(r,e,t,i){var n={},a=r[1]-r[0],s=n.interval=TD(a/e,!0);t!=null&&s<t&&(s=n.interval=t),i!=null&&s>i&&(s=n.interval=i);var o=n.intervalPrecision=TW(s),l=n.niceTickExtent=[Yt(Math.ceil(r[0]/s)*s,o),Yt(Math.floor(r[1]/s)*s,o)];return Rve(l,r),n}function _T(r){var e=Math.pow(10,A1(r)),t=r/e;return t?t===2?t=3:t===3?t=5:t*=2:t=1,Yt(t*e)}function TW(r){return ma(r)+2}function yO(r,e,t){r[e]=Math.max(Math.min(r[e],t[1]),t[0])}function Rve(r,e){!isFinite(r[0])&&(r[0]=e[0]),!isFinite(r[1])&&(r[1]=e[1]),yO(r,0,e),yO(r,1,e),r[0]>r[1]&&(r[0]=r[1])}function X1(r,e){return r>=e[0]&&r<=e[1]}function Y1(r,e){return e[1]===e[0]?.5:(r-e[0])/(e[1]-e[0])}function K1(r,e){return r*(e[1]-e[0])+e[0]}var Z1=function(r){j(e,r);function e(t){var i=r.call(this,t)||this;i.type="ordinal";var n=i.getSetting("ordinalMeta");return n||(n=new F2({})),ie(n)&&(n=new F2({categories:ae(n,function(a){return Ae(a)?a.value:a})})),i._ordinalMeta=n,i._extent=i.getSetting("extent")||[0,n.categories.length-1],i}return e.prototype.parse=function(t){return t==null?NaN:de(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return t=this.parse(t),X1(t,this._extent)&&this._ordinalMeta.categories[t]!=null},e.prototype.normalize=function(t){return t=this._getTickNumber(this.parse(t)),Y1(t,this._extent)},e.prototype.scale=function(t){return t=Math.round(K1(t,this._extent)),this.getRawOrdinalNumber(t)},e.prototype.getTicks=function(){for(var t=[],i=this._extent,n=i[0];n<=i[1];)t.push({value:n}),n++;return t},e.prototype.getMinorTicks=function(t){},e.prototype.setSortInfo=function(t){if(t==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var i=t.ordinalNumbers,n=this._ordinalNumbersByTick=[],a=this._ticksByOrdinalNumber=[],s=0,o=this._ordinalMeta.categories.length,l=Math.min(o,i.length);s<l;++s){var u=i[s];n[s]=u,a[u]=s}for(var c=0;s<o;++s){for(;a[c]!=null;)c++;n.push(c),a[c]=s}},e.prototype._getTickNumber=function(t){var i=this._ticksByOrdinalNumber;return i&&t>=0&&t<i.length?i[t]:t},e.prototype.getRawOrdinalNumber=function(t){var i=this._ordinalNumbersByTick;return i&&t>=0&&t<i.length?i[t]:t},e.prototype.getLabel=function(t){if(!this.isBlank()){var i=this.getRawOrdinalNumber(t.value),n=this._ordinalMeta.categories[i];return n==null?"":n+""}},e.prototype.count=function(){return this._extent[1]-this._extent[0]+1},e.prototype.unionExtentFromData=function(t,i){this.unionExtent(t.getApproximateExtent(i))},e.prototype.isInExtentRange=function(t){return t=this._getTickNumber(t),this._extent[0]<=t&&this._extent[1]>=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(bs);bs.registerClass(Z1);var Jl=Yt,io=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}return e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return X1(t,this._extent)},e.prototype.normalize=function(t){return Y1(t,this._extent)},e.prototype.scale=function(t){return K1(t,this._extent)},e.prototype.setExtent=function(t,i){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(i)||(n[1]=parseFloat(i))},e.prototype.unionExtent=function(t){var i=this._extent;t[0]<i[0]&&(i[0]=t[0]),t[1]>i[1]&&(i[1]=t[1]),this.setExtent(i[0],i[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=TW(t)},e.prototype.getTicks=function(t){var i=this._interval,n=this._extent,a=this._niceExtent,s=this._intervalPrecision,o=[];if(!i)return o;var l=1e4;n[0]<a[0]&&(t?o.push({value:Jl(a[0]-i,s)}):o.push({value:n[0]}));for(var u=a[0];u<=a[1]&&(o.push({value:u}),u=Jl(u+i,s),u!==o[o.length-1].value);)if(o.length>l)return[];var c=o.length?o[o.length-1].value:a[1];return n[1]>c&&(t?o.push({value:Jl(c+i,s)}):o.push({value:n[1]})),o},e.prototype.getMinorTicks=function(t){for(var i=this.getTicks(!0),n=[],a=this.getExtent(),s=1;s<i.length;s++){for(var o=i[s],l=i[s-1],u=0,c=[],h=o.value-l.value,d=h/t;u<t-1;){var f=Jl(l.value+(u+1)*d);f>a[0]&&f<a[1]&&c.push(f),u++}n.push(c)}return n},e.prototype.getLabel=function(t,i){if(t==null)return"";var n=i&&i.precision;n==null?n=ma(t.value)||0:n==="auto"&&(n=this._intervalPrecision);var a=Jl(t.value,n,!0);return jD(a)},e.prototype.calcNiceTicks=function(t,i,n){t=t||5;var a=this._extent,s=a[1]-a[0];if(isFinite(s)){s<0&&(s=-s,a.reverse());var o=kve(a,t,i,n);this._intervalPrecision=o.intervalPrecision,this._interval=o.interval,this._niceExtent=o.niceTickExtent}},e.prototype.calcNiceExtent=function(t){var i=this._extent;if(i[0]===i[1])if(i[0]!==0){var n=Math.abs(i[0]);t.fixMax||(i[1]+=n/2),i[0]-=n/2}else i[1]=1;var a=i[1]-i[0];isFinite(a)||(i[0]=0,i[1]=1),this.calcNiceTicks(t.splitNumber,t.minInterval,t.maxInterval);var s=this._interval;t.fixMin||(i[0]=Jl(Math.floor(i[0]/s)*s)),t.fixMax||(i[1]=Jl(Math.ceil(i[1]/s)*s))},e.prototype.setNiceExtent=function(t,i){this._niceExtent=[t,i]},e.type="interval",e}(bs);bs.registerClass(io);var xW=typeof Float32Array<"u",Ove=xW?Float32Array:Array;function ts(r){return ie(r)?xW?new Float32Array(r):r:new Ove(r)}var V2="__ec_stack_";function _E(r){return r.get("stack")||V2+r.seriesIndex}function bE(r){return r.dim+r.index}function Nve(r){var e=[],t=r.axis,i="axis0";if(t.type==="category"){for(var n=t.getBandWidth(),a=0;a<r.count;a++)e.push(Ce({bandWidth:n,axisKey:i,stackId:V2+a},r));for(var s=AW(e),o=[],a=0;a<r.count;a++){var l=s[i][V2+a];l.offsetCenter=l.offset+l.width/2,o.push(l)}return o}}function wW(r,e){var t=[];return e.eachSeriesByType(r,function(i){IW(i)&&t.push(i)}),t}function Bve(r){var e={};R(r,function(l){var u=l.coordinateSystem,c=u.getBaseAxis();if(!(c.type!=="time"&&c.type!=="value"))for(var h=l.getData(),d=c.dim+"_"+c.index,f=h.getDimensionIndex(h.mapDimension(c.dim)),p=h.getStore(),v=0,g=p.count();v<g;++v){var m=p.get(f,v);e[d]?e[d].push(m):e[d]=[m]}});var t={};for(var i in e)if(e.hasOwnProperty(i)){var n=e[i];if(n){n.sort(function(l,u){return l-u});for(var a=null,s=1;s<n.length;++s){var o=n[s]-n[s-1];o>0&&(a=a===null?o:Math.min(a,o))}t[i]=a}}return t}function CW(r){var e=Bve(r),t=[];return R(r,function(i){var n=i.coordinateSystem,a=n.getBaseAxis(),s=a.getExtent(),o;if(a.type==="category")o=a.getBandWidth();else if(a.type==="value"||a.type==="time"){var l=a.dim+"_"+a.index,u=e[l],c=Math.abs(s[1]-s[0]),h=a.scale.getExtent(),d=Math.abs(h[1]-h[0]);o=u?c/d*u:c}else{var f=i.getData();o=Math.abs(s[1]-s[0])/f.count()}var p=ce(i.get("barWidth"),o),v=ce(i.get("barMaxWidth"),o),g=ce(i.get("barMinWidth")||(PW(i)?.5:1),o),m=i.get("barGap"),y=i.get("barCategoryGap");t.push({bandWidth:o,barWidth:p,barMaxWidth:v,barMinWidth:g,barGap:m,barCategoryGap:y,axisKey:bE(a),stackId:_E(i)})}),AW(t)}function AW(r){var e={};R(r,function(i,n){var a=i.axisKey,s=i.bandWidth,o=e[a]||{bandWidth:s,remainedWidth:s,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},l=o.stacks;e[a]=o;var u=i.stackId;l[u]||o.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var c=i.barWidth;c&&!l[u].width&&(l[u].width=c,c=Math.min(o.remainedWidth,c),o.remainedWidth-=c);var h=i.barMaxWidth;h&&(l[u].maxWidth=h);var d=i.barMinWidth;d&&(l[u].minWidth=d);var f=i.barGap;f!=null&&(o.gap=f);var p=i.barCategoryGap;p!=null&&(o.categoryGap=p)});var t={};return R(e,function(i,n){t[n]={};var a=i.stacks,s=i.bandWidth,o=i.categoryGap;if(o==null){var l=rt(a).length;o=Math.max(35-l*4,15)+"%"}var u=ce(o,s),c=ce(i.gap,1),h=i.remainedWidth,d=i.autoWidthCount,f=(h-u)/(d+(d-1)*c);f=Math.max(f,0),R(a,function(m){var y=m.maxWidth,_=m.minWidth;if(m.width){var b=m.width;y&&(b=Math.min(b,y)),_&&(b=Math.max(b,_)),m.width=b,h-=b+c*b,d--}else{var b=f;y&&y<b&&(b=Math.min(y,h)),_&&_>b&&(b=_),b!==f&&(m.width=b,h-=b+c*b,d--)}}),f=(h-u)/(d+(d-1)*c),f=Math.max(f,0);var p=0,v;R(a,function(m,y){m.width||(m.width=f),v=m,p+=m.width*(1+c)}),v&&(p-=v.width*c);var g=-p/2;R(a,function(m,y){t[n][y]=t[n][y]||{bandWidth:s,offset:g,width:m.width},g+=m.width*(1+c)})}),t}function Fve(r,e,t){if(r&&e){var i=r[bE(e)];return i!=null&&t!=null?i[_E(t)]:i}}function DW(r,e){var t=wW(r,e),i=CW(t);R(t,function(n){var a=n.getData(),s=n.coordinateSystem,o=s.getBaseAxis(),l=_E(n),u=i[bE(o)][l],c=u.offset,h=u.width;a.setLayout({bandWidth:u.bandWidth,offset:c,size:h})})}function EW(r){return{seriesType:r,plan:Zf(),reset:function(e){if(IW(e)){var t=e.getData(),i=e.coordinateSystem,n=i.getBaseAxis(),a=i.getOtherAxis(n),s=t.getDimensionIndex(t.mapDimension(a.dim)),o=t.getDimensionIndex(t.mapDimension(n.dim)),l=e.get("showBackground",!0),u=t.mapDimension(a.dim),c=t.getCalculationInfo("stackResultDimension"),h=ro(t,u)&&!!t.getCalculationInfo("stackedOnSeries"),d=a.isHorizontal(),f=Uve(n,a),p=PW(e),v=e.get("barMinHeight")||0,g=c&&t.getDimensionIndex(c),m=t.getLayout("size"),y=t.getLayout("offset");return{progress:function(_,b){for(var T=_.count,x=p&&ts(T*3),C=p&&l&&ts(T*3),D=p&&ts(T),I=i.master.getRect(),M=d?I.width:I.height,L,N=b.getStore(),O=0;(L=_.next())!=null;){var B=N.get(h?g:s,L),F=N.get(o,L),U=f,$=void 0;h&&($=+B-N.get(s,L));var q=void 0,Z=void 0,te=void 0,J=void 0;if(d){var oe=i.dataToPoint([B,F]);if(h){var he=i.dataToPoint([$,F]);U=he[0]}q=U,Z=oe[1]+y,te=oe[0]-U,J=m,Math.abs(te)<v&&(te=(te<0?-1:1)*v)}else{var oe=i.dataToPoint([F,B]);if(h){var he=i.dataToPoint([F,$]);U=he[1]}q=oe[0]+y,Z=U,te=m,J=oe[1]-U,Math.abs(J)<v&&(J=(J<=0?-1:1)*v)}p?(x[O]=q,x[O+1]=Z,x[O+2]=d?te:J,C&&(C[O]=d?I.x:q,C[O+1]=d?Z:I.y,C[O+2]=M),D[L]=L):b.setItemLayout(L,{x:q,y:Z,width:te,height:J}),O+=3}p&&b.setLayout({largePoints:x,largeDataIndices:D,largeBackgroundPoints:C,valueAxisHorizontal:d})}}}}}}function IW(r){return r.coordinateSystem&&r.coordinateSystem.type==="cartesian2d"}function PW(r){return r.pipelineContext&&r.pipelineContext.large}function Uve(r,e){var t=e.model.get("startValue");return t||(t=0),e.toGlobalCoord(e.dataToCoord(e.type==="log"?t>0?t:1:t))}var Vve=function(r,e,t,i){for(;t<i;){var n=t+i>>>1;r[n][1]<e?t=n+1:i=n}return t},SE=function(r){j(e,r);function e(t){var i=r.call(this,t)||this;return i.type="time",i}return e.prototype.getLabel=function(t){var i=this.getSetting("useUTC");return wg(t.value,uR[yfe(qh(this._minLevelUnit))]||uR.second,i,this.getSetting("locale"))},e.prototype.getFormattedLabel=function(t,i,n){var a=this.getSetting("useUTC"),s=this.getSetting("locale");return _fe(t,i,n,s,a)},e.prototype.getTicks=function(){var t=this._interval,i=this._extent,n=[];if(!t)return n;n.push({value:i[0],level:0});var a=this.getSetting("useUTC"),s=jve(this._minLevelUnit,this._approxInterval,a,i);return n=n.concat(s),n.push({value:i[1],level:0}),n},e.prototype.calcNiceExtent=function(t){var i=this._extent;if(i[0]===i[1]&&(i[0]-=Hn,i[1]+=Hn),i[1]===-1/0&&i[0]===1/0){var n=new Date;i[1]=+new Date(n.getFullYear(),n.getMonth(),n.getDate()),i[0]=i[1]-Hn}this.calcNiceTicks(t.splitNumber,t.minInterval,t.maxInterval)},e.prototype.calcNiceTicks=function(t,i,n){t=t||10;var a=this._extent,s=a[1]-a[0];this._approxInterval=s/t,i!=null&&this._approxInterval<i&&(this._approxInterval=i),n!=null&&this._approxInterval>n&&(this._approxInterval=n);var o=jm.length,l=Math.min(Vve(jm,this._approxInterval,0,o),o-1);this._interval=jm[l][1],this._minLevelUnit=jm[Math.max(l-1,0)][0]},e.prototype.parse=function(t){return ut(t)?t:+Cn(t)},e.prototype.contain=function(t){return X1(this.parse(t),this._extent)},e.prototype.normalize=function(t){return Y1(this.parse(t),this._extent)},e.prototype.scale=function(t){return K1(t,this._extent)},e.type="time",e}(io),jm=[["second",$D],["minute",WD],["hour",Qp],["quarter-day",Qp*6],["half-day",Qp*12],["day",Hn*1.2],["half-week",Hn*3.5],["week",Hn*7],["month",Hn*31],["quarter",Hn*95],["half-year",lR/2],["year",lR]];function zve(r,e,t,i){var n=Cn(e),a=Cn(t),s=function(p){return cR(n,p,i)===cR(a,p,i)},o=function(){return s("year")},l=function(){return o()&&s("month")},u=function(){return l()&&s("day")},c=function(){return u()&&s("hour")},h=function(){return c()&&s("minute")},d=function(){return h()&&s("second")},f=function(){return d()&&s("millisecond")};switch(r){case"year":return o();case"month":return l();case"day":return u();case"hour":return c();case"minute":return h();case"second":return d();case"millisecond":return f()}}function Gve(r,e){return r/=Hn,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function Hve(r){var e=30*Hn;return r/=e,r>6?6:r>3?3:r>2?2:1}function $ve(r){return r/=Qp,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function _O(r,e){return r/=e?WD:$D,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function Wve(r){return TD(r,!0)}function qve(r,e,t){var i=new Date(r);switch(qh(e)){case"year":case"month":i[XH(t)](0);case"day":i[YH(t)](1);case"hour":i[KH(t)](0);case"minute":i[ZH(t)](0);case"second":i[QH(t)](0),i[JH(t)](0)}return i.getTime()}function jve(r,e,t,i){var n=1e4,a=qH,s=0;function o(M,L,N,O,B,F,U){for(var $=new Date(L),q=L,Z=$[O]();q<N&&q<=i[1];)U.push({value:q}),Z+=M,$[B](Z),q=$.getTime();U.push({value:q,notAdd:!0})}function l(M,L,N){var O=[],B=!L.length;if(!zve(qh(M),i[0],i[1],t)){B&&(L=[{value:qve(new Date(i[0]),M,t)},{value:i[1]}]);for(var F=0;F<L.length-1;F++){var U=L[F].value,$=L[F+1].value;if(U!==$){var q=void 0,Z=void 0,te=void 0,J=!1;switch(M){case"year":q=Math.max(1,Math.round(e/Hn/365)),Z=qD(t),te=bfe(t);break;case"half-year":case"quarter":case"month":q=Hve(e),Z=jh(t),te=XH(t);break;case"week":case"half-week":case"day":q=Gve(e),Z=B1(t),te=YH(t),J=!0;break;case"half-day":case"quarter-day":case"hour":q=$ve(e),Z=Rv(t),te=KH(t);break;case"minute":q=_O(e,!0),Z=F1(t),te=ZH(t);break;case"second":q=_O(e,!1),Z=U1(t),te=QH(t);break;case"millisecond":q=Wve(e),Z=V1(t),te=JH(t);break}o(q,U,$,Z,te,J,O),M==="year"&&N.length>1&&F===0&&N.unshift({value:N[0].value-q})}}for(var F=0;F<O.length;F++)N.push(O[F]);return O}}for(var u=[],c=[],h=0,d=0,f=0;f<a.length&&s++<n;++f){var p=qh(a[f]);if(mfe(a[f])){l(a[f],u[u.length-1]||[],c);var v=a[f+1]?qh(a[f+1]):null;if(p!==v){if(c.length){d=h,c.sort(function(M,L){return M.value-L.value});for(var g=[],m=0;m<c.length;++m){var y=c[m].value;(m===0||c[m-1].value!==y)&&(g.push(c[m]),y>=i[0]&&y<=i[1]&&h++)}var _=(i[1]-i[0])/e;if(h>_*1.5&&d>_/1.5||(u.push(g),h>_||r===a[f]))break}c=[]}}}for(var b=_t(ae(u,function(M){return _t(M,function(L){return L.value>=i[0]&&L.value<=i[1]&&!L.notAdd})}),function(M){return M.length>0}),T=[],x=b.length-1,f=0;f<b.length;++f)for(var C=b[f],D=0;D<C.length;++D)T.push({value:C[D].value,level:x-f});T.sort(function(M,L){return M.value-L.value});for(var I=[],f=0;f<T.length;++f)(f===0||T[f].value!==T[f-1].value)&&I.push(T[f]);return I}bs.registerClass(SE);var bO=bs.prototype,tv=io.prototype,Xve=Yt,Yve=Math.floor,Kve=Math.ceil,Xm=Math.pow,ua=Math.log,TE=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="log",t.base=10,t._originalScale=new io,t._interval=0,t}return e.prototype.getTicks=function(t){var i=this._originalScale,n=this._extent,a=i.getExtent(),s=tv.getTicks.call(this,t);return ae(s,function(o){var l=o.value,u=Yt(Xm(this.base,l));return u=l===n[0]&&this._fixMin?Ym(u,a[0]):u,u=l===n[1]&&this._fixMax?Ym(u,a[1]):u,{value:u}},this)},e.prototype.setExtent=function(t,i){var n=ua(this.base);t=ua(Math.max(0,t))/n,i=ua(Math.max(0,i))/n,tv.setExtent.call(this,t,i)},e.prototype.getExtent=function(){var t=this.base,i=bO.getExtent.call(this);i[0]=Xm(t,i[0]),i[1]=Xm(t,i[1]);var n=this._originalScale,a=n.getExtent();return this._fixMin&&(i[0]=Ym(i[0],a[0])),this._fixMax&&(i[1]=Ym(i[1],a[1])),i},e.prototype.unionExtent=function(t){this._originalScale.unionExtent(t);var i=this.base;t[0]=ua(t[0])/ua(i),t[1]=ua(t[1])/ua(i),bO.unionExtent.call(this,t)},e.prototype.unionExtentFromData=function(t,i){this.unionExtent(t.getApproximateExtent(i))},e.prototype.calcNiceTicks=function(t){t=t||10;var i=this._extent,n=i[1]-i[0];if(!(n===1/0||n<=0)){var a=Y9(n),s=t/n*a;for(s<=.5&&(a*=10);!isNaN(a)&&Math.abs(a)<1&&Math.abs(a)>0;)a*=10;var o=[Yt(Kve(i[0]/a)*a),Yt(Yve(i[1]/a)*a)];this._interval=a,this._niceExtent=o}},e.prototype.calcNiceExtent=function(t){tv.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return t=ua(t)/ua(this.base),X1(t,this._extent)},e.prototype.normalize=function(t){return t=ua(t)/ua(this.base),Y1(t,this._extent)},e.prototype.scale=function(t){return t=K1(t,this._extent),Xm(this.base,t)},e.type="log",e}(bs),MW=TE.prototype;MW.getMinorTicks=tv.getMinorTicks;MW.getLabel=tv.getLabel;function Ym(r,e){return Xve(r,ma(e))}bs.registerClass(TE);var Zve=function(){function r(e,t,i){this._prepareParams(e,t,i)}return r.prototype._prepareParams=function(e,t,i){i[1]<i[0]&&(i=[NaN,NaN]),this._dataMin=i[0],this._dataMax=i[1];var n=this._isOrdinal=e.type==="ordinal";this._needCrossZero=e.type==="interval"&&t.getNeedCrossZero&&t.getNeedCrossZero();var a=t.get("min",!0);a==null&&(a=t.get("startValue",!0));var s=this._modelMinRaw=a;xe(s)?this._modelMinNum=Km(e,s({min:i[0],max:i[1]})):s!=="dataMin"&&(this._modelMinNum=Km(e,s));var o=this._modelMaxRaw=t.get("max",!0);if(xe(o)?this._modelMaxNum=Km(e,o({min:i[0],max:i[1]})):o!=="dataMax"&&(this._modelMaxNum=Km(e,o)),n)this._axisDataLen=t.getCategories().length;else{var l=t.get("boundaryGap"),u=ie(l)?l:[l||0,l||0];typeof u[0]=="boolean"||typeof u[1]=="boolean"?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[Ea(u[0],1),Ea(u[1],1)]}},r.prototype.calculate=function(){var e=this._isOrdinal,t=this._dataMin,i=this._dataMax,n=this._axisDataLen,a=this._boundaryGapInner,s=e?null:i-t||Math.abs(t),o=this._modelMinRaw==="dataMin"?t:this._modelMinNum,l=this._modelMaxRaw==="dataMax"?i:this._modelMaxNum,u=o!=null,c=l!=null;o==null&&(o=e?n?0:NaN:t-a[0]*s),l==null&&(l=e?n?n-1:NaN:i+a[1]*s),(o==null||!isFinite(o))&&(o=NaN),(l==null||!isFinite(l))&&(l=NaN);var h=gf(o)||gf(l)||e&&!n;this._needCrossZero&&(o>0&&l>0&&!u&&(o=0),o<0&&l<0&&!c&&(l=0));var d=this._determinedMin,f=this._determinedMax;return d!=null&&(o=d,u=!0),f!=null&&(l=f,c=!0),{min:o,max:l,minFixed:u,maxFixed:c,isBlank:h}},r.prototype.modifyDataMinMax=function(e,t){this[Jve[e]]=t},r.prototype.setDeterminedMinMax=function(e,t){var i=Qve[e];this[i]=t},r.prototype.freeze=function(){this.frozen=!0},r}(),Qve={min:"_determinedMin",max:"_determinedMax"},Jve={min:"_dataMin",max:"_dataMax"};function LW(r,e,t){var i=r.rawExtentInfo;return i||(i=new Zve(r,e,t),r.rawExtentInfo=i,i)}function Km(r,e){return e==null?null:gf(e)?NaN:r.parse(e)}function kW(r,e){var t=r.type,i=LW(r,e,r.getExtent()).calculate();r.setBlank(i.isBlank);var n=i.min,a=i.max,s=e.ecModel;if(s&&t==="time"){var o=wW("bar",s),l=!1;if(R(o,function(h){l=l||h.getBaseAxis()===e.axis}),l){var u=CW(o),c=ege(n,a,e,u);n=c.min,a=c.max}}return{extent:[n,a],fixMin:i.minFixed,fixMax:i.maxFixed}}function ege(r,e,t,i){var n=t.axis.getExtent(),a=n[1]-n[0],s=Fve(i,t.axis);if(s===void 0)return{min:r,max:e};var o=1/0;R(s,function(f){o=Math.min(f.offset,o)});var l=-1/0;R(s,function(f){l=Math.max(f.offset+f.width,l)}),o=Math.abs(o),l=Math.abs(l);var u=o+l,c=e-r,h=1-(o+l)/a,d=c/h-c;return e+=d*(l/u),r-=d*(o/u),{min:r,max:e}}function cc(r,e){var t=e,i=kW(r,t),n=i.extent,a=t.get("splitNumber");r instanceof TE&&(r.base=t.get("logBase"));var s=r.type,o=t.get("interval"),l=s==="interval"||s==="time";r.setExtent(n[0],n[1]),r.calcNiceExtent({splitNumber:a,fixMin:i.fixMin,fixMax:i.fixMax,minInterval:l?t.get("minInterval"):null,maxInterval:l?t.get("maxInterval"):null}),o!=null&&r.setInterval&&r.setInterval(o)}function Ag(r,e){if(e=e||r.get("type"),e)switch(e){case"category":return new Z1({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new SE({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new(bs.getClass(e)||io)}}function tge(r){var e=r.scale.getExtent(),t=e[0],i=e[1];return!(t>0&&i>0||t<0&&i<0)}function td(r){var e=r.getLabelModel().get("formatter"),t=r.type==="category"?r.scale.getExtent()[0]:null;return r.scale.type==="time"?function(i){return function(n,a){return r.scale.getFormattedLabel(n,a,i)}}(e):de(e)?function(i){return function(n){var a=r.scale.getLabel(n),s=i.replace("{value}",a??"");return s}}(e):xe(e)?function(i){return function(n,a){return t!=null&&(a=n.value-t),i(xE(r,n),a,n.level!=null?{level:n.level}:null)}}(e):function(i){return r.scale.getLabel(i)}}function xE(r,e){return r.type==="category"?r.scale.getLabel(e):e.value}function rge(r){var e=r.model,t=r.scale;if(!(!e.get(["axisLabel","show"])||t.isBlank())){var i,n,a=t.getExtent();t instanceof Z1?n=t.count():(i=t.getTicks(),n=i.length);var s=r.getLabelModel(),o=td(r),l,u=1;n>40&&(u=Math.ceil(n/40));for(var c=0;c<n;c+=u){var h=i?i[c]:{value:a[0]+c},d=o(h,c),f=s.getTextRect(d),p=ige(f,s.get("rotate")||0);l?l.union(p):l=p}return l}}function ige(r,e){var t=e*Math.PI/180,i=r.width,n=r.height,a=i*Math.abs(Math.cos(t))+Math.abs(n*Math.sin(t)),s=i*Math.abs(Math.sin(t))+Math.abs(n*Math.cos(t)),o=new We(r.x,r.y,a,s);return o}function wE(r){var e=r.get("interval");return e??"auto"}function RW(r){return r.type==="category"&&wE(r.getLabelModel())===0}function f_(r,e){var t={};return R(r.mapDimensionsAll(e),function(i){t[yE(r,i)]=!0}),rt(t)}function nge(r,e,t){e&&R(f_(e,t),function(i){var n=e.getApproximateExtent(i);n[0]<r[0]&&(r[0]=n[0]),n[1]>r[1]&&(r[1]=n[1])})}var rd=function(){function r(){}return r.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},r.prototype.getCoordSysModel=function(){},r}();function age(r){return _s(null,r)}var sge={isDimensionStacked:ro,enableDataStack:SW,getStackedDimension:yE};function oge(r,e){var t=e;e instanceof ft||(t=new ft(e));var i=Ag(t);return i.setExtent(r[0],r[1]),cc(i,t),i}function lge(r){ir(r,rd)}function uge(r,e){return e=e||{},Mt(r,null,null,e.state!=="normal")}const cge=Object.freeze(Object.defineProperty({__proto__:null,createDimensions:_ve,createList:age,createScale:oge,createSymbol:cr,createTextStyle:uge,dataStack:sge,enableHoverEmphasis:Ko,getECData:ke,getLayoutRect:br,mixinAxisModelCommonMethods:lge},Symbol.toStringTag,{value:"Module"}));var hge=1e-8;function SO(r,e){return Math.abs(r-e)<hge}function vu(r,e,t){var i=0,n=r[0];if(!n)return!1;for(var a=1;a<r.length;a++){var s=r[a];i+=Ps(n[0],n[1],s[0],s[1],e,t),n=s}var o=r[0];return(!SO(n[0],o[0])||!SO(n[1],o[1]))&&(i+=Ps(n[0],n[1],o[0],o[1],e,t)),i!==0}var fge=[];function bT(r,e){for(var t=0;t<r.length;t++)$r(r[t],r[t],e)}function TO(r,e,t,i){for(var n=0;n<r.length;n++){var a=r[n];i&&(a=i.project(a)),a&&isFinite(a[0])&&isFinite(a[1])&&(Fs(e,e,a),Us(t,t,a))}}function dge(r){for(var e=0,t=0,i=0,n=r.length,a=r[n-1][0],s=r[n-1][1],o=0;o<n;o++){var l=r[o][0],u=r[o][1],c=a*u-l*s;e+=c,t+=(a+l)*c,i+=(s+u)*c,a=l,s=u}return e?[t/e/3,i/e/3,e]:[r[0][0]||0,r[0][1]||0]}var OW=function(){function r(e){this.name=e}return r.prototype.setCenter=function(e){this._center=e},r.prototype.getCenter=function(){var e=this._center;return e||(e=this._center=this.calcCenter()),e},r}(),xO=function(){function r(e,t){this.type="polygon",this.exterior=e,this.interiors=t}return r}(),wO=function(){function r(e){this.type="linestring",this.points=e}return r}(),NW=function(r){j(e,r);function e(t,i,n){var a=r.call(this,t)||this;return a.type="geoJSON",a.geometries=i,a._center=n&&[n[0],n[1]],a}return e.prototype.calcCenter=function(){for(var t=this.geometries,i,n=0,a=0;a<t.length;a++){var s=t[a],o=s.exterior,l=o&&o.length;l>n&&(i=s,n=l)}if(i)return dge(i.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},e.prototype.getBoundingRect=function(t){var i=this._rect;if(i&&!t)return i;var n=[1/0,1/0],a=[-1/0,-1/0],s=this.geometries;return R(s,function(o){o.type==="polygon"?TO(o.exterior,n,a,t):R(o.points,function(l){TO(l,n,a,t)})}),isFinite(n[0])&&isFinite(n[1])&&isFinite(a[0])&&isFinite(a[1])||(n[0]=n[1]=a[0]=a[1]=0),i=new We(n[0],n[1],a[0]-n[0],a[1]-n[1]),t||(this._rect=i),i},e.prototype.contain=function(t){var i=this.getBoundingRect(),n=this.geometries;if(!i.contain(t[0],t[1]))return!1;e:for(var a=0,s=n.length;a<s;a++){var o=n[a];if(o.type==="polygon"){var l=o.exterior,u=o.interiors;if(vu(l,t[0],t[1])){for(var c=0;c<(u?u.length:0);c++)if(vu(u[c],t[0],t[1]))continue e;return!0}}}return!1},e.prototype.transformTo=function(t,i,n,a){var s=this.getBoundingRect(),o=s.width/s.height;n?a||(a=n/o):n=o*a;for(var l=new We(t,i,n,a),u=s.calculateTransform(l),c=this.geometries,h=0;h<c.length;h++){var d=c[h];d.type==="polygon"?(bT(d.exterior,u),R(d.interiors,function(f){bT(f,u)})):R(d.points,function(f){bT(f,u)})}s=this._rect,s.copy(l),this._center=[s.x+s.width/2,s.y+s.height/2]},e.prototype.cloneShallow=function(t){t==null&&(t=this.name);var i=new e(t,this.geometries,this._center);return i._rect=this._rect,i.transformTo=null,i},e}(OW),pge=function(r){j(e,r);function e(t,i){var n=r.call(this,t)||this;return n.type="geoSVG",n._elOnlyForCalculate=i,n}return e.prototype.calcCenter=function(){for(var t=this._elOnlyForCalculate,i=t.getBoundingRect(),n=[i.x+i.width/2,i.y+i.height/2],a=vg(fge),s=t;s&&!s.isGeoSVGGraphicRoot;)os(a,s.getLocalTransform(),a),s=s.parent;return gc(a,a),$r(n,n,a),n},e}(OW);function vge(r){if(!r.UTF8Encoding)return r;var e=r,t=e.UTF8Scale;t==null&&(t=1024);var i=e.features;return R(i,function(n){var a=n.geometry,s=a.encodeOffsets,o=a.coordinates;if(s)switch(a.type){case"LineString":a.coordinates=BW(o,s,t);break;case"Polygon":ST(o,s,t);break;case"MultiLineString":ST(o,s,t);break;case"MultiPolygon":R(o,function(l,u){return ST(l,s[u],t)})}}),e.UTF8Encoding=!1,e}function ST(r,e,t){for(var i=0;i<r.length;i++)r[i]=BW(r[i],e[i],t)}function BW(r,e,t){for(var i=[],n=e[0],a=e[1],s=0;s<r.length;s+=2){var o=r.charCodeAt(s)-64,l=r.charCodeAt(s+1)-64;o=o>>1^-(o&1),l=l>>1^-(l&1),o+=n,l+=a,n=o,a=l,i.push([o/t,l/t])}return i}function z2(r,e){return r=vge(r),ae(_t(r.features,function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0}),function(t){var i=t.properties,n=t.geometry,a=[];switch(n.type){case"Polygon":var s=n.coordinates;a.push(new xO(s[0],s.slice(1)));break;case"MultiPolygon":R(n.coordinates,function(l){l[0]&&a.push(new xO(l[0],l.slice(1)))});break;case"LineString":a.push(new wO([n.coordinates]));break;case"MultiLineString":a.push(new wO(n.coordinates))}var o=new NW(i[e||"name"],a,i.cp);return o.properties=i,o})}const gge=Object.freeze(Object.defineProperty({__proto__:null,MAX_SAFE_INTEGER:u2,asc:mn,getPercentWithPrecision:ece,getPixelPrecision:bD,getPrecision:ma,getPrecisionSafe:j9,isNumeric:xD,isRadianAroundZero:mf,linearMap:yt,nice:TD,numericToNumber:vs,parseDate:Cn,quantile:By,quantity:Y9,quantityExponent:A1,reformIntervals:c2,remRadian:SD,round:Yt},Symbol.toStringTag,{value:"Module"})),mge=Object.freeze(Object.defineProperty({__proto__:null,format:wg,parse:Cn},Symbol.toStringTag,{value:"Module"})),yge=Object.freeze(Object.defineProperty({__proto__:null,Arc:Sg,BezierCurve:zf,BoundingRect:We,Circle:ms,CompoundPath:k1,Ellipse:bg,Group:Le,Image:Ur,IncrementalDisplayable:kH,Line:Ar,LinearGradient:Gf,Polygon:pi,Polyline:mi,RadialGradient:OD,Rect:at,Ring:Vf,Sector:di,Text:nt,clipPointsByRect:UD,clipRectByRect:FH,createIcon:$f,extendPath:NH,extendShape:OH,getShapeClass:R1,getTransform:Zo,initProps:Bt,makeImage:BD,makePath:Tg,mergePath:vn,registerShape:ra,resizePath:FD,updateProps:ct},Symbol.toStringTag,{value:"Module"})),_ge=Object.freeze(Object.defineProperty({__proto__:null,addCommas:jD,capitalFirst:wfe,encodeHTML:Di,formatTime:xfe,formatTpl:YD,getTextRect:Sfe,getTooltipMarker:e$,normalizeCssArray:yc,toCamelCase:XD,truncateText:sH},Symbol.toStringTag,{value:"Module"})),bge=Object.freeze(Object.defineProperty({__proto__:null,bind:ge,clone:Ee,curry:Be,defaults:Ce,each:R,extend:Q,filter:_t,indexOf:Xe,inherits:fD,isArray:ie,isFunction:xe,isObject:Ae,isString:de,map:ae,merge:He,reduce:Qn},Symbol.toStringTag,{value:"Module"}));var Vv=lt();function FW(r,e){var t=ae(e,function(i){return r.scale.parse(i)});return r.type==="time"&&t.length>0&&(t.sort(),t.unshift(t[0]),t.push(t[t.length-1])),t}function Sge(r){var e=r.getLabelModel().get("customValues");if(e){var t=td(r);return{labels:FW(r,e).map(function(i){var n={value:i};return{formattedLabel:t(n),rawLabel:r.scale.getLabel(n),tickValue:i}})}}return r.type==="category"?xge(r):Cge(r)}function Tge(r,e){var t=r.getTickModel().get("customValues");return t?{ticks:FW(r,t)}:r.type==="category"?wge(r,e):{ticks:ae(r.scale.getTicks(),function(i){return i.value})}}function xge(r){var e=r.getLabelModel(),t=UW(r,e);return!e.get("show")||r.scale.isBlank()?{labels:[],labelCategoryInterval:t.labelCategoryInterval}:t}function UW(r,e){var t=VW(r,"labels"),i=wE(e),n=zW(t,i);if(n)return n;var a,s;return xe(i)?a=$W(r,i):(s=i==="auto"?Age(r):i,a=HW(r,s)),GW(t,i,{labels:a,labelCategoryInterval:s})}function wge(r,e){var t=VW(r,"ticks"),i=wE(e),n=zW(t,i);if(n)return n;var a,s;if((!e.get("show")||r.scale.isBlank())&&(a=[]),xe(i))a=$W(r,i,!0);else if(i==="auto"){var o=UW(r,r.getLabelModel());s=o.labelCategoryInterval,a=ae(o.labels,function(l){return l.tickValue})}else s=i,a=HW(r,s,!0);return GW(t,i,{ticks:a,tickCategoryInterval:s})}function Cge(r){var e=r.scale.getTicks(),t=td(r);return{labels:ae(e,function(i,n){return{level:i.level,formattedLabel:t(i,n),rawLabel:r.scale.getLabel(i),tickValue:i.value}})}}function VW(r,e){return Vv(r)[e]||(Vv(r)[e]=[])}function zW(r,e){for(var t=0;t<r.length;t++)if(r[t].key===e)return r[t].value}function GW(r,e,t){return r.push({key:e,value:t}),t}function Age(r){var e=Vv(r).autoInterval;return e??(Vv(r).autoInterval=r.calculateCategoryInterval())}function Dge(r){var e=Ege(r),t=td(r),i=(e.axisRotate-e.labelRotate)/180*Math.PI,n=r.scale,a=n.getExtent(),s=n.count();if(a[1]-a[0]<1)return 0;var o=1;s>40&&(o=Math.max(1,Math.floor(s/40)));for(var l=a[0],u=r.dataToCoord(l+1)-r.dataToCoord(l),c=Math.abs(u*Math.cos(i)),h=Math.abs(u*Math.sin(i)),d=0,f=0;l<=a[1];l+=o){var p=0,v=0,g=mg(t({value:l}),e.font,"center","top");p=g.width*1.3,v=g.height*1.3,d=Math.max(d,p,7),f=Math.max(f,v,7)}var m=d/c,y=f/h;isNaN(m)&&(m=1/0),isNaN(y)&&(y=1/0);var _=Math.max(0,Math.floor(Math.min(m,y))),b=Vv(r.model),T=r.getExtent(),x=b.lastAutoInterval,C=b.lastTickCount;return x!=null&&C!=null&&Math.abs(x-_)<=1&&Math.abs(C-s)<=1&&x>_&&b.axisExtent0===T[0]&&b.axisExtent1===T[1]?_=x:(b.lastTickCount=s,b.lastAutoInterval=_,b.axisExtent0=T[0],b.axisExtent1=T[1]),_}function Ege(r){var e=r.getLabelModel();return{axisRotate:r.getRotate?r.getRotate():r.isHorizontal&&!r.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function HW(r,e,t){var i=td(r),n=r.scale,a=n.getExtent(),s=r.getLabelModel(),o=[],l=Math.max((e||0)+1,1),u=a[0],c=n.count();u!==0&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var h=RW(r),d=s.get("showMinLabel")||h,f=s.get("showMaxLabel")||h;d&&u!==a[0]&&v(a[0]);for(var p=u;p<=a[1];p+=l)v(p);f&&p-l!==a[1]&&v(a[1]);function v(g){var m={value:g};o.push(t?g:{formattedLabel:i(m),rawLabel:n.getLabel(m),tickValue:g})}return o}function $W(r,e,t){var i=r.scale,n=td(r),a=[];return R(i.getTicks(),function(s){var o=i.getLabel(s),l=s.value;e(s.value,o)&&a.push(t?l:{formattedLabel:n(s),rawLabel:o,tickValue:l})}),a}var CO=[0,1],aa=function(){function r(e,t,i){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=i||[0,0]}return r.prototype.contain=function(e){var t=this._extent,i=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]);return e>=i&&e<=n},r.prototype.containData=function(e){return this.scale.contain(e)},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(e){return bD(e||this.scale.getExtent(),this._extent)},r.prototype.setExtent=function(e,t){var i=this._extent;i[0]=e,i[1]=t},r.prototype.dataToCoord=function(e,t){var i=this._extent,n=this.scale;return e=n.normalize(e),this.onBand&&n.type==="ordinal"&&(i=i.slice(),AO(i,n.count())),yt(e,CO,i,t)},r.prototype.coordToData=function(e,t){var i=this._extent,n=this.scale;this.onBand&&n.type==="ordinal"&&(i=i.slice(),AO(i,n.count()));var a=yt(e,i,CO,t);return this.scale.scale(a)},r.prototype.pointToData=function(e,t){},r.prototype.getTicksCoords=function(e){e=e||{};var t=e.tickModel||this.getTickModel(),i=Tge(this,t),n=i.ticks,a=ae(n,function(o){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(o):o),tickValue:o}},this),s=t.get("alignWithLabel");return Ige(this,a,s,e.clamp),a},r.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var e=this.model.getModel("minorTick"),t=e.get("splitNumber");t>0&&t<100||(t=5);var i=this.scale.getMinorTicks(t),n=ae(i,function(a){return ae(a,function(s){return{coord:this.dataToCoord(s),tickValue:s}},this)},this);return n},r.prototype.getViewLabels=function(){return Sge(this).labels},r.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},r.prototype.getTickModel=function(){return this.model.getModel("axisTick")},r.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),i=t[1]-t[0]+(this.onBand?1:0);i===0&&(i=1);var n=Math.abs(e[1]-e[0]);return Math.abs(n)/i},r.prototype.calculateCategoryInterval=function(){return Dge(this)},r}();function AO(r,e){var t=r[1]-r[0],i=e,n=t/i/2;r[0]+=n,r[1]-=n}function Ige(r,e,t,i){var n=e.length;if(!r.onBand||t||!n)return;var a=r.getExtent(),s,o;if(n===1)e[0].coord=a[0],s=e[1]={coord:a[1]};else{var l=e[n-1].tickValue-e[0].tickValue,u=(e[n-1].coord-e[0].coord)/l;R(e,function(f){f.coord-=u/2});var c=r.scale.getExtent();o=1+c[1]-e[n-1].tickValue,s={coord:e[n-1].coord+u*o},e.push(s)}var h=a[0]>a[1];d(e[0].coord,a[0])&&(i?e[0].coord=a[0]:e.shift()),i&&d(a[0],e[0].coord)&&e.unshift({coord:a[0]}),d(a[1],s.coord)&&(i?s.coord=a[1]:e.pop()),i&&d(s.coord,a[1])&&e.push({coord:a[1]});function d(f,p){return f=Yt(f),p=Yt(p),h?f>p:f<p}}function Pge(r){var e=Qe.extend(r);return Qe.registerClass(e),e}function Mge(r){var e=Nt.extend(r);return Nt.registerClass(e),e}function Lge(r){var e=Ct.extend(r);return Ct.registerClass(e),e}function kge(r){var e=Tt.extend(r);return Tt.registerClass(e),e}var Wd=Math.PI*2,eu=gs.CMD,Rge=["top","right","bottom","left"];function Oge(r,e,t,i,n){var a=t.width,s=t.height;switch(r){case"top":i.set(t.x+a/2,t.y-e),n.set(0,-1);break;case"bottom":i.set(t.x+a/2,t.y+s+e),n.set(0,1);break;case"left":i.set(t.x-e,t.y+s/2),n.set(-1,0);break;case"right":i.set(t.x+a+e,t.y+s/2),n.set(1,0);break}}function Nge(r,e,t,i,n,a,s,o,l){s-=r,o-=e;var u=Math.sqrt(s*s+o*o);s/=u,o/=u;var c=s*t+r,h=o*t+e;if(Math.abs(i-n)%Wd<1e-4)return l[0]=c,l[1]=h,u-t;if(a){var d=i;i=yn(n),n=yn(d)}else i=yn(i),n=yn(n);i>n&&(n+=Wd);var f=Math.atan2(o,s);if(f<0&&(f+=Wd),f>=i&&f<=n||f+Wd>=i&&f+Wd<=n)return l[0]=c,l[1]=h,u-t;var p=t*Math.cos(i)+r,v=t*Math.sin(i)+e,g=t*Math.cos(n)+r,m=t*Math.sin(n)+e,y=(p-s)*(p-s)+(v-o)*(v-o),_=(g-s)*(g-s)+(m-o)*(m-o);return y<_?(l[0]=p,l[1]=v,Math.sqrt(y)):(l[0]=g,l[1]=m,Math.sqrt(_))}function d_(r,e,t,i,n,a,s,o){var l=n-r,u=a-e,c=t-r,h=i-e,d=Math.sqrt(c*c+h*h);c/=d,h/=d;var f=l*c+u*h,p=f/d;o&&(p=Math.min(Math.max(p,0),1)),p*=d;var v=s[0]=r+p*c,g=s[1]=e+p*h;return Math.sqrt((v-n)*(v-n)+(g-a)*(g-a))}function WW(r,e,t,i,n,a,s){t<0&&(r=r+t,t=-t),i<0&&(e=e+i,i=-i);var o=r+t,l=e+i,u=s[0]=Math.min(Math.max(n,r),o),c=s[1]=Math.min(Math.max(a,e),l);return Math.sqrt((u-n)*(u-n)+(c-a)*(c-a))}var pa=[];function Bge(r,e,t){var i=WW(e.x,e.y,e.width,e.height,r.x,r.y,pa);return t.set(pa[0],pa[1]),i}function Fge(r,e,t){for(var i=0,n=0,a=0,s=0,o,l,u=1/0,c=e.data,h=r.x,d=r.y,f=0;f<c.length;){var p=c[f++];f===1&&(i=c[f],n=c[f+1],a=i,s=n);var v=u;switch(p){case eu.M:a=c[f++],s=c[f++],i=a,n=s;break;case eu.L:v=d_(i,n,c[f],c[f+1],h,d,pa,!0),i=c[f++],n=c[f++];break;case eu.C:v=D9(i,n,c[f++],c[f++],c[f++],c[f++],c[f],c[f+1],h,d,pa),i=c[f++],n=c[f++];break;case eu.Q:v=I9(i,n,c[f++],c[f++],c[f],c[f+1],h,d,pa),i=c[f++],n=c[f++];break;case eu.A:var g=c[f++],m=c[f++],y=c[f++],_=c[f++],b=c[f++],T=c[f++];f+=1;var x=!!(1-c[f++]);o=Math.cos(b)*y+g,l=Math.sin(b)*_+m,f<=1&&(a=o,s=l);var C=(h-g)*_/y+g;v=Nge(g,m,_,b,b+T,x,C,d,pa),i=Math.cos(b+T)*y+g,n=Math.sin(b+T)*_+m;break;case eu.R:a=i=c[f++],s=n=c[f++];var D=c[f++],I=c[f++];v=WW(a,s,D,I,h,d,pa);break;case eu.Z:v=d_(i,n,a,s,h,d,pa,!0),i=a,n=s;break}v<u&&(u=v,t.set(pa[0],pa[1]))}return u}var ya=new $e,Rt=new $e,ar=new $e,rs=new $e,Xa=new $e;function DO(r,e){if(r){var t=r.getTextGuideLine(),i=r.getTextContent();if(i&&t){var n=r.textGuideLineConfig||{},a=[[0,0],[0,0],[0,0]],s=n.candidates||Rge,o=i.getBoundingRect().clone();o.applyTransform(i.getComputedTransform());var l=1/0,u=n.anchor,c=r.getComputedTransform(),h=c&&gc([],c),d=e.get("length2")||0;u&&ar.copy(u);for(var f=0;f<s.length;f++){var p=s[f];Oge(p,0,o,ya,rs),$e.scaleAndAdd(Rt,ya,rs,d),Rt.transform(h);var v=r.getBoundingRect(),g=u?u.distance(Rt):r instanceof Je?Fge(Rt,r.path,ar):Bge(Rt,v,ar);g<l&&(l=g,Rt.transform(c),ar.transform(c),ar.toArray(a[0]),Rt.toArray(a[1]),ya.toArray(a[2]))}qW(a,e.get("minTurnAngle")),t.setShape({points:a})}}}var p_=[],Ci=new $e;function qW(r,e){if(e<=180&&e>0){e=e/180*Math.PI,ya.fromArray(r[0]),Rt.fromArray(r[1]),ar.fromArray(r[2]),$e.sub(rs,ya,Rt),$e.sub(Xa,ar,Rt);var t=rs.len(),i=Xa.len();if(!(t<.001||i<.001)){rs.scale(1/t),Xa.scale(1/i);var n=rs.dot(Xa),a=Math.cos(e);if(a<n){var s=d_(Rt.x,Rt.y,ar.x,ar.y,ya.x,ya.y,p_,!1);Ci.fromArray(p_),Ci.scaleAndAdd(Xa,s/Math.tan(Math.PI-e));var o=ar.x!==Rt.x?(Ci.x-Rt.x)/(ar.x-Rt.x):(Ci.y-Rt.y)/(ar.y-Rt.y);if(isNaN(o))return;o<0?$e.copy(Ci,Rt):o>1&&$e.copy(Ci,ar),Ci.toArray(r[1])}}}}function Uge(r,e,t){if(t<=180&&t>0){t=t/180*Math.PI,ya.fromArray(r[0]),Rt.fromArray(r[1]),ar.fromArray(r[2]),$e.sub(rs,Rt,ya),$e.sub(Xa,ar,Rt);var i=rs.len(),n=Xa.len();if(!(i<.001||n<.001)){rs.scale(1/i),Xa.scale(1/n);var a=rs.dot(e),s=Math.cos(t);if(a<s){var o=d_(Rt.x,Rt.y,ar.x,ar.y,ya.x,ya.y,p_,!1);Ci.fromArray(p_);var l=Math.PI/2,u=Math.acos(Xa.dot(e)),c=l+u-t;if(c>=l)$e.copy(Ci,ar);else{Ci.scaleAndAdd(Xa,o/Math.tan(Math.PI/2-c));var h=ar.x!==Rt.x?(Ci.x-Rt.x)/(ar.x-Rt.x):(Ci.y-Rt.y)/(ar.y-Rt.y);if(isNaN(h))return;h<0?$e.copy(Ci,Rt):h>1&&$e.copy(Ci,ar)}Ci.toArray(r[1])}}}}function TT(r,e,t,i){var n=t==="normal",a=n?r:r.ensureState(t);a.ignore=e;var s=i.get("smooth");s&&s===!0&&(s=.3),a.shape=a.shape||{},s>0&&(a.shape.smooth=s);var o=i.getModel("lineStyle").getLineStyle();n?r.useStyle(o):a.style=o}function Vge(r,e){var t=e.smooth,i=e.points;if(i)if(r.moveTo(i[0][0],i[0][1]),t>0&&i.length>=3){var n=Bs(i[0],i[1]),a=Bs(i[1],i[2]);if(!n||!a){r.lineTo(i[1][0],i[1][1]),r.lineTo(i[2][0],i[2][1]);return}var s=Math.min(n,a)*t,o=Hp([],i[1],i[0],s/n),l=Hp([],i[1],i[2],s/a),u=Hp([],o,l,.5);r.bezierCurveTo(o[0],o[1],o[0],o[1],u[0],u[1]),r.bezierCurveTo(l[0],l[1],l[0],l[1],i[2][0],i[2][1])}else for(var c=1;c<i.length;c++)r.lineTo(i[c][0],i[c][1])}function CE(r,e,t){var i=r.getTextGuideLine(),n=r.getTextContent();if(!n){i&&r.removeTextGuideLine();return}for(var a=e.normal,s=a.get("show"),o=n.ignore,l=0;l<Mv.length;l++){var u=Mv[l],c=e[u],h=u==="normal";if(c){var d=c.get("show"),f=h?o:Fe(n.states[u]&&n.states[u].ignore,o);if(f||!Fe(d,s)){var p=h?i:i&&i.states[u];p&&(p.ignore=!0),i&&TT(i,!0,u,c);continue}i||(i=new mi,r.setTextGuideLine(i),!h&&(o||!s)&&TT(i,!0,"normal",e.normal),r.stateProxy&&(i.stateProxy=r.stateProxy)),TT(i,!1,u,c)}}if(i){Ce(i.style,t),i.style.fill=null;var v=a.get("showAbove"),g=r.textGuideLineConfig=r.textGuideLineConfig||{};g.showAbove=v||!1,i.buildPath=Vge}}function AE(r,e){e=e||"labelLine";for(var t={normal:r.getModel(e)},i=0;i<Oi.length;i++){var n=Oi[i];t[n]=r.getModel([n,e])}return t}function jW(r){for(var e=[],t=0;t<r.length;t++){var i=r[t];if(!i.defaultAttr.ignore){var n=i.label,a=n.getComputedTransform(),s=n.getBoundingRect(),o=!a||a[1]<1e-5&&a[2]<1e-5,l=n.style.margin||0,u=s.clone();u.applyTransform(a),u.x-=l/2,u.y-=l/2,u.width+=l,u.height+=l;var c=o?new K0(s,a):null;e.push({label:n,labelLine:i.labelLine,rect:u,localRect:s,obb:c,priority:i.priority,defaultAttr:i.defaultAttr,layoutOption:i.computedLayoutOption,axisAligned:o,transform:a})}}return e}function XW(r,e,t,i,n,a){var s=r.length;if(s<2)return;r.sort(function(D,I){return D.rect[e]-I.rect[e]});for(var o=0,l,u=!1,c=0,h=0;h<s;h++){var d=r[h],f=d.rect;l=f[e]-o,l<0&&(f[e]-=l,d.label[e]-=l,u=!0);var p=Math.max(-l,0);c+=p,o=f[e]+f[t]}c>0&&a&&T(-c/s,0,s);var v=r[0],g=r[s-1],m,y;_(),m<0&&x(-m,.8),y<0&&x(y,.8),_(),b(m,y,1),b(y,m,-1),_(),m<0&&C(-m),y<0&&C(y);function _(){m=v.rect[e]-i,y=n-g.rect[e]-g.rect[t]}function b(D,I,M){if(D<0){var L=Math.min(I,-D);if(L>0){T(L*M,0,s);var N=L+D;N<0&&x(-N*M,1)}else x(-D*M,1)}}function T(D,I,M){D!==0&&(u=!0);for(var L=I;L<M;L++){var N=r[L],O=N.rect;O[e]+=D,N.label[e]+=D}}function x(D,I){for(var M=[],L=0,N=1;N<s;N++){var O=r[N-1].rect,B=Math.max(r[N].rect[e]-O[e]-O[t],0);M.push(B),L+=B}if(L){var F=Math.min(Math.abs(D)/L,I);if(D>0)for(var N=0;N<s-1;N++){var U=M[N]*F;T(U,0,N+1)}else for(var N=s-1;N>0;N--){var U=M[N-1]*F;T(-U,N,s)}}}function C(D){var I=D<0?-1:1;D=Math.abs(D);for(var M=Math.ceil(D/(s-1)),L=0;L<s-1;L++)if(I>0?T(M,0,L+1):T(-M,s-L-1,s),D-=M,D<=0)return}return u}function zge(r,e,t,i){return XW(r,"x","width",e,t,i)}function YW(r,e,t,i){return XW(r,"y","height",e,t,i)}function KW(r){var e=[];r.sort(function(v,g){return g.priority-v.priority});var t=new We(0,0,0,0);function i(v){if(!v.ignore){var g=v.ensureState("emphasis");g.ignore==null&&(g.ignore=!1)}v.ignore=!0}for(var n=0;n<r.length;n++){var a=r[n],s=a.axisAligned,o=a.localRect,l=a.transform,u=a.label,c=a.labelLine;t.copy(a.rect),t.width-=.1,t.height-=.1,t.x+=.05,t.y+=.05;for(var h=a.obb,d=!1,f=0;f<e.length;f++){var p=e[f];if(t.intersect(p.rect)){if(s&&p.axisAligned){d=!0;break}if(p.obb||(p.obb=new K0(p.localRect,p.transform)),h||(h=new K0(o,l)),h.intersect(p.obb)){d=!0;break}}}d?(i(u),c&&i(c)):(u.attr("ignore",a.defaultAttr.ignore),c&&c.attr("ignore",a.defaultAttr.labelGuideIgnore),e.push(a))}}function Gge(r){if(r){for(var e=[],t=0;t<r.length;t++)e.push(r[t].slice());return e}}function Hge(r,e){var t=r.label,i=e&&e.getTextGuideLine();return{dataIndex:r.dataIndex,dataType:r.dataType,seriesIndex:r.seriesModel.seriesIndex,text:r.label.style.text,rect:r.hostRect,labelRect:r.rect,align:t.style.align,verticalAlign:t.style.verticalAlign,labelLinePoints:Gge(i&&i.shape.points)}}var EO=["align","verticalAlign","width","height","fontSize"],Si=new Vs,xT=lt(),$ge=lt();function Zm(r,e,t){for(var i=0;i<t.length;i++){var n=t[i];e[n]!=null&&(r[n]=e[n])}}var Qm=["x","y","rotation"],Wge=function(){function r(){this._labelList=[],this._chartViewList=[]}return r.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},r.prototype._addLabel=function(e,t,i,n,a){var s=n.style,o=n.__hostTarget,l=o.textConfig||{},u=n.getComputedTransform(),c=n.getBoundingRect().plain();We.applyTransform(c,c,u),u?Si.setLocalTransform(u):(Si.x=Si.y=Si.rotation=Si.originX=Si.originY=0,Si.scaleX=Si.scaleY=1),Si.rotation=yn(Si.rotation);var h=n.__hostTarget,d;if(h){d=h.getBoundingRect().plain();var f=h.getComputedTransform();We.applyTransform(d,d,f)}var p=d&&h.getTextGuideLine();this._labelList.push({label:n,labelLine:p,seriesModel:i,dataIndex:e,dataType:t,layoutOption:a,computedLayoutOption:null,rect:c,hostRect:d,priority:d?d.width*d.height:0,defaultAttr:{ignore:n.ignore,labelGuideIgnore:p&&p.ignore,x:Si.x,y:Si.y,scaleX:Si.scaleX,scaleY:Si.scaleY,rotation:Si.rotation,style:{x:s.x,y:s.y,align:s.align,verticalAlign:s.verticalAlign,width:s.width,height:s.height,fontSize:s.fontSize},cursor:n.cursor,attachedPos:l.position,attachedRot:l.rotation}})},r.prototype.addLabelsOfSeries=function(e){var t=this;this._chartViewList.push(e);var i=e.__model,n=i.get("labelLayout");(xe(n)||rt(n).length)&&e.group.traverse(function(a){if(a.ignore)return!0;var s=a.getTextContent(),o=ke(a);s&&!s.disableLabelLayout&&t._addLabel(o.dataIndex,o.dataType,i,s,n)})},r.prototype.updateLayoutConfig=function(e){var t=e.getWidth(),i=e.getHeight();function n(_,b){return function(){DO(_,b)}}for(var a=0;a<this._labelList.length;a++){var s=this._labelList[a],o=s.label,l=o.__hostTarget,u=s.defaultAttr,c=void 0;xe(s.layoutOption)?c=s.layoutOption(Hge(s,l)):c=s.layoutOption,c=c||{},s.computedLayoutOption=c;var h=Math.PI/180;l&&l.setTextConfig({local:!1,position:c.x!=null||c.y!=null?null:u.attachedPos,rotation:c.rotate!=null?c.rotate*h:u.attachedRot,offset:[c.dx||0,c.dy||0]});var d=!1;if(c.x!=null?(o.x=ce(c.x,t),o.setStyle("x",0),d=!0):(o.x=u.x,o.setStyle("x",u.style.x)),c.y!=null?(o.y=ce(c.y,i),o.setStyle("y",0),d=!0):(o.y=u.y,o.setStyle("y",u.style.y)),c.labelLinePoints){var f=l.getTextGuideLine();f&&(f.setShape({points:c.labelLinePoints}),d=!1)}var p=xT(o);p.needsUpdateLabelLine=d,o.rotation=c.rotate!=null?c.rotate*h:u.rotation,o.scaleX=u.scaleX,o.scaleY=u.scaleY;for(var v=0;v<EO.length;v++){var g=EO[v];o.setStyle(g,c[g]!=null?c[g]:u.style[g])}if(c.draggable){if(o.draggable=!0,o.cursor="move",l){var m=s.seriesModel;if(s.dataIndex!=null){var y=s.seriesModel.getData(s.dataType);m=y.getItemModel(s.dataIndex)}o.on("drag",n(l,m.getModel("labelLine")))}}else o.off("drag"),o.cursor=u.cursor}},r.prototype.layout=function(e){var t=e.getWidth(),i=e.getHeight(),n=jW(this._labelList),a=_t(n,function(l){return l.layoutOption.moveOverlap==="shiftX"}),s=_t(n,function(l){return l.layoutOption.moveOverlap==="shiftY"});zge(a,0,t),YW(s,0,i);var o=_t(n,function(l){return l.layoutOption.hideOverlap});KW(o)},r.prototype.processLabelsOverall=function(){var e=this;R(this._chartViewList,function(t){var i=t.__model,n=t.ignoreLabelLineUpdate,a=i.isAnimationEnabled();t.group.traverse(function(s){if(s.ignore&&!s.forceLabelAnimation)return!0;var o=!n,l=s.getTextContent();!o&&l&&(o=xT(l).needsUpdateLabelLine),o&&e._updateLabelLine(s,i),a&&e._animateLabels(s,i)})})},r.prototype._updateLabelLine=function(e,t){var i=e.getTextContent(),n=ke(e),a=n.dataIndex;if(i&&a!=null){var s=t.getData(n.dataType),o=s.getItemModel(a),l={},u=s.getItemVisual(a,"style");if(u){var c=s.getVisual("drawType");l.stroke=u[c]}var h=o.getModel("labelLine");CE(e,AE(o),l),DO(e,h)}},r.prototype._animateLabels=function(e,t){var i=e.getTextContent(),n=e.getTextGuideLine();if(i&&(e.forceLabelAnimation||!i.ignore&&!i.invisible&&!e.disableLabelAnimation&&!$h(e))){var a=xT(i),s=a.oldLayout,o=ke(e),l=o.dataIndex,u={x:i.x,y:i.y,rotation:i.rotation},c=t.getData(o.dataType);if(s){i.attr(s);var d=e.prevStates;d&&(Xe(d,"select")>=0&&i.attr(a.oldLayoutSelect),Xe(d,"emphasis")>=0&&i.attr(a.oldLayoutEmphasis)),ct(i,u,t,l)}else if(i.attr(u),!qf(i).valueAnimation){var h=Fe(i.style.opacity,1);i.style.opacity=0,Bt(i,{style:{opacity:h}},t,l)}if(a.oldLayout=u,i.states.select){var f=a.oldLayoutSelect={};Zm(f,u,Qm),Zm(f,i.states.select,Qm)}if(i.states.emphasis){var p=a.oldLayoutEmphasis={};Zm(p,u,Qm),Zm(p,i.states.emphasis,Qm)}GH(i,l,c,t,t)}if(n&&!n.ignore&&!n.invisible){var a=$ge(n),s=a.oldLayout,v={points:n.shape.points};s?(n.attr({shape:s}),ct(n,{shape:v},t)):(n.setShape(v),n.style.strokePercent=0,Bt(n,{style:{strokePercent:1}},t)),a.oldLayout=v}},r}(),wT=lt();function qge(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,i){var n=wT(t).labelManager;n||(n=wT(t).labelManager=new Wge),n.clearLabels()}),r.registerUpdateLifecycle("series:layoutlabels",function(e,t,i){var n=wT(t).labelManager;i.updatedSeries.forEach(function(a){n.addLabelsOfSeries(t.getViewOfSeriesModel(a))}),n.updateLayoutConfig(t),n.layout(t),n.processLabelsOverall()})}var CT=Math.sin,AT=Math.cos,ZW=Math.PI,tu=Math.PI*2,jge=180/ZW,QW=function(){function r(){}return r.prototype.reset=function(e){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,e||4)},r.prototype.moveTo=function(e,t){this._add("M",e,t)},r.prototype.lineTo=function(e,t){this._add("L",e,t)},r.prototype.bezierCurveTo=function(e,t,i,n,a,s){this._add("C",e,t,i,n,a,s)},r.prototype.quadraticCurveTo=function(e,t,i,n){this._add("Q",e,t,i,n)},r.prototype.arc=function(e,t,i,n,a,s){this.ellipse(e,t,i,i,0,n,a,s)},r.prototype.ellipse=function(e,t,i,n,a,s,o,l){var u=o-s,c=!l,h=Math.abs(u),d=Go(h-tu)||(c?u>=tu:-u>=tu),f=u>0?u%tu:u%tu+tu,p=!1;d?p=!0:Go(h)?p=!1:p=f>=ZW==!!c;var v=e+i*AT(s),g=t+n*CT(s);this._start&&this._add("M",v,g);var m=Math.round(a*jge);if(d){var y=1/this._p,_=(c?1:-1)*(tu-y);this._add("A",i,n,m,1,+c,e+i*AT(s+_),t+n*CT(s+_)),y>.01&&this._add("A",i,n,m,0,+c,v,g)}else{var b=e+i*AT(o),T=t+n*CT(o);this._add("A",i,n,m,+p,+c,b,T)}},r.prototype.rect=function(e,t,i,n){this._add("M",e,t),this._add("l",i,0),this._add("l",0,n),this._add("l",-i,0),this._add("Z")},r.prototype.closePath=function(){this._d.length>0&&this._add("Z")},r.prototype._add=function(e,t,i,n,a,s,o,l,u){for(var c=[],h=this._p,d=1;d<arguments.length;d++){var f=arguments[d];if(isNaN(f)){this._invalid=!0;return}c.push(Math.round(f*h)/h)}this._d.push(e+c.join(" ")),this._start=e==="Z"},r.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(""),this._d=[]},r.prototype.getStr=function(){return this._str},r}(),DE="none",Xge=Math.round;function Yge(r){var e=r.fill;return e!=null&&e!==DE}function Kge(r){var e=r.stroke;return e!=null&&e!==DE}var G2=["lineCap","miterLimit","lineJoin"],Zge=ae(G2,function(r){return"stroke-"+r.toLowerCase()});function Qge(r,e,t,i){var n=e.opacity==null?1:e.opacity;if(t instanceof Ur){r("opacity",n);return}if(Yge(e)){var a=Iv(e.fill);r("fill",a.color);var s=e.fillOpacity!=null?e.fillOpacity*a.opacity*n:a.opacity*n;s<1&&r("fill-opacity",s)}else r("fill",DE);if(Kge(e)){var o=Iv(e.stroke);r("stroke",o.color);var l=e.strokeNoScale?t.getLineScale():1,u=l?(e.lineWidth||0)/l:0,c=e.strokeOpacity!=null?e.strokeOpacity*o.opacity*n:o.opacity*n,h=e.strokeFirst;if(u!==1&&r("stroke-width",u),h&&r("paint-order",h?"stroke":"fill"),c<1&&r("stroke-opacity",c),e.lineDash){var d=sE(t),f=d[0],p=d[1];f&&(p=Xge(p||0),r("stroke-dasharray",f.join(",")),(p||i)&&r("stroke-dashoffset",p))}for(var v=0;v<G2.length;v++){var g=G2[v];if(e[g]!==X0[g]){var m=e[g]||X0[g];m&&r(Zge[v],m)}}}}var JW="http://www.w3.org/2000/svg",eq="http://www.w3.org/1999/xlink",Jge="http://www.w3.org/2000/xmlns/",eme="http://www.w3.org/XML/1998/namespace",IO="ecmeta_";function tq(r){return document.createElementNS(JW,r)}function Or(r,e,t,i,n){return{tag:r,attrs:t||{},children:i,text:n,key:e}}function tme(r,e){var t=[];if(e)for(var i in e){var n=e[i],a=i;n!==!1&&(n!==!0&&n!=null&&(a+='="'+n+'"'),t.push(a))}return"<"+r+" "+t.join(" ")+">"}function rme(r){return"</"+r+">"}function EE(r,e){e=e||{};var t=e.newline?`
|
||
`:"";function i(n){var a=n.children,s=n.tag,o=n.attrs,l=n.text;return tme(s,o)+(s!=="style"?Di(l):l||"")+(a?""+t+ae(a,function(u){return i(u)}).join(t)+t:"")+rme(s)}return i(r)}function ime(r,e,t){t=t||{};var i=t.newline?`
|
||
`:"",n=" {"+i,a=i+"}",s=ae(rt(r),function(l){return l+n+ae(rt(r[l]),function(u){return u+":"+r[l][u]+";"}).join(i)+a}).join(i),o=ae(rt(e),function(l){return"@keyframes "+l+n+ae(rt(e[l]),function(u){return u+n+ae(rt(e[l][u]),function(c){var h=e[l][u][c];return c==="d"&&(h='path("'+h+'")'),c+":"+h+";"}).join(i)+a}).join(i)+a}).join(i);return!s&&!o?"":["<![CDATA[",s,o,"]]>"].join(i)}function H2(r){return{zrId:r,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function PO(r,e,t,i){return Or("svg","root",{width:r,height:e,xmlns:JW,"xmlns:xlink":eq,version:"1.1",baseProfile:"full",viewBox:i?"0 0 "+r+" "+e:!1},t)}var nme=0;function rq(){return nme++}var MO={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},su="transform-origin";function ame(r,e,t){var i=Q({},r.shape);Q(i,e),r.buildPath(t,i);var n=new QW;return n.reset(N9(r)),t.rebuildPath(n,1),n.generateStr(),n.getStr()}function sme(r,e){var t=e.originX,i=e.originY;(t||i)&&(r[su]=t+"px "+i+"px")}var ome={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function iq(r,e){var t=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[t]=r,t}function lme(r,e,t){var i=r.shape.paths,n={},a,s;if(R(i,function(l){var u=H2(t.zrId);u.animation=!0,Q1(l,{},u,!0);var c=u.cssAnims,h=u.cssNodes,d=rt(c),f=d.length;if(f){s=d[f-1];var p=c[s];for(var v in p){var g=p[v];n[v]=n[v]||{d:""},n[v].d+=g.d||""}for(var m in h){var y=h[m].animation;y.indexOf(s)>=0&&(a=y)}}}),!!a){e.d=!1;var o=iq(n,t);return a.replace(s,o)}}function LO(r){return de(r)?MO[r]?"cubic-bezier("+MO[r]+")":gD(r)?r:"":""}function Q1(r,e,t,i){var n=r.animators,a=n.length,s=[];if(r instanceof k1){var o=lme(r,e,t);if(o)s.push(o);else if(!a)return}else if(!a)return;for(var l={},u=0;u<a;u++){var c=n[u],h=[c.getMaxTime()/1e3+"s"],d=LO(c.getClip().easing),f=c.getDelay();d?h.push(d):h.push("linear"),f&&h.push(f/1e3+"s"),c.getLoop()&&h.push("infinite");var p=h.join(" ");l[p]=l[p]||[p,[]],l[p][1].push(c)}function v(y){var _=y[1],b=_.length,T={},x={},C={},D="animation-timing-function";function I(me,ze,Pe){for(var _e=me.getTracks(),Me=me.getMaxTime(),St=0;St<_e.length;St++){var Re=_e[St];if(Re.needsAnimate()){var Ge=Re.keyframes,Lt=Re.propName;if(Pe&&(Lt=Pe(Lt)),Lt)for(var At=0;At<Ge.length;At++){var Dt=Ge[At],nr=Math.round(Dt.time/Me*100)+"%",ht=LO(Dt.easing),nn=Dt.rawValue;(de(nn)||ut(nn))&&(ze[nr]=ze[nr]||{},ze[nr][Lt]=Dt.rawValue,ht&&(ze[nr][D]=ht))}}}}for(var M=0;M<b;M++){var L=_[M],N=L.targetName;N?N==="shape"&&I(L,x):!i&&I(L,T)}for(var O in T){var B={};z9(B,r),Q(B,T[O]);var F=B9(B),U=T[O][D];C[O]=F?{transform:F}:{},sme(C[O],B),U&&(C[O][D]=U)}var $,q=!0;for(var O in x){C[O]=C[O]||{};var Z=!$,U=x[O][D];Z&&($=new gs);var te=$.len();$.reset(),C[O].d=ame(r,x[O],$);var J=$.len();if(!Z&&te!==J){q=!1;break}U&&(C[O][D]=U)}if(!q)for(var O in C)delete C[O].d;if(!i)for(var M=0;M<b;M++){var L=_[M],N=L.targetName;N==="style"&&I(L,C,function(_e){return ome[_e]})}for(var oe=rt(C),he=!0,ue,M=1;M<oe.length;M++){var Ie=oe[M-1],Oe=oe[M];if(C[Ie][su]!==C[Oe][su]){he=!1;break}ue=C[Ie][su]}if(he&&ue){for(var O in C)C[O][su]&&delete C[O][su];e[su]=ue}if(_t(oe,function(me){return rt(C[me]).length>0}).length){var Ue=iq(C,t);return Ue+" "+y[0]+" both"}}for(var g in l){var o=v(l[g]);o&&s.push(o)}if(s.length){var m=t.zrId+"-cls-"+rq();t.cssNodes["."+m]={animation:s.join(",")},e.class=m}}function ume(r,e,t){if(!r.ignore)if(r.isSilent()){var i={"pointer-events":"none"};kO(i,e,t)}else{var n=r.states.emphasis&&r.states.emphasis.style?r.states.emphasis.style:{},a=n.fill;if(!a){var s=r.style&&r.style.fill,o=r.states.select&&r.states.select.style&&r.states.select.style.fill,l=r.currentStates.indexOf("select")>=0&&o||s;l&&(a=$0(l))}var u=n.lineWidth;if(u){var c=!n.strokeNoScale&&r.transform?r.transform[0]:1;u=u/c}var i={cursor:"pointer"};a&&(i.fill=a),n.stroke&&(i.stroke=n.stroke),u&&(i["stroke-width"]=u),kO(i,e,t)}}function kO(r,e,t,i){var n=JSON.stringify(r),a=t.cssStyleCache[n];a||(a=t.zrId+"-cls-"+rq(),t.cssStyleCache[n]=a,t.cssNodes["."+a+":hover"]=r),e.class=e.class?e.class+" "+a:a}var zv=Math.round;function nq(r){return r&&de(r.src)}function aq(r){return r&&xe(r.toDataURL)}function IE(r,e,t,i){Qge(function(n,a){var s=n==="fill"||n==="stroke";s&&O9(a)?oq(e,r,n,i):s&&yD(a)?lq(t,r,n,i):s&&a==="none"?r[n]="transparent":r[n]=a},e,t,!1),gme(t,r,i)}function PE(r,e){var t=$9(e);t&&(t.each(function(i,n){i!=null&&(r[(IO+n).toLowerCase()]=i+"")}),e.isSilent()&&(r[IO+"silent"]="true"))}function RO(r){return Go(r[0]-1)&&Go(r[1])&&Go(r[2])&&Go(r[3]-1)}function cme(r){return Go(r[4])&&Go(r[5])}function ME(r,e,t){if(e&&!(cme(e)&&RO(e))){var i=1e4;r.transform=RO(e)?"translate("+zv(e[4]*i)/i+" "+zv(e[5]*i)/i+")":yue(e)}}function OO(r,e,t){for(var i=r.points,n=[],a=0;a<i.length;a++)n.push(zv(i[a][0]*t)/t),n.push(zv(i[a][1]*t)/t);e.points=n.join(" ")}function NO(r){return!r.smooth}function hme(r){var e=ae(r,function(t){return typeof t=="string"?[t,t]:t});return function(t,i,n){for(var a=0;a<e.length;a++){var s=e[a],o=t[s[0]];o!=null&&(i[s[1]]=zv(o*n)/n)}}}var fme={circle:[hme(["cx","cy","r"])],polyline:[OO,NO],polygon:[OO,NO]};function dme(r){for(var e=r.animators,t=0;t<e.length;t++)if(e[t].targetName==="shape")return!0;return!1}function sq(r,e){var t=r.style,i=r.shape,n=fme[r.type],a={},s=e.animation,o="path",l=r.style.strokePercent,u=e.compress&&N9(r)||4;if(n&&!e.willUpdate&&!(n[1]&&!n[1](i))&&!(s&&dme(r))&&!(l<1)){o=r.type;var c=Math.pow(10,u);n[0](i,a,c)}else{var h=!r.path||r.shapeChanged();r.path||r.createPathProxy();var d=r.path;h&&(d.beginPath(),r.buildPath(d,r.shape),r.pathUpdated());var f=d.getVersion(),p=r,v=p.__svgPathBuilder;(p.__svgPathVersion!==f||!v||l!==p.__svgPathStrokePercent)&&(v||(v=p.__svgPathBuilder=new QW),v.reset(u),d.rebuildPath(v,l),v.generateStr(),p.__svgPathVersion=f,p.__svgPathStrokePercent=l),a.d=v.getStr()}return ME(a,r.transform),IE(a,t,r,e),PE(a,r),e.animation&&Q1(r,a,e),e.emphasis&&ume(r,a,e),Or(o,r.id+"",a)}function pme(r,e){var t=r.style,i=t.image;if(i&&!de(i)&&(nq(i)?i=i.src:aq(i)&&(i=i.toDataURL())),!!i){var n=t.x||0,a=t.y||0,s=t.width,o=t.height,l={href:i,width:s,height:o};return n&&(l.x=n),a&&(l.y=a),ME(l,r.transform),IE(l,t,r,e),PE(l,r),e.animation&&Q1(r,l,e),Or("image",r.id+"",l)}}function vme(r,e){var t=r.style,i=t.text;if(i!=null&&(i+=""),!(!i||isNaN(t.x)||isNaN(t.y))){var n=t.font||al,a=t.x||0,s=bue(t.y||0,w1(n),t.textBaseline),o=_ue[t.textAlign]||t.textAlign,l={"dominant-baseline":"central","text-anchor":o};if(vH(t)){var u="",c=t.fontStyle,h=pH(t.fontSize);if(!parseFloat(h))return;var d=t.fontFamily||s9,f=t.fontWeight;u+="font-size:"+h+";font-family:"+d+";",c&&c!=="normal"&&(u+="font-style:"+c+";"),f&&f!=="normal"&&(u+="font-weight:"+f+";"),l.style=u}else l.style="font: "+n;return i.match(/\s/)&&(l["xml:space"]="preserve"),a&&(l.x=a),s&&(l.y=s),ME(l,r.transform),IE(l,t,r,e),PE(l,r),e.animation&&Q1(r,l,e),Or("text",r.id+"",l,void 0,i)}}function BO(r,e){if(r instanceof Je)return sq(r,e);if(r instanceof Ur)return pme(r,e);if(r instanceof yf)return vme(r,e)}function gme(r,e,t){var i=r.style;if(Sue(i)){var n=Tue(r),a=t.shadowCache,s=a[n];if(!s){var o=r.getGlobalScale(),l=o[0],u=o[1];if(!l||!u)return;var c=i.shadowOffsetX||0,h=i.shadowOffsetY||0,d=i.shadowBlur,f=Iv(i.shadowColor),p=f.opacity,v=f.color,g=d/2/l,m=d/2/u,y=g+" "+m;s=t.zrId+"-s"+t.shadowIdx++,t.defs[s]=Or("filter",s,{id:s,x:"-100%",y:"-100%",width:"300%",height:"300%"},[Or("feDropShadow","",{dx:c/l,dy:h/u,stdDeviation:y,"flood-color":v,"flood-opacity":p})]),a[n]=s}e.filter=x1(s)}}function oq(r,e,t,i){var n=r[t],a,s={gradientUnits:n.global?"userSpaceOnUse":"objectBoundingBox"};if(k9(n))a="linearGradient",s.x1=n.x,s.y1=n.y,s.x2=n.x2,s.y2=n.y2;else if(R9(n))a="radialGradient",s.cx=Fe(n.x,.5),s.cy=Fe(n.y,.5),s.r=Fe(n.r,.5);else return;for(var o=n.colorStops,l=[],u=0,c=o.length;u<c;++u){var h=Qw(o[u].offset)*100+"%",d=o[u].color,f=Iv(d),p=f.color,v=f.opacity,g={offset:h};g["stop-color"]=p,v<1&&(g["stop-opacity"]=v),l.push(Or("stop",u+"",g))}var m=Or(a,"",s,l),y=EE(m),_=i.gradientCache,b=_[y];b||(b=i.zrId+"-g"+i.gradientIdx++,_[y]=b,s.id=b,i.defs[b]=Or(a,b,s,l)),e[t]=x1(b)}function lq(r,e,t,i){var n=r.style[t],a=r.getBoundingRect(),s={},o=n.repeat,l=o==="no-repeat",u=o==="repeat-x",c=o==="repeat-y",h;if(L9(n)){var d=n.imageWidth,f=n.imageHeight,p=void 0,v=n.image;if(de(v)?p=v:nq(v)?p=v.src:aq(v)&&(p=v.toDataURL()),typeof Image>"u"){var g="Image width/height must been given explictly in svg-ssr renderer.";fi(d,g),fi(f,g)}else if(d==null||f==null){var m=function(M,L){if(M){var N=M.elm,O=d||L.width,B=f||L.height;M.tag==="pattern"&&(u?(B=1,O/=a.width):c&&(O=1,B/=a.height)),M.attrs.width=O,M.attrs.height=B,N&&(N.setAttribute("width",O),N.setAttribute("height",B))}},y=DD(p,null,r,function(M){l||m(x,M),m(h,M)});y&&y.width&&y.height&&(d=d||y.width,f=f||y.height)}h=Or("image","img",{href:p,width:d,height:f}),s.width=d,s.height=f}else n.svgElement&&(h=Ee(n.svgElement),s.width=n.svgWidth,s.height=n.svgHeight);if(h){var _,b;l?_=b=1:u?(b=1,_=s.width/a.width):c?(_=1,b=s.height/a.height):s.patternUnits="userSpaceOnUse",_!=null&&!isNaN(_)&&(s.width=_),b!=null&&!isNaN(b)&&(s.height=b);var T=B9(n);T&&(s.patternTransform=T);var x=Or("pattern","",s,[h]),C=EE(x),D=i.patternCache,I=D[C];I||(I=i.zrId+"-p"+i.patternIdx++,D[C]=I,s.id=I,x=i.defs[I]=Or("pattern",I,s,[h])),e[t]=x1(I)}}function mme(r,e,t){var i=t.clipPathCache,n=t.defs,a=i[r.id];if(!a){a=t.zrId+"-c"+t.clipPathIdx++;var s={id:a};i[r.id]=a,n[a]=Or("clipPath",a,s,[sq(r,t)])}e["clip-path"]=x1(a)}function FO(r){return document.createTextNode(r)}function gu(r,e,t){r.insertBefore(e,t)}function UO(r,e){r.removeChild(e)}function VO(r,e){r.appendChild(e)}function uq(r){return r.parentNode}function cq(r){return r.nextSibling}function DT(r,e){r.textContent=e}var zO=58,yme=120,_me=Or("","");function $2(r){return r===void 0}function $a(r){return r!==void 0}function bme(r,e,t){for(var i={},n=e;n<=t;++n){var a=r[n].key;a!==void 0&&(i[a]=n)}return i}function Tp(r,e){var t=r.key===e.key,i=r.tag===e.tag;return i&&t}function Gv(r){var e,t=r.children,i=r.tag;if($a(i)){var n=r.elm=tq(i);if(LE(_me,r),ie(t))for(e=0;e<t.length;++e){var a=t[e];a!=null&&VO(n,Gv(a))}else $a(r.text)&&!Ae(r.text)&&VO(n,FO(r.text))}else r.elm=FO(r.text);return r.elm}function hq(r,e,t,i,n){for(;i<=n;++i){var a=t[i];a!=null&&gu(r,Gv(a),e)}}function v_(r,e,t,i){for(;t<=i;++t){var n=e[t];if(n!=null)if($a(n.tag)){var a=uq(n.elm);UO(a,n.elm)}else UO(r,n.elm)}}function LE(r,e){var t,i=e.elm,n=r&&r.attrs||{},a=e.attrs||{};if(n!==a){for(t in a){var s=a[t],o=n[t];o!==s&&(s===!0?i.setAttribute(t,""):s===!1?i.removeAttribute(t):t==="style"?i.style.cssText=s:t.charCodeAt(0)!==yme?i.setAttribute(t,s):t==="xmlns:xlink"||t==="xmlns"?i.setAttributeNS(Jge,t,s):t.charCodeAt(3)===zO?i.setAttributeNS(eme,t,s):t.charCodeAt(5)===zO?i.setAttributeNS(eq,t,s):i.setAttribute(t,s))}for(t in n)t in a||i.removeAttribute(t)}}function Sme(r,e,t){for(var i=0,n=0,a=e.length-1,s=e[0],o=e[a],l=t.length-1,u=t[0],c=t[l],h,d,f,p;i<=a&&n<=l;)s==null?s=e[++i]:o==null?o=e[--a]:u==null?u=t[++n]:c==null?c=t[--l]:Tp(s,u)?(ph(s,u),s=e[++i],u=t[++n]):Tp(o,c)?(ph(o,c),o=e[--a],c=t[--l]):Tp(s,c)?(ph(s,c),gu(r,s.elm,cq(o.elm)),s=e[++i],c=t[--l]):Tp(o,u)?(ph(o,u),gu(r,o.elm,s.elm),o=e[--a],u=t[++n]):($2(h)&&(h=bme(e,i,a)),d=h[u.key],$2(d)?gu(r,Gv(u),s.elm):(f=e[d],f.tag!==u.tag?gu(r,Gv(u),s.elm):(ph(f,u),e[d]=void 0,gu(r,f.elm,s.elm))),u=t[++n]);(i<=a||n<=l)&&(i>a?(p=t[l+1]==null?null:t[l+1].elm,hq(r,p,t,n,l)):v_(r,e,i,a))}function ph(r,e){var t=e.elm=r.elm,i=r.children,n=e.children;r!==e&&(LE(r,e),$2(e.text)?$a(i)&&$a(n)?i!==n&&Sme(t,i,n):$a(n)?($a(r.text)&&DT(t,""),hq(t,null,n,0,n.length-1)):$a(i)?v_(t,i,0,i.length-1):$a(r.text)&&DT(t,""):r.text!==e.text&&($a(i)&&v_(t,i,0,i.length-1),DT(t,e.text)))}function Tme(r,e){if(Tp(r,e))ph(r,e);else{var t=r.elm,i=uq(t);Gv(e),i!==null&&(gu(i,e.elm,cq(t)),v_(i,[r],0,0))}return e}var xme=0,wme=function(){function r(e,t,i){if(this.type="svg",this.refreshHover=GO(),this.configLayer=GO(),this.storage=t,this._opts=i=Q({},i),this.root=e,this._id="zr"+xme++,this._oldVNode=PO(i.width,i.height),e&&!i.ssr){var n=this._viewport=document.createElement("div");n.style.cssText="position:relative;overflow:hidden";var a=this._svgDom=this._oldVNode.elm=tq("svg");LE(null,this._oldVNode),n.appendChild(a),e.appendChild(n)}this.resize(i.width,i.height)}return r.prototype.getType=function(){return this.type},r.prototype.getViewportRoot=function(){return this._viewport},r.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},r.prototype.getSvgDom=function(){return this._svgDom},r.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",Tme(this._oldVNode,e),this._oldVNode=e}},r.prototype.renderOneToVNode=function(e){return BO(e,H2(this._id))},r.prototype.renderToVNode=function(e){e=e||{};var t=this.storage.getDisplayList(!0),i=this._width,n=this._height,a=H2(this._id);a.animation=e.animation,a.willUpdate=e.willUpdate,a.compress=e.compress,a.emphasis=e.emphasis;var s=[],o=this._bgVNode=Cme(i,n,this._backgroundColor,a);o&&s.push(o);var l=e.compress?null:this._mainVNode=Or("g","main",{},[]);this._paintList(t,a,l?l.children:s),l&&s.push(l);var u=ae(rt(a.defs),function(d){return a.defs[d]});if(u.length&&s.push(Or("defs","defs",{},u)),e.animation){var c=ime(a.cssNodes,a.cssAnims,{newline:!0});if(c){var h=Or("style","stl",{},[],c);s.push(h)}}return PO(i,n,s,e.useViewBox)},r.prototype.renderToString=function(e){return e=e||{},EE(this.renderToVNode({animation:Fe(e.cssAnimation,!0),emphasis:Fe(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:Fe(e.useViewBox,!0)}),{newline:!0})},r.prototype.setBackgroundColor=function(e){this._backgroundColor=e},r.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},r.prototype._paintList=function(e,t,i){for(var n=e.length,a=[],s=0,o,l,u=0,c=0;c<n;c++){var h=e[c];if(!h.invisible){var d=h.__clipPaths,f=d&&d.length||0,p=l&&l.length||0,v=void 0;for(v=Math.max(f-1,p-1);v>=0&&!(d&&l&&d[v]===l[v]);v--);for(var g=p-1;g>v;g--)s--,o=a[s-1];for(var m=v+1;m<f;m++){var y={};mme(d[m],y,t);var _=Or("g","clip-g-"+u++,y,[]);(o?o.children:i).push(_),a[s++]=_,o=_}l=d;var b=BO(h,t);b&&(o?o.children:i).push(b)}}},r.prototype.resize=function(e,t){var i=this._opts,n=this.root,a=this._viewport;if(e!=null&&(i.width=e),t!=null&&(i.height=t),n&&a&&(a.style.display="none",e=Ah(n,0,i),t=Ah(n,1,i),a.style.display=""),this._width!==e||this._height!==t){if(this._width=e,this._height=t,a){var s=a.style;s.width=e+"px",s.height=t+"px"}if(yD(this._backgroundColor))this.refresh();else{var o=this._svgDom;o&&(o.setAttribute("width",e),o.setAttribute("height",t));var l=this._bgVNode&&this._bgVNode.elm;l&&(l.setAttribute("width",e),l.setAttribute("height",t))}}},r.prototype.getWidth=function(){return this._width},r.prototype.getHeight=function(){return this._height},r.prototype.dispose=function(){this.root&&(this.root.innerHTML=""),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},r.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},r.prototype.toDataURL=function(e){var t=this.renderToString(),i="data:image/svg+xml;";return e?(t=wue(t),t&&i+"base64,"+t):i+"charset=UTF-8,"+encodeURIComponent(t)},r}();function GO(r){return function(){}}function Cme(r,e,t,i){var n;if(t&&t!=="none")if(n=Or("rect","bg",{width:r,height:e,x:"0",y:"0"}),O9(t))oq({fill:t},n.attrs,"fill",i);else if(yD(t))lq({style:{fill:t},dirty:tr,getBoundingRect:function(){return{width:r,height:e}}},n.attrs,"fill",i);else{var a=Iv(t),s=a.color,o=a.opacity;n.attrs.fill=s,o<1&&(n.attrs["fill-opacity"]=o)}return n}function Ame(r){r.registerPainter("svg",wme)}function HO(r,e,t){var i=Aa.createCanvas(),n=e.getWidth(),a=e.getHeight(),s=i.style;return s&&(s.position="absolute",s.left="0",s.top="0",s.width=n+"px",s.height=a+"px",i.setAttribute("data-zr-dom-id",r)),i.width=n*t,i.height=a*t,i}var ET=function(r){j(e,r);function e(t,i,n){var a=r.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;var s;n=n||q0,typeof t=="string"?s=HO(t,i,n):Ae(t)&&(s=t,t=s.id),a.id=t,a.dom=s;var o=s.style;return o&&(dD(s),s.onselectstart=function(){return!1},o.padding="0",o.margin="0",o.borderWidth="0"),a.painter=i,a.dpr=n,a}return 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=HO("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),t!==1&&this.ctxBack.scale(t,t)},e.prototype.createRepaintRects=function(t,i,n,a){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var s=[],o=this.maxRepaintRectCount,l=!1,u=new We(0,0,0,0);function c(y){if(!(!y.isFinite()||y.isZero()))if(s.length===0){var _=new We(0,0,0,0);_.copy(y),s.push(_)}else{for(var b=!1,T=1/0,x=0,C=0;C<s.length;++C){var D=s[C];if(D.intersect(y)){var I=new We(0,0,0,0);I.copy(D),I.union(y),s[C]=I,b=!0;break}else if(l){u.copy(y),u.union(D);var M=y.width*y.height,L=D.width*D.height,N=u.width*u.height,O=N-M-L;O<T&&(T=O,x=C)}}if(l&&(s[x].union(y),b=!0),!b){var _=new We(0,0,0,0);_.copy(y),s.push(_)}l||(l=s.length>=o)}}for(var h=this.__startIndex;h<this.__endIndex;++h){var d=t[h];if(d){var f=d.shouldBePainted(n,a,!0,!0),p=d.__isRendered&&(d.__dirty&pn||!f)?d.getPrevPaintRect():null;p&&c(p);var v=f&&(d.__dirty&pn||!d.__isRendered)?d.getPaintRect():null;v&&c(v)}}for(var h=this.__prevStartIndex;h<this.__prevEndIndex;++h){var d=i[h],f=d&&d.shouldBePainted(n,a,!0,!0);if(d&&(!f||!d.__zr)&&d.__isRendered){var p=d.getPrevPaintRect();p&&c(p)}}var g;do{g=!1;for(var h=0;h<s.length;){if(s[h].isZero()){s.splice(h,1);continue}for(var m=h+1;m<s.length;)s[h].intersect(s[m])?(g=!0,s[h].union(s[m]),s.splice(m,1)):m++;h++}}while(g);return this._paintRects=s,s},e.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},e.prototype.resize=function(t,i){var n=this.dpr,a=this.dom,s=a.style,o=this.domBack;s&&(s.width=t+"px",s.height=i+"px"),a.width=t*n,a.height=i*n,o&&(o.width=t*n,o.height=i*n,n!==1&&this.ctxBack.scale(n,n))},e.prototype.clear=function(t,i,n){var a=this.dom,s=this.ctx,o=a.width,l=a.height;i=i||this.clearColor;var u=this.motionBlur&&!t,c=this.lastFrameAlpha,h=this.dpr,d=this;u&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(a,0,0,o/h,l/h));var f=this.domBack;function p(v,g,m,y){if(s.clearRect(v,g,m,y),i&&i!=="transparent"){var _=void 0;if(dg(i)){var b=i.global||i.__width===m&&i.__height===y;_=b&&i.__canvasGradient||k2(s,i,{x:0,y:0,width:m,height:y}),i.__canvasGradient=_,i.__width=m,i.__height=y}else h9(i)&&(i.scaleX=i.scaleX||h,i.scaleY=i.scaleY||h,_=R2(s,i,{dirty:function(){d.setUnpainted(),d.painter.refresh()}}));s.save(),s.fillStyle=_||i,s.fillRect(v,g,m,y),s.restore()}u&&(s.save(),s.globalAlpha=c,s.drawImage(f,v,g,m,y),s.restore())}!n||u?p(0,0,o,l):n.length&&R(n,function(v){p(v.x*h,v.y*h,v.width*h,v.height*h)})},e}(ta),$O=1e5,ru=314159,Jm=.01,Dme=.001;function Eme(r){return r?r.__builtin__?!0:!(typeof r.resize!="function"||typeof r.refresh!="function"):!1}function Ime(r,e){var t=document.createElement("div");return t.style.cssText=["position:relative","width:"+r+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",t}var Pme=function(){function r(e,t,i,n){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var a=!e.nodeName||e.nodeName.toUpperCase()==="CANVAS";this._opts=i=Q({},i||{}),this.dpr=i.devicePixelRatio||q0,this._singleCanvas=a,this.root=e;var s=e.style;s&&(dD(e),e.innerHTML=""),this.storage=t;var o=this._zlevelList;this._prevDisplayList=[];var l=this._layers;if(a){var c=e,h=c.width,d=c.height;i.width!=null&&(h=i.width),i.height!=null&&(d=i.height),this.dpr=i.devicePixelRatio||1,c.width=h*this.dpr,c.height=d*this.dpr,this._width=h,this._height=d;var f=new ET(c,this,this.dpr);f.__builtin__=!0,f.initContext(),l[ru]=f,f.zlevel=ru,o.push(ru),this._domRoot=e}else{this._width=Ah(e,0,i),this._height=Ah(e,1,i);var u=this._domRoot=Ime(this._width,this._height);e.appendChild(u)}}return r.prototype.getType=function(){return"canvas"},r.prototype.isSingleCanvas=function(){return this._singleCanvas},r.prototype.getViewportRoot=function(){return this._domRoot},r.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},r.prototype.refresh=function(e){var t=this.storage.getDisplayList(!0),i=this._prevDisplayList,n=this._zlevelList;this._redrawId=Math.random(),this._paintList(t,i,e,this._redrawId);for(var a=0;a<n.length;a++){var s=n[a],o=this._layers[s];if(!o.__builtin__&&o.refresh){var l=a===0?this._backgroundColor:null;o.refresh(l)}}return this._opts.useDirtyRect&&(this._prevDisplayList=t.slice()),this},r.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},r.prototype._paintHoverList=function(e){var t=e.length,i=this._hoverlayer;if(i&&i.clear(),!!t){for(var n={inHover:!0,viewWidth:this._width,viewHeight:this._height},a,s=0;s<t;s++){var o=e[s];o.__inHover&&(i||(i=this._hoverlayer=this.getLayer($O)),a||(a=i.ctx,a.save()),Iu(a,o,n,s===t-1))}a&&a.restore()}},r.prototype.getHoverLayer=function(){return this.getLayer($O)},r.prototype.paintOne=function(e,t){oE(e,t)},r.prototype._paintList=function(e,t,i,n){if(this._redrawId===n){i=i||!1,this._updateLayerStatus(e);var a=this._doPaintList(e,t,i),s=a.finished,o=a.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),o&&this._paintHoverList(e),s)this.eachLayer(function(u){u.afterBrush&&u.afterBrush()});else{var l=this;V0(function(){l._paintList(e,t,i,n)})}}},r.prototype._compositeManually=function(){var e=this.getLayer(ru).ctx,t=this._domRoot.width,i=this._domRoot.height;e.clearRect(0,0,t,i),this.eachBuiltinLayer(function(n){n.virtual&&e.drawImage(n.dom,0,0,t,i)})},r.prototype._doPaintList=function(e,t,i){for(var n=this,a=[],s=this._opts.useDirtyRect,o=0;o<this._zlevelList.length;o++){var l=this._zlevelList[o],u=this._layers[l];u.__builtin__&&u!==this._hoverlayer&&(u.__dirty||i)&&a.push(u)}for(var c=!0,h=!1,d=function(v){var g=a[v],m=g.ctx,y=s&&g.createRepaintRects(e,t,f._width,f._height),_=i?g.__startIndex:g.__drawIndex,b=!i&&g.incremental&&Date.now,T=b&&Date.now(),x=g.zlevel===f._zlevelList[0]?f._backgroundColor:null;if(g.__startIndex===g.__endIndex)g.clear(!1,x,y);else if(_===g.__startIndex){var C=e[_];(!C.incremental||!C.notClear||i)&&g.clear(!1,x,y)}_===-1&&(console.error("For some unknown reason. drawIndex is -1"),_=g.__startIndex);var D,I=function(O){var B={inHover:!1,allClipped:!1,prevEl:null,viewWidth:n._width,viewHeight:n._height};for(D=_;D<g.__endIndex;D++){var F=e[D];if(F.__inHover&&(h=!0),n._doPaintEl(F,g,s,O,B,D===g.__endIndex-1),b){var U=Date.now()-T;if(U>15)break}}B.prevElClipPaths&&m.restore()};if(y)if(y.length===0)D=g.__endIndex;else for(var M=f.dpr,L=0;L<y.length;++L){var N=y[L];m.save(),m.beginPath(),m.rect(N.x*M,N.y*M,N.width*M,N.height*M),m.clip(),I(N),m.restore()}else m.save(),I(),m.restore();g.__drawIndex=D,g.__drawIndex<g.__endIndex&&(c=!1)},f=this,p=0;p<a.length;p++)d(p);return et.wxa&&R(this._layers,function(v){v&&v.ctx&&v.ctx.draw&&v.ctx.draw()}),{finished:c,needsRefreshHover:h}},r.prototype._doPaintEl=function(e,t,i,n,a,s){var o=t.ctx;if(i){var l=e.getPaintRect();(!n||l&&l.intersect(n))&&(Iu(o,e,a,s),e.setPrevPaintRect(l))}else Iu(o,e,a,s)},r.prototype.getLayer=function(e,t){this._singleCanvas&&!this._needsManuallyCompositing&&(e=ru);var i=this._layers[e];return i||(i=new ET("zr_"+e,this,this.dpr),i.zlevel=e,i.__builtin__=!0,this._layerConfig[e]?He(i,this._layerConfig[e],!0):this._layerConfig[e-Jm]&&He(i,this._layerConfig[e-Jm],!0),t&&(i.virtual=t),this.insertLayer(e,i),i.initContext()),i},r.prototype.insertLayer=function(e,t){var i=this._layers,n=this._zlevelList,a=n.length,s=this._domRoot,o=null,l=-1;if(!i[e]&&Eme(t)){if(a>0&&e>n[0]){for(l=0;l<a-1&&!(n[l]<e&&n[l+1]>e);l++);o=i[n[l]]}if(n.splice(l+1,0,e),i[e]=t,!t.virtual)if(o){var u=o.dom;u.nextSibling?s.insertBefore(t.dom,u.nextSibling):s.appendChild(t.dom)}else s.firstChild?s.insertBefore(t.dom,s.firstChild):s.appendChild(t.dom);t.painter||(t.painter=this)}},r.prototype.eachLayer=function(e,t){for(var i=this._zlevelList,n=0;n<i.length;n++){var a=i[n];e.call(t,this._layers[a],a)}},r.prototype.eachBuiltinLayer=function(e,t){for(var i=this._zlevelList,n=0;n<i.length;n++){var a=i[n],s=this._layers[a];s.__builtin__&&e.call(t,s,a)}},r.prototype.eachOtherLayer=function(e,t){for(var i=this._zlevelList,n=0;n<i.length;n++){var a=i[n],s=this._layers[a];s.__builtin__||e.call(t,s,a)}},r.prototype.getLayers=function(){return this._layers},r.prototype._updateLayerStatus=function(e){this.eachBuiltinLayer(function(h,d){h.__dirty=h.__used=!1});function t(h){a&&(a.__endIndex!==h&&(a.__dirty=!0),a.__endIndex=h)}if(this._singleCanvas)for(var i=1;i<e.length;i++){var n=e[i];if(n.zlevel!==e[i-1].zlevel||n.incremental){this._needsManuallyCompositing=!0;break}}var a=null,s=0,o,l;for(l=0;l<e.length;l++){var n=e[l],u=n.zlevel,c=void 0;o!==u&&(o=u,s=0),n.incremental?(c=this.getLayer(u+Dme,this._needsManuallyCompositing),c.incremental=!0,s=1):c=this.getLayer(u+(s>0?Jm:0),this._needsManuallyCompositing),c.__builtin__||m1("ZLevel "+u+" has been used by unkown layer "+c.id),c!==a&&(c.__used=!0,c.__startIndex!==l&&(c.__dirty=!0),c.__startIndex=l,c.incremental?c.__drawIndex=-1:c.__drawIndex=l,t(l),a=c),n.__dirty&pn&&!n.__inHover&&(c.__dirty=!0,c.incremental&&c.__drawIndex<0&&(c.__drawIndex=l))}t(l),this.eachBuiltinLayer(function(h,d){!h.__used&&h.getElementCount()>0&&(h.__dirty=!0,h.__startIndex=h.__endIndex=h.__drawIndex=0),h.__dirty&&h.__drawIndex<0&&(h.__drawIndex=h.__startIndex)})},r.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},r.prototype._clearLayer=function(e){e.clear()},r.prototype.setBackgroundColor=function(e){this._backgroundColor=e,R(this._layers,function(t){t.setUnpainted()})},r.prototype.configLayer=function(e,t){if(t){var i=this._layerConfig;i[e]?He(i[e],t,!0):i[e]=t;for(var n=0;n<this._zlevelList.length;n++){var a=this._zlevelList[n];if(a===e||a===e+Jm){var s=this._layers[a];He(s,i[e],!0)}}}},r.prototype.delLayer=function(e){var t=this._layers,i=this._zlevelList,n=t[e];n&&(n.dom.parentNode.removeChild(n.dom),delete t[e],i.splice(Xe(i,e),1))},r.prototype.resize=function(e,t){if(this._domRoot.style){var i=this._domRoot;i.style.display="none";var n=this._opts,a=this.root;if(e!=null&&(n.width=e),t!=null&&(n.height=t),e=Ah(a,0,n),t=Ah(a,1,n),i.style.display="",this._width!==e||t!==this._height){i.style.width=e+"px",i.style.height=t+"px";for(var s in this._layers)this._layers.hasOwnProperty(s)&&this._layers[s].resize(e,t);this.refresh(!0)}this._width=e,this._height=t}else{if(e==null||t==null)return;this._width=e,this._height=t,this.getLayer(ru).resize(e,t)}return this},r.prototype.clearLayer=function(e){var t=this._layers[e];t&&t.clear()},r.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},r.prototype.getRenderedCanvas=function(e){if(e=e||{},this._singleCanvas&&!this._compositeManually)return this._layers[ru].dom;var t=new ET("image",this,e.pixelRatio||this.dpr);t.initContext(),t.clear(!1,e.backgroundColor||this._backgroundColor);var i=t.ctx;if(e.pixelRatio<=this.dpr){this.refresh();var n=t.dom.width,a=t.dom.height;this.eachLayer(function(h){h.__builtin__?i.drawImage(h.dom,0,0,n,a):h.renderToCanvas&&(i.save(),h.renderToCanvas(i),i.restore())})}else for(var s={inHover:!1,viewWidth:this._width,viewHeight:this._height},o=this.storage.getDisplayList(!0),l=0,u=o.length;l<u;l++){var c=o[l];Iu(i,c,s,l===u-1)}return t.dom},r.prototype.getWidth=function(){return this._width},r.prototype.getHeight=function(){return this._height},r}();function Mme(r){r.registerPainter("canvas",Pme)}var Lme=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t){return _s(null,this,{useEncodeDefaulter:!0})},e.prototype.getLegendIcon=function(t){var i=new Le,n=cr("line",0,t.itemHeight/2,t.itemWidth,0,t.lineStyle.stroke,!1);i.add(n),n.setStyle(t.lineStyle);var a=this.getData().getVisual("symbol"),s=this.getData().getVisual("symbolRotate"),o=a==="none"?"circle":a,l=t.itemHeight*.8,u=cr(o,(t.itemWidth-l)/2,(t.itemHeight-l)/2,l,l,t.itemStyle.fill);i.add(u),u.setStyle(t.itemStyle);var c=t.iconRotate==="inherit"?s:t.iconRotate||0;return u.rotation=c*Math.PI/180,u.setOrigin([t.itemWidth/2,t.itemHeight/2]),o.indexOf("empty")>-1&&(u.style.stroke=u.style.fill,u.style.fill="#fff",u.style.lineWidth=2),i},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(Ct);function Tf(r,e){var t=r.mapDimensionsAll("defaultedLabel"),i=t.length;if(i===1){var n=bf(r,e,t[0]);return n!=null?n+"":null}else if(i){for(var a=[],s=0;s<t.length;s++)a.push(bf(r,e,t[s]));return a.join(" ")}}function fq(r,e){var t=r.mapDimensionsAll("defaultedLabel");if(!ie(e))return e+"";for(var i=[],n=0;n<t.length;n++){var a=r.getDimensionIndex(t[n]);a>=0&&i.push(e[a])}return i.join(" ")}var Dg=function(r){j(e,r);function e(t,i,n,a){var s=r.call(this)||this;return s.updateData(t,i,n,a),s}return e.prototype._createSymbol=function(t,i,n,a,s){this.removeAll();var o=cr(t,-1,-1,2,2,null,s);o.attr({z2:100,culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),o.drift=kme,this._symbolType=t,this.add(o)},e.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){Js(this.childAt(0))},e.prototype.downplay=function(){eo(this.childAt(0))},e.prototype.setZ=function(t,i){var n=this.childAt(0);n.zlevel=t,n.z=i},e.prototype.setDraggable=function(t,i){var n=this.childAt(0);n.draggable=t,n.cursor=!i&&t?"move":n.cursor},e.prototype.updateData=function(t,i,n,a){this.silent=!1;var s=t.getItemVisual(i,"symbol")||"circle",o=t.hostModel,l=e.getSymbolSize(t,i),u=s!==this._symbolType,c=a&&a.disableAnimation;if(u){var h=t.getItemVisual(i,"symbolKeepAspect");this._createSymbol(s,t,i,l,h)}else{var d=this.childAt(0);d.silent=!1;var f={scaleX:l[0]/2,scaleY:l[1]/2};c?d.attr(f):ct(d,f,o,i),Ia(d)}if(this._updateCommon(t,i,l,n,a),u){var d=this.childAt(0);if(!c){var f={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:d.style.opacity}};d.scaleX=d.scaleY=0,d.style.opacity=0,Bt(d,f,o,i)}}c&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(t,i,n,a,s){var o=this.childAt(0),l=t.hostModel,u,c,h,d,f,p,v,g,m;if(a&&(u=a.emphasisItemStyle,c=a.blurItemStyle,h=a.selectItemStyle,d=a.focus,f=a.blurScope,v=a.labelStatesModels,g=a.hoverScale,m=a.cursorStyle,p=a.emphasisDisabled),!a||t.hasItemOption){var y=a&&a.itemModel?a.itemModel:t.getItemModel(i),_=y.getModel("emphasis");u=_.getModel("itemStyle").getItemStyle(),h=y.getModel(["select","itemStyle"]).getItemStyle(),c=y.getModel(["blur","itemStyle"]).getItemStyle(),d=_.get("focus"),f=_.get("blurScope"),p=_.get("disabled"),v=Br(y),g=_.getShallow("scale"),m=y.getShallow("cursor")}var b=t.getItemVisual(i,"symbolRotate");o.attr("rotation",(b||0)*Math.PI/180||0);var T=_c(t.getItemVisual(i,"symbolOffset"),n);T&&(o.x=T[0],o.y=T[1]),m&&o.attr("cursor",m);var x=t.getItemVisual(i,"style"),C=x.fill;if(o instanceof Ur){var D=o.style;o.useStyle(Q({image:D.image,x:D.x,y:D.y,width:D.width,height:D.height},x))}else o.__isEmptyBrush?o.useStyle(Q({},x)):o.useStyle(x),o.style.decal=null,o.setColor(C,s&&s.symbolInnerColor),o.style.strokeNoScale=!0;var I=t.getItemVisual(i,"liftZ"),M=this._z2;I!=null?M==null&&(this._z2=o.z2,o.z2+=I):M!=null&&(o.z2=M,this._z2=null);var L=s&&s.useNameLabel;ti(o,v,{labelFetcher:l,labelDataIndex:i,defaultText:N,inheritColor:C,defaultOpacity:x.opacity});function N(F){return L?t.getName(F):Tf(t,F)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;var O=o.ensureState("emphasis");O.style=u,o.ensureState("select").style=h,o.ensureState("blur").style=c;var B=g==null||g===!0?Math.max(1.1,3/this._sizeY):isFinite(g)&&g>0?+g:1;O.scaleX=this._sizeX*B,O.scaleY=this._sizeY*B,this.setSymbolScale(1),Kt(this,d,f,p)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,i,n){var a=this.childAt(0),s=ke(this).dataIndex,o=n&&n.animation;if(this.silent=a.silent=!0,n&&n.fadeLabel){var l=a.getTextContent();l&&ol(l,{style:{opacity:0}},i,{dataIndex:s,removeOpt:o,cb:function(){a.removeTextContent()}})}else a.removeTextContent();ol(a,{style:{opacity:0},scaleX:0,scaleY:0},i,{dataIndex:s,cb:t,removeOpt:o})},e.getSymbolSize=function(t,i){return Jf(t.getItemVisual(i,"symbolSize"))},e}(Le);function kme(r,e){this.parent.drift(r,e)}function IT(r,e,t,i){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(i.isIgnore&&i.isIgnore(t))&&!(i.clipShape&&!i.clipShape.contain(e[0],e[1]))&&r.getItemVisual(t,"symbol")!=="none"}function WO(r){return r!=null&&!Ae(r)&&(r={isIgnore:r}),r||{}}function qO(r){var e=r.hostModel,t=e.getModel("emphasis");return{emphasisItemStyle:t.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:t.get("focus"),blurScope:t.get("blurScope"),emphasisDisabled:t.get("disabled"),hoverScale:t.get("scale"),labelStatesModels:Br(e),cursorStyle:e.get("cursor")}}var Eg=function(){function r(e){this.group=new Le,this._SymbolCtor=e||Dg}return r.prototype.updateData=function(e,t){this._progressiveEls=null,t=WO(t);var i=this.group,n=e.hostModel,a=this._data,s=this._SymbolCtor,o=t.disableAnimation,l=qO(e),u={disableAnimation:o},c=t.getSymbolPoint||function(h){return e.getItemLayout(h)};a||i.removeAll(),e.diff(a).add(function(h){var d=c(h);if(IT(e,d,h,t)){var f=new s(e,h,l,u);f.setPosition(d),e.setItemGraphicEl(h,f),i.add(f)}}).update(function(h,d){var f=a.getItemGraphicEl(d),p=c(h);if(!IT(e,p,h,t)){i.remove(f);return}var v=e.getItemVisual(h,"symbol")||"circle",g=f&&f.getSymbolType&&f.getSymbolType();if(!f||g&&g!==v)i.remove(f),f=new s(e,h,l,u),f.setPosition(p);else{f.updateData(e,h,l,u);var m={x:p[0],y:p[1]};o?f.attr(m):ct(f,m,n)}i.add(f),e.setItemGraphicEl(h,f)}).remove(function(h){var d=a.getItemGraphicEl(h);d&&d.fadeOut(function(){i.remove(d)},n)}).execute(),this._getSymbolPoint=c,this._data=e},r.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl(function(i,n){var a=e._getSymbolPoint(n);i.setPosition(a),i.markRedraw()})},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=qO(e),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t,i){this._progressiveEls=[],i=WO(i);function n(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var a=e.start;a<e.end;a++){var s=t.getItemLayout(a);if(IT(t,s,a,i)){var o=new this._SymbolCtor(t,a,this._seriesScope);o.traverse(n),o.setPosition(s),this.group.add(o),t.setItemGraphicEl(a,o),this._progressiveEls.push(o)}}},r.prototype.eachRendered=function(e){gl(this._progressiveEls||this.group,e)},r.prototype.remove=function(e){var t=this.group,i=this._data;i&&e?i.eachItemGraphicEl(function(n){n.fadeOut(function(){t.remove(n)},i.hostModel)}):t.removeAll()},r}();function dq(r,e,t){var i=r.getBaseAxis(),n=r.getOtherAxis(i),a=Rme(n,t),s=i.dim,o=n.dim,l=e.mapDimension(o),u=e.mapDimension(s),c=o==="x"||o==="radius"?1:0,h=ae(r.dimensions,function(p){return e.mapDimension(p)}),d=!1,f=e.getCalculationInfo("stackResultDimension");return ro(e,h[0])&&(d=!0,h[0]=f),ro(e,h[1])&&(d=!0,h[1]=f),{dataDimsForPoint:h,valueStart:a,valueAxisDim:o,baseAxisDim:s,stacked:!!d,valueDim:l,baseDim:u,baseDataOffset:c,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function Rme(r,e){var t=0,i=r.scale.getExtent();return e==="start"?t=i[0]:e==="end"?t=i[1]:ut(e)&&!isNaN(e)?t=e:i[0]>0?t=i[0]:i[1]<0&&(t=i[1]),t}function pq(r,e,t,i){var n=NaN;r.stacked&&(n=t.get(t.getCalculationInfo("stackedOverDimension"),i)),isNaN(n)&&(n=r.valueStart);var a=r.baseDataOffset,s=[];return s[a]=t.get(r.baseDim,i),s[1-a]=n,e.dataToPoint(s)}function Ome(r,e){var t=[];return e.diff(r).add(function(i){t.push({cmd:"+",idx:i})}).update(function(i,n){t.push({cmd:"=",idx:n,idx1:i})}).remove(function(i){t.push({cmd:"-",idx:i})}).execute(),t}function Nme(r,e,t,i,n,a,s,o){for(var l=Ome(r,e),u=[],c=[],h=[],d=[],f=[],p=[],v=[],g=dq(n,e,s),m=r.getLayout("points")||[],y=e.getLayout("points")||[],_=0;_<l.length;_++){var b=l[_],T=!0,x=void 0,C=void 0;switch(b.cmd){case"=":x=b.idx*2,C=b.idx1*2;var D=m[x],I=m[x+1],M=y[C],L=y[C+1];(isNaN(D)||isNaN(I))&&(D=M,I=L),u.push(D,I),c.push(M,L),h.push(t[x],t[x+1]),d.push(i[C],i[C+1]),v.push(e.getRawIndex(b.idx1));break;case"+":var N=b.idx,O=g.dataDimsForPoint,B=n.dataToPoint([e.get(O[0],N),e.get(O[1],N)]);C=N*2,u.push(B[0],B[1]),c.push(y[C],y[C+1]);var F=pq(g,n,e,N);h.push(F[0],F[1]),d.push(i[C],i[C+1]),v.push(e.getRawIndex(N));break;case"-":T=!1}T&&(f.push(b),p.push(p.length))}p.sort(function(Ie,Oe){return v[Ie]-v[Oe]});for(var U=u.length,$=ts(U),q=ts(U),Z=ts(U),te=ts(U),J=[],_=0;_<p.length;_++){var oe=p[_],he=_*2,ue=oe*2;$[he]=u[ue],$[he+1]=u[ue+1],q[he]=c[ue],q[he+1]=c[ue+1],Z[he]=h[ue],Z[he+1]=h[ue+1],te[he]=d[ue],te[he+1]=d[ue+1],J[_]=f[oe]}return{current:$,next:q,stackedOnCurrent:Z,stackedOnNext:te,status:J}}var Co=Math.min,Ao=Math.max;function Yu(r,e){return isNaN(r)||isNaN(e)}function W2(r,e,t,i,n,a,s,o,l){for(var u,c,h,d,f,p,v=t,g=0;g<i;g++){var m=e[v*2],y=e[v*2+1];if(v>=n||v<0)break;if(Yu(m,y)){if(l){v+=a;continue}break}if(v===t)r[a>0?"moveTo":"lineTo"](m,y),h=m,d=y;else{var _=m-u,b=y-c;if(_*_+b*b<.5){v+=a;continue}if(s>0){for(var T=v+a,x=e[T*2],C=e[T*2+1];x===m&&C===y&&g<i;)g++,T+=a,v+=a,x=e[T*2],C=e[T*2+1],m=e[v*2],y=e[v*2+1],_=m-u,b=y-c;var D=g+1;if(l)for(;Yu(x,C)&&D<i;)D++,T+=a,x=e[T*2],C=e[T*2+1];var I=.5,M=0,L=0,N=void 0,O=void 0;if(D>=i||Yu(x,C))f=m,p=y;else{M=x-u,L=C-c;var B=m-u,F=x-m,U=y-c,$=C-y,q=void 0,Z=void 0;if(o==="x"){q=Math.abs(B),Z=Math.abs(F);var te=M>0?1:-1;f=m-te*q*s,p=y,N=m+te*Z*s,O=y}else if(o==="y"){q=Math.abs(U),Z=Math.abs($);var J=L>0?1:-1;f=m,p=y-J*q*s,N=m,O=y+J*Z*s}else q=Math.sqrt(B*B+U*U),Z=Math.sqrt(F*F+$*$),I=Z/(Z+q),f=m-M*s*(1-I),p=y-L*s*(1-I),N=m+M*s*I,O=y+L*s*I,N=Co(N,Ao(x,m)),O=Co(O,Ao(C,y)),N=Ao(N,Co(x,m)),O=Ao(O,Co(C,y)),M=N-m,L=O-y,f=m-M*q/Z,p=y-L*q/Z,f=Co(f,Ao(u,m)),p=Co(p,Ao(c,y)),f=Ao(f,Co(u,m)),p=Ao(p,Co(c,y)),M=m-f,L=y-p,N=m+M*Z/q,O=y+L*Z/q}r.bezierCurveTo(h,d,f,p,m,y),h=N,d=O}else r.lineTo(m,y)}u=m,c=y,v+=a}return g}var vq=function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r}(),Bme=function(r){j(e,r);function e(t){var i=r.call(this,t)||this;return i.type="ec-polyline",i}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new vq},e.prototype.buildPath=function(t,i){var n=i.points,a=0,s=n.length/2;if(i.connectNulls){for(;s>0&&Yu(n[s*2-2],n[s*2-1]);s--);for(;a<s&&Yu(n[a*2],n[a*2+1]);a++);}for(;a<s;)a+=W2(t,n,a,s,s,1,i.smooth,i.smoothMonotone,i.connectNulls)+1},e.prototype.getPointOn=function(t,i){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var n=this.path,a=n.data,s=gs.CMD,o,l,u=i==="x",c=[],h=0;h<a.length;){var d=a[h++],f=void 0,p=void 0,v=void 0,g=void 0,m=void 0,y=void 0,_=void 0;switch(d){case s.M:o=a[h++],l=a[h++];break;case s.L:if(f=a[h++],p=a[h++],_=u?(t-o)/(f-o):(t-l)/(p-l),_<=1&&_>=0){var b=u?(p-l)*_+l:(f-o)*_+o;return u?[t,b]:[b,t]}o=f,l=p;break;case s.C:f=a[h++],p=a[h++],v=a[h++],g=a[h++],m=a[h++],y=a[h++];var T=u?G0(o,f,v,m,t,c):G0(l,p,g,y,t,c);if(T>0)for(var x=0;x<T;x++){var C=c[x];if(C<=1&&C>=0){var b=u?Lr(l,p,g,y,C):Lr(o,f,v,m,C);return u?[t,b]:[b,t]}}o=m,l=y;break}}},e}(Je),Fme=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e}(vq),gq=function(r){j(e,r);function e(t){var i=r.call(this,t)||this;return i.type="ec-polygon",i}return e.prototype.getDefaultShape=function(){return new Fme},e.prototype.buildPath=function(t,i){var n=i.points,a=i.stackedOnPoints,s=0,o=n.length/2,l=i.smoothMonotone;if(i.connectNulls){for(;o>0&&Yu(n[o*2-2],n[o*2-1]);o--);for(;s<o&&Yu(n[s*2],n[s*2+1]);s++);}for(;s<o;){var u=W2(t,n,s,o,o,1,i.smooth,l,i.connectNulls);W2(t,a,s+u-1,u,o,-1,i.stackedOnSmooth,l,i.connectNulls),s+=u+1,t.closePath()}},e}(Je);function mq(r,e,t,i,n){var a=r.getArea(),s=a.x,o=a.y,l=a.width,u=a.height,c=t.get(["lineStyle","width"])||2;s-=c/2,o-=c/2,l+=c,u+=c,l=Math.ceil(l),s!==Math.floor(s)&&(s=Math.floor(s),l++);var h=new at({shape:{x:s,y:o,width:l,height:u}});if(e){var d=r.getBaseAxis(),f=d.isHorizontal(),p=d.inverse;f?(p&&(h.shape.x+=l),h.shape.width=0):(p||(h.shape.y+=u),h.shape.height=0);var v=xe(n)?function(g){n(g,h)}:null;Bt(h,{shape:{width:l,height:u,x:s,y:o}},t,null,i,v)}return h}function yq(r,e,t){var i=r.getArea(),n=Yt(i.r0,1),a=Yt(i.r,1),s=new di({shape:{cx:Yt(r.cx,1),cy:Yt(r.cy,1),r0:n,r:a,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}});if(e){var o=r.getBaseAxis().dim==="angle";o?s.shape.endAngle=i.startAngle:s.shape.r=n,Bt(s,{shape:{endAngle:i.endAngle,r:a}},t)}return s}function Ig(r,e,t,i,n){if(r){if(r.type==="polar")return yq(r,e,t);if(r.type==="cartesian2d")return mq(r,e,t,i,n)}else return null;return null}function bc(r,e){return r.type===e}function jO(r,e){if(r.length===e.length){for(var t=0;t<r.length;t++)if(r[t]!==e[t])return;return!0}}function XO(r){for(var e=1/0,t=1/0,i=-1/0,n=-1/0,a=0;a<r.length;){var s=r[a++],o=r[a++];isNaN(s)||(e=Math.min(s,e),i=Math.max(s,i)),isNaN(o)||(t=Math.min(o,t),n=Math.max(o,n))}return[[e,t],[i,n]]}function YO(r,e){var t=XO(r),i=t[0],n=t[1],a=XO(e),s=a[0],o=a[1];return Math.max(Math.abs(i[0]-s[0]),Math.abs(i[1]-s[1]),Math.abs(n[0]-o[0]),Math.abs(n[1]-o[1]))}function KO(r){return ut(r)?r:r?.5:0}function Ume(r,e,t){if(!t.valueDim)return[];for(var i=e.count(),n=ts(i*2),a=0;a<i;a++){var s=pq(t,r,e,a);n[a*2]=s[0],n[a*2+1]=s[1]}return n}function Do(r,e,t,i){var n=e.getBaseAxis(),a=n.dim==="x"||n.dim==="radius"?0:1,s=[],o=0,l=[],u=[],c=[],h=[];if(i){for(o=0;o<r.length;o+=2)!isNaN(r[o])&&!isNaN(r[o+1])&&h.push(r[o],r[o+1]);r=h}for(o=0;o<r.length-2;o+=2)switch(c[0]=r[o+2],c[1]=r[o+3],u[0]=r[o],u[1]=r[o+1],s.push(u[0],u[1]),t){case"end":l[a]=c[a],l[1-a]=u[1-a],s.push(l[0],l[1]);break;case"middle":var d=(u[a]+c[a])/2,f=[];l[a]=f[a]=d,l[1-a]=u[1-a],f[1-a]=c[1-a],s.push(l[0],l[1]),s.push(f[0],f[1]);break;default:l[a]=u[a],l[1-a]=c[1-a],s.push(l[0],l[1])}return s.push(r[o++],r[o++]),s}function Vme(r,e){var t=[],i=r.length,n,a;function s(c,h,d){var f=c.coord,p=(d-f)/(h.coord-f),v=mD(p,[c.color,h.color]);return{coord:d,color:v}}for(var o=0;o<i;o++){var l=r[o],u=l.coord;if(u<0)n=l;else if(u>e){a?t.push(s(a,l,e)):n&&t.push(s(n,l,0),s(n,l,e));break}else n&&(t.push(s(n,l,0)),n=null),t.push(l),a=l}return t}function zme(r,e,t){var i=r.getVisual("visualMeta");if(!(!i||!i.length||!r.count())&&e.type==="cartesian2d"){for(var n,a,s=i.length-1;s>=0;s--){var o=r.getDimensionInfo(i[s].dimension);if(n=o&&o.coordDim,n==="x"||n==="y"){a=i[s];break}}if(a){var l=e.getAxis(n),u=ae(a.stops,function(_){return{coord:l.toGlobalCoord(l.dataToCoord(_.value)),color:_.color}}),c=u.length,h=a.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),h.reverse());var d=Vme(u,n==="x"?t.getWidth():t.getHeight()),f=d.length;if(!f&&c)return u[0].coord<0?h[1]?h[1]:u[c-1].color:h[0]?h[0]:u[0].color;var p=10,v=d[0].coord-p,g=d[f-1].coord+p,m=g-v;if(m<.001)return"transparent";R(d,function(_){_.offset=(_.coord-v)/m}),d.push({offset:f?d[f-1].offset:.5,color:h[1]||"transparent"}),d.unshift({offset:f?d[0].offset:.5,color:h[0]||"transparent"});var y=new Gf(0,0,0,0,d,!0);return y[n]=v,y[n+"2"]=g,y}}}function Gme(r,e,t){var i=r.get("showAllSymbol"),n=i==="auto";if(!(i&&!n)){var a=t.getAxesByScale("ordinal")[0];if(a&&!(n&&Hme(a,e))){var s=e.mapDimension(a.dim),o={};return R(a.getViewLabels(),function(l){var u=a.scale.getRawOrdinalNumber(l.tickValue);o[u]=1}),function(l){return!o.hasOwnProperty(e.get(s,l))}}}}function Hme(r,e){var t=r.getExtent(),i=Math.abs(t[1]-t[0])/r.scale.count();isNaN(i)&&(i=0);for(var n=e.count(),a=Math.max(1,Math.round(n/5)),s=0;s<n;s+=a)if(Dg.getSymbolSize(e,s)[r.isHorizontal()?1:0]*1.5>i)return!1;return!0}function $me(r,e){return isNaN(r)||isNaN(e)}function Wme(r){for(var e=r.length/2;e>0&&$me(r[e*2-2],r[e*2-1]);e--);return e-1}function ZO(r,e){return[r[e*2],r[e*2+1]]}function qme(r,e,t){for(var i=r.length/2,n=t==="x"?0:1,a,s,o=0,l=-1,u=0;u<i;u++)if(s=r[u*2+n],!(isNaN(s)||isNaN(r[u*2+1-n]))){if(u===0){a=s;continue}if(a<=e&&s>=e||a>=e&&s<=e){l=u;break}o=u,a=s}return{range:[o,l],t:(e-a)/(s-a)}}function _q(r){if(r.get(["endLabel","show"]))return!0;for(var e=0;e<Oi.length;e++)if(r.get([Oi[e],"endLabel","show"]))return!0;return!1}function PT(r,e,t,i){if(bc(e,"cartesian2d")){var n=i.getModel("endLabel"),a=n.get("valueAnimation"),s=i.getData(),o={lastFrameIndex:0},l=_q(i)?function(f,p){r._endLabelOnDuring(f,p,s,o,a,n,e)}:null,u=e.getBaseAxis().isHorizontal(),c=mq(e,t,i,function(){var f=r._endLabel;f&&t&&o.originalX!=null&&f.attr({x:o.originalX,y:o.originalY})},l);if(!i.get("clip",!0)){var h=c.shape,d=Math.max(h.width,h.height);u?(h.y-=d,h.height+=d*2):(h.x-=d,h.width+=d*2)}return l&&l(1,c),c}else return yq(e,t,i)}function jme(r,e){var t=e.getBaseAxis(),i=t.isHorizontal(),n=t.inverse,a=i?n?"right":"left":"center",s=i?"middle":n?"top":"bottom";return{normal:{align:r.get("align")||a,verticalAlign:r.get("verticalAlign")||s}}}var Xme=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(){var t=new Le,i=new Eg;this.group.add(i.group),this._symbolDraw=i,this._lineGroup=t},e.prototype.render=function(t,i,n){var a=this,s=t.coordinateSystem,o=this.group,l=t.getData(),u=t.getModel("lineStyle"),c=t.getModel("areaStyle"),h=l.getLayout("points")||[],d=s.type==="polar",f=this._coordSys,p=this._symbolDraw,v=this._polyline,g=this._polygon,m=this._lineGroup,y=!i.ssr&&t.get("animation"),_=!c.isEmpty(),b=c.get("origin"),T=dq(s,l,b),x=_&&Ume(s,l,T),C=t.get("showSymbol"),D=t.get("connectNulls"),I=C&&!d&&Gme(t,l,s),M=this._data;M&&M.eachItemGraphicEl(function(Oe,Ue){Oe.__temp&&(o.remove(Oe),M.setItemGraphicEl(Ue,null))}),C||p.remove(),o.add(m);var L=d?!1:t.get("step"),N;s&&s.getArea&&t.get("clip",!0)&&(N=s.getArea(),N.width!=null?(N.x-=.1,N.y-=.1,N.width+=.2,N.height+=.2):N.r0&&(N.r0-=.5,N.r+=.5)),this._clipShapeForSymbol=N;var O=zme(l,s,n)||l.getVisual("style")[l.getVisual("drawType")];if(!(v&&f.type===s.type&&L===this._step))C&&p.updateData(l,{isIgnore:I,clipShape:N,disableAnimation:!0,getSymbolPoint:function(Oe){return[h[Oe*2],h[Oe*2+1]]}}),y&&this._initSymbolLabelAnimation(l,s,N),L&&(h=Do(h,s,L,D),x&&(x=Do(x,s,L,D))),v=this._newPolyline(h),_?g=this._newPolygon(h,x):g&&(m.remove(g),g=this._polygon=null),d||this._initOrUpdateEndLabel(t,s,uc(O)),m.setClipPath(PT(this,s,!0,t));else{_&&!g?g=this._newPolygon(h,x):g&&!_&&(m.remove(g),g=this._polygon=null),d||this._initOrUpdateEndLabel(t,s,uc(O));var B=m.getClipPath();if(B){var F=PT(this,s,!1,t);Bt(B,{shape:F.shape},t)}else m.setClipPath(PT(this,s,!0,t));C&&p.updateData(l,{isIgnore:I,clipShape:N,disableAnimation:!0,getSymbolPoint:function(Oe){return[h[Oe*2],h[Oe*2+1]]}}),(!jO(this._stackedOnPoints,x)||!jO(this._points,h))&&(y?this._doUpdateAnimation(l,x,s,n,L,b,D):(L&&(h=Do(h,s,L,D),x&&(x=Do(x,s,L,D))),v.setShape({points:h}),g&&g.setShape({points:h,stackedOnPoints:x})))}var U=t.getModel("emphasis"),$=U.get("focus"),q=U.get("blurScope"),Z=U.get("disabled");if(v.useStyle(Ce(u.getLineStyle(),{fill:"none",stroke:O,lineJoin:"bevel"})),ei(v,t,"lineStyle"),v.style.lineWidth>0&&t.get(["emphasis","lineStyle","width"])==="bolder"){var te=v.getState("emphasis").style;te.lineWidth=+v.style.lineWidth+1}ke(v).seriesIndex=t.seriesIndex,Kt(v,$,q,Z);var J=KO(t.get("smooth")),oe=t.get("smoothMonotone");if(v.setShape({smooth:J,smoothMonotone:oe,connectNulls:D}),g){var he=l.getCalculationInfo("stackedOnSeries"),ue=0;g.useStyle(Ce(c.getAreaStyle(),{fill:O,opacity:.7,lineJoin:"bevel",decal:l.getVisual("style").decal})),he&&(ue=KO(he.get("smooth"))),g.setShape({smooth:J,stackedOnSmooth:ue,smoothMonotone:oe,connectNulls:D}),ei(g,t,"areaStyle"),ke(g).seriesIndex=t.seriesIndex,Kt(g,$,q,Z)}var Ie=function(Oe){a._changePolyState(Oe)};l.eachItemGraphicEl(function(Oe){Oe&&(Oe.onHoverStateChange=Ie)}),this._polyline.onHoverStateChange=Ie,this._data=l,this._coordSys=s,this._stackedOnPoints=x,this._points=h,this._step=L,this._valueOrigin=b,t.get("triggerLineEvent")&&(this.packEventData(t,v),g&&this.packEventData(t,g))},e.prototype.packEventData=function(t,i){ke(i).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},e.prototype.highlight=function(t,i,n,a){var s=t.getData(),o=sc(s,a);if(this._changePolyState("emphasis"),!(o instanceof Array)&&o!=null&&o>=0){var l=s.getLayout("points"),u=s.getItemGraphicEl(o);if(!u){var c=l[o*2],h=l[o*2+1];if(isNaN(c)||isNaN(h)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,h))return;var d=t.get("zlevel")||0,f=t.get("z")||0;u=new Dg(s,o),u.x=c,u.y=h,u.setZ(d,f);var p=u.getSymbolPath().getTextContent();p&&(p.zlevel=d,p.z=f,p.z2=this._polyline.z2+1),u.__temp=!0,s.setItemGraphicEl(o,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else Tt.prototype.highlight.call(this,t,i,n,a)},e.prototype.downplay=function(t,i,n,a){var s=t.getData(),o=sc(s,a);if(this._changePolyState("normal"),o!=null&&o>=0){var l=s.getItemGraphicEl(o);l&&(l.__temp?(s.setItemGraphicEl(o,null),this.group.remove(l)):l.downplay())}else Tt.prototype.downplay.call(this,t,i,n,a)},e.prototype._changePolyState=function(t){var i=this._polygon;Y0(this._polyline,t),i&&Y0(i,t)},e.prototype._newPolyline=function(t){var i=this._polyline;return i&&this._lineGroup.remove(i),i=new Bme({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(i),this._polyline=i,i},e.prototype._newPolygon=function(t,i){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new gq({shape:{points:t,stackedOnPoints:i},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},e.prototype._initSymbolLabelAnimation=function(t,i,n){var a,s,o=i.getBaseAxis(),l=o.inverse;i.type==="cartesian2d"?(a=o.isHorizontal(),s=!1):i.type==="polar"&&(a=o.dim==="angle",s=!0);var u=t.hostModel,c=u.get("animationDuration");xe(c)&&(c=c(null));var h=u.get("animationDelay")||0,d=xe(h)?h(null):h;t.eachItemGraphicEl(function(f,p){var v=f;if(v){var g=[f.x,f.y],m=void 0,y=void 0,_=void 0;if(n)if(s){var b=n,T=i.pointToCoord(g);a?(m=b.startAngle,y=b.endAngle,_=-T[1]/180*Math.PI):(m=b.r0,y=b.r,_=T[0])}else{var x=n;a?(m=x.x,y=x.x+x.width,_=f.x):(m=x.y+x.height,y=x.y,_=f.y)}var C=y===m?0:(_-m)/(y-m);l&&(C=1-C);var D=xe(h)?h(p):c*C+d,I=v.getSymbolPath(),M=I.getTextContent();v.attr({scaleX:0,scaleY:0}),v.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:D}),M&&M.animateFrom({style:{opacity:0}},{duration:300,delay:D}),I.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(t,i,n){var a=t.getModel("endLabel");if(_q(t)){var s=t.getData(),o=this._polyline,l=s.getLayout("points");if(!l){o.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new nt({z2:200}),u.ignoreClip=!0,o.setTextContent(this._endLabel),o.disableLabelAnimation=!0);var c=Wme(l);c>=0&&(ti(o,Br(t,"endLabel"),{inheritColor:n,labelFetcher:t,labelDataIndex:c,defaultText:function(h,d,f){return f!=null?fq(s,f):Tf(s,h)},enableTextSetter:!0},jme(a,i)),o.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,i,n,a,s,o,l){var u=this._endLabel,c=this._polyline;if(u){t<1&&a.originalX==null&&(a.originalX=u.x,a.originalY=u.y);var h=n.getLayout("points"),d=n.hostModel,f=d.get("connectNulls"),p=o.get("precision"),v=o.get("distance")||0,g=l.getBaseAxis(),m=g.isHorizontal(),y=g.inverse,_=i.shape,b=y?m?_.x:_.y+_.height:m?_.x+_.width:_.y,T=(m?v:0)*(y?-1:1),x=(m?0:-v)*(y?-1:1),C=m?"x":"y",D=qme(h,b,C),I=D.range,M=I[1]-I[0],L=void 0;if(M>=1){if(M>1&&!f){var N=ZO(h,I[0]);u.attr({x:N[0]+T,y:N[1]+x}),s&&(L=d.getRawValue(I[0]))}else{var N=c.getPointOn(b,C);N&&u.attr({x:N[0]+T,y:N[1]+x});var O=d.getRawValue(I[0]),B=d.getRawValue(I[1]);s&&(L=iH(n,p,O,B,D.t))}a.lastFrameIndex=I[0]}else{var F=t===1||a.lastFrameIndex>0?I[0]:0,N=ZO(h,F);s&&(L=d.getRawValue(F)),u.attr({x:N[0]+T,y:N[1]+x})}if(s){var U=qf(u);typeof U.setLabelText=="function"&&U.setLabelText(L)}}},e.prototype._doUpdateAnimation=function(t,i,n,a,s,o,l){var u=this._polyline,c=this._polygon,h=t.hostModel,d=Nme(this._data,t,this._stackedOnPoints,i,this._coordSys,n,this._valueOrigin),f=d.current,p=d.stackedOnCurrent,v=d.next,g=d.stackedOnNext;if(s&&(f=Do(d.current,n,s,l),p=Do(d.stackedOnCurrent,n,s,l),v=Do(d.next,n,s,l),g=Do(d.stackedOnNext,n,s,l)),YO(f,v)>3e3||c&&YO(p,g)>3e3){u.stopAnimation(),u.setShape({points:v}),c&&(c.stopAnimation(),c.setShape({points:v,stackedOnPoints:g}));return}u.shape.__points=d.current,u.shape.points=f;var m={shape:{points:v}};d.current!==f&&(m.shape.__points=d.next),u.stopAnimation(),ct(u,m,h),c&&(c.setShape({points:f,stackedOnPoints:p}),c.stopAnimation(),ct(c,{shape:{stackedOnPoints:g}},h),u.shape.points!==c.shape.points&&(c.shape.points=u.shape.points));for(var y=[],_=d.status,b=0;b<_.length;b++){var T=_[b].cmd;if(T==="="){var x=t.getItemGraphicEl(_[b].idx1);x&&y.push({el:x,ptIdx:b})}}u.animators&&u.animators.length&&u.animators[0].during(function(){c&&c.dirtyShape();for(var C=u.shape.__points,D=0;D<y.length;D++){var I=y[D].el,M=y[D].ptIdx*2;I.x=C[M],I.y=C[M+1],I.markRedraw()}})},e.prototype.remove=function(t){var i=this.group,n=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),n&&n.eachItemGraphicEl(function(a,s){a.__temp&&(i.remove(a),n.setItemGraphicEl(s,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},e.type="line",e}(Tt);function Pg(r,e){return{seriesType:r,plan:Zf(),reset:function(t){var i=t.getData(),n=t.coordinateSystem,a=t.pipelineContext,s=e||a.large;if(n){var o=ae(n.dimensions,function(f){return i.mapDimension(f)}).slice(0,2),l=o.length,u=i.getCalculationInfo("stackResultDimension");ro(i,o[0])&&(o[0]=u),ro(i,o[1])&&(o[1]=u);var c=i.getStore(),h=i.getDimensionIndex(o[0]),d=i.getDimensionIndex(o[1]);return l&&{progress:function(f,p){for(var v=f.end-f.start,g=s&&ts(v*l),m=[],y=[],_=f.start,b=0;_<f.end;_++){var T=void 0;if(l===1){var x=c.get(h,_);T=n.dataToPoint(x,null,y)}else m[0]=c.get(h,_),m[1]=c.get(d,_),T=n.dataToPoint(m,null,y);s?(g[b++]=T[0],g[b++]=T[1]):p.setItemLayout(_,T.slice())}s&&p.setLayout("points",g)}}}}}}var Yme={average:function(r){for(var e=0,t=0,i=0;i<r.length;i++)isNaN(r[i])||(e+=r[i],t++);return t===0?NaN:e/t},sum:function(r){for(var e=0,t=0;t<r.length;t++)e+=r[t]||0;return e},max:function(r){for(var e=-1/0,t=0;t<r.length;t++)r[t]>e&&(e=r[t]);return isFinite(e)?e:NaN},min:function(r){for(var e=1/0,t=0;t<r.length;t++)r[t]<e&&(e=r[t]);return isFinite(e)?e:NaN},minmax:function(r){for(var e=-1/0,t=-1/0,i=0;i<r.length;i++){var n=r[i],a=Math.abs(n);a>e&&(e=a,t=n)}return isFinite(t)?t:NaN},nearest:function(r){return r[0]}},Kme=function(r){return Math.round(r.length/2)};function bq(r){return{seriesType:r,reset:function(e,t,i){var n=e.getData(),a=e.get("sampling"),s=e.coordinateSystem,o=n.count();if(o>10&&s.type==="cartesian2d"&&a){var l=s.getBaseAxis(),u=s.getOtherAxis(l),c=l.getExtent(),h=i.getDevicePixelRatio(),d=Math.abs(c[1]-c[0])*(h||1),f=Math.round(o/d);if(isFinite(f)&&f>1){a==="lttb"&&e.setData(n.lttbDownSample(n.mapDimension(u.dim),1/f));var p=void 0;de(a)?p=Yme[a]:xe(a)&&(p=a),p&&e.setData(n.downSample(n.mapDimension(u.dim),1/f,p,Kme))}}}}}function Zme(r){r.registerChartView(Xme),r.registerSeriesModel(Lme),r.registerLayout(Pg("line",!0)),r.registerVisual({seriesType:"line",reset:function(e){var t=e.getData(),i=e.getModel("lineStyle").getLineStyle();i&&!i.stroke&&(i.stroke=t.getVisual("style").fill),t.setVisual("legendLineStyle",i)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,bq("line"))}var Hv=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,i){return _s(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t,i,n){var a=this.coordinateSystem;if(a&&a.clampData){var s=a.clampData(t),o=a.dataToPoint(s);if(n)R(a.getAxes(),function(d,f){if(d.type==="category"&&i!=null){var p=d.getTicksCoords(),v=d.getTickModel().get("alignWithLabel"),g=s[f],m=i[f]==="x1"||i[f]==="y1";if(m&&!v&&(g+=1),p.length<2)return;if(p.length===2){o[f]=d.toGlobalCoord(d.getExtent()[m?1:0]);return}for(var y=void 0,_=void 0,b=1,T=0;T<p.length;T++){var x=p[T].coord,C=T===p.length-1?p[T-1].tickValue+b:p[T].tickValue;if(C===g){_=x;break}else if(C<g)y=x;else if(y!=null&&C>g){_=(x+y)/2;break}T===1&&(b=C-p[0].tickValue)}_==null&&(y?y&&(_=p[p.length-1].coord):_=p[0].coord),o[f]=d.toGlobalCoord(_)}});else{var l=this.getData(),u=l.getLayout("offset"),c=l.getLayout("size"),h=a.getBaseAxis().isHorizontal()?0:1;o[h]+=u+c/2}return o}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},e}(Ct);Ct.registerClass(Hv);var Qme=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(){return _s(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),i=this.get("largeThreshold");return i>t&&(t=i),t},e.prototype.brushSelector=function(t,i,n){return n.rect(i.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=ml(Hv.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}(Hv),Jme=function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r}(),g_=function(r){j(e,r);function e(t){var i=r.call(this,t)||this;return i.type="sausage",i}return e.prototype.getDefaultShape=function(){return new Jme},e.prototype.buildPath=function(t,i){var n=i.cx,a=i.cy,s=Math.max(i.r0||0,0),o=Math.max(i.r,0),l=(o-s)*.5,u=s+l,c=i.startAngle,h=i.endAngle,d=i.clockwise,f=Math.PI*2,p=d?h-c<f:c-h<f;p||(c=h-(d?f:-f));var v=Math.cos(c),g=Math.sin(c),m=Math.cos(h),y=Math.sin(h);p?(t.moveTo(v*s+n,g*s+a),t.arc(v*u+n,g*u+a,l,-Math.PI+c,c,!d)):t.moveTo(v*o+n,g*o+a),t.arc(n,a,o,c,h,!d),t.arc(m*u+n,y*u+a,l,h-Math.PI*2,h-Math.PI,!d),s!==0&&t.arc(n,a,s,h,c,d)},e}(Je);function eye(r,e){e=e||{};var t=e.isRoundCap;return function(i,n,a){var s=n.position;if(!s||s instanceof Array)return j0(i,n,a);var o=r(s),l=n.distance!=null?n.distance:5,u=this.shape,c=u.cx,h=u.cy,d=u.r,f=u.r0,p=(d+f)/2,v=u.startAngle,g=u.endAngle,m=(v+g)/2,y=t?Math.abs(d-f)/2:0,_=Math.cos,b=Math.sin,T=c+d*_(v),x=h+d*b(v),C="left",D="top";switch(o){case"startArc":T=c+(f-l)*_(m),x=h+(f-l)*b(m),C="center",D="top";break;case"insideStartArc":T=c+(f+l)*_(m),x=h+(f+l)*b(m),C="center",D="bottom";break;case"startAngle":T=c+p*_(v)+ey(v,l+y,!1),x=h+p*b(v)+ty(v,l+y,!1),C="right",D="middle";break;case"insideStartAngle":T=c+p*_(v)+ey(v,-l+y,!1),x=h+p*b(v)+ty(v,-l+y,!1),C="left",D="middle";break;case"middle":T=c+p*_(m),x=h+p*b(m),C="center",D="middle";break;case"endArc":T=c+(d+l)*_(m),x=h+(d+l)*b(m),C="center",D="bottom";break;case"insideEndArc":T=c+(d-l)*_(m),x=h+(d-l)*b(m),C="center",D="top";break;case"endAngle":T=c+p*_(g)+ey(g,l+y,!0),x=h+p*b(g)+ty(g,l+y,!0),C="left",D="middle";break;case"insideEndAngle":T=c+p*_(g)+ey(g,-l+y,!0),x=h+p*b(g)+ty(g,-l+y,!0),C="right",D="middle";break;default:return j0(i,n,a)}return i=i||{},i.x=T,i.y=x,i.align=C,i.verticalAlign=D,i}}function tye(r,e,t,i){if(ut(i)){r.setTextConfig({rotation:i});return}else if(ie(e)){r.setTextConfig({rotation:0});return}var n=r.shape,a=n.clockwise?n.startAngle:n.endAngle,s=n.clockwise?n.endAngle:n.startAngle,o=(a+s)/2,l,u=t(e);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":l=o;break;case"startAngle":case"insideStartAngle":l=a;break;case"endAngle":case"insideEndAngle":l=s;break;default:r.setTextConfig({rotation:0});return}var c=Math.PI*1.5-l;u==="middle"&&c>Math.PI/2&&c<Math.PI*1.5&&(c-=Math.PI),r.setTextConfig({rotation:c})}function ey(r,e,t){return e*Math.sin(r)*(t?-1:1)}function ty(r,e,t){return e*Math.cos(r)*(t?1:-1)}function Pu(r,e,t){var i=r.get("borderRadius");if(i==null)return t?{cornerRadius:0}:null;ie(i)||(i=[i,i,i,i]);var n=Math.abs(e.r||0-e.r0||0);return{cornerRadius:ae(i,function(a){return Ea(a,n)})}}var MT=Math.max,LT=Math.min;function rye(r,e){var t=r.getArea&&r.getArea();if(bc(r,"cartesian2d")){var i=r.getBaseAxis();if(i.type!=="category"||!i.onBand){var n=e.getLayout("bandWidth");i.isHorizontal()?(t.x-=n,t.width+=n*2):(t.y-=n,t.height+=n*2)}}return t}var iye=function(r){j(e,r);function e(){var t=r.call(this)||this;return t.type=e.type,t._isFirstFrame=!0,t}return e.prototype.render=function(t,i,n,a){this._model=t,this._removeOnRenderedListener(n),this._updateDrawMode(t);var s=t.get("coordinateSystem");(s==="cartesian2d"||s==="polar")&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(t,i,n):this._renderNormal(t,i,n,a))},e.prototype.incrementalPrepareRender=function(t){this._clear(),this._updateDrawMode(t),this._updateLargeClip(t)},e.prototype.incrementalRender=function(t,i){this._progressiveEls=[],this._incrementalRenderLarge(t,i)},e.prototype.eachRendered=function(t){gl(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var i=t.pipelineContext.large;(this._isLargeDraw==null||i!==this._isLargeDraw)&&(this._isLargeDraw=i,this._clear())},e.prototype._renderNormal=function(t,i,n,a){var s=this.group,o=t.getData(),l=this._data,u=t.coordinateSystem,c=u.getBaseAxis(),h;u.type==="cartesian2d"?h=c.isHorizontal():u.type==="polar"&&(h=c.dim==="angle");var d=t.isAnimationEnabled()?t:null,f=nye(t,u);f&&this._enableRealtimeSort(f,o,n);var p=t.get("clip",!0)||f,v=rye(u,o);s.removeClipPath();var g=t.get("roundCap",!0),m=t.get("showBackground",!0),y=t.getModel("backgroundStyle"),_=y.get("borderRadius")||0,b=[],T=this._backgroundEls,x=a&&a.isInitSort,C=a&&a.type==="changeAxisOrder";function D(L){var N=ry[u.type](o,L),O=hye(u,h,N);return O.useStyle(y.getItemStyle()),u.type==="cartesian2d"?O.setShape("r",_):O.setShape("cornerRadius",_),b[L]=O,O}o.diff(l).add(function(L){var N=o.getItemModel(L),O=ry[u.type](o,L,N);if(m&&D(L),!(!o.hasValue(L)||!rN[u.type](O))){var B=!1;p&&(B=QO[u.type](v,O));var F=JO[u.type](t,o,L,O,h,d,c.model,!1,g);f&&(F.forceLabelAnimation=!0),iN(F,o,L,N,O,t,h,u.type==="polar"),x?F.attr({shape:O}):f?eN(f,d,F,O,L,h,!1,!1):Bt(F,{shape:O},t,L),o.setItemGraphicEl(L,F),s.add(F),F.ignore=B}}).update(function(L,N){var O=o.getItemModel(L),B=ry[u.type](o,L,O);if(m){var F=void 0;T.length===0?F=D(N):(F=T[N],F.useStyle(y.getItemStyle()),u.type==="cartesian2d"?F.setShape("r",_):F.setShape("cornerRadius",_),b[L]=F);var U=ry[u.type](o,L),$=Tq(h,U,u);ct(F,{shape:$},d,L)}var q=l.getItemGraphicEl(N);if(!o.hasValue(L)||!rN[u.type](B)){s.remove(q);return}var Z=!1;if(p&&(Z=QO[u.type](v,B),Z&&s.remove(q)),q?Ia(q):q=JO[u.type](t,o,L,B,h,d,c.model,!!q,g),f&&(q.forceLabelAnimation=!0),C){var te=q.getTextContent();if(te){var J=qf(te);J.prevValue!=null&&(J.prevValue=J.value)}}else iN(q,o,L,O,B,t,h,u.type==="polar");x?q.attr({shape:B}):f?eN(f,d,q,B,L,h,!0,C):ct(q,{shape:B},t,L,null),o.setItemGraphicEl(L,q),q.ignore=Z,s.add(q)}).remove(function(L){var N=l.getItemGraphicEl(L);N&&kv(N,t,L)}).execute();var I=this._backgroundGroup||(this._backgroundGroup=new Le);I.removeAll();for(var M=0;M<b.length;++M)I.add(b[M]);s.add(I),this._backgroundEls=b,this._data=o},e.prototype._renderLarge=function(t,i,n){this._clear(),aN(t,this.group),this._updateLargeClip(t)},e.prototype._incrementalRenderLarge=function(t,i){this._removeBackground(),aN(i,this.group,this._progressiveEls,!0)},e.prototype._updateLargeClip=function(t){var i=t.get("clip",!0)&&Ig(t.coordinateSystem,!1,t),n=this.group;i?n.setClipPath(i):n.removeClipPath()},e.prototype._enableRealtimeSort=function(t,i,n){var a=this;if(i.count()){var s=t.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(i,t,n),this._isFirstFrame=!1;else{var o=function(l){var u=i.getItemGraphicEl(l),c=u&&u.shape;return c&&Math.abs(s.isHorizontal()?c.height:c.width)||0};this._onRendered=function(){a._updateSortWithinSameData(i,o,s,n)},n.getZr().on("rendered",this._onRendered)}}},e.prototype._dataSort=function(t,i,n){var a=[];return t.each(t.mapDimension(i.dim),function(s,o){var l=n(o);l=l??NaN,a.push({dataIndex:o,mappedValue:l,ordinalNumber:s})}),a.sort(function(s,o){return o.mappedValue-s.mappedValue}),{ordinalNumbers:ae(a,function(s){return s.ordinalNumber})}},e.prototype._isOrderChangedWithinSameData=function(t,i,n){for(var a=n.scale,s=t.mapDimension(n.dim),o=Number.MAX_VALUE,l=0,u=a.getOrdinalMeta().categories.length;l<u;++l){var c=t.rawIndexOf(s,a.getRawOrdinalNumber(l)),h=c<0?Number.MIN_VALUE:i(t.indexOfRawIndex(c));if(h>o)return!0;o=h}return!1},e.prototype._isOrderDifferentInView=function(t,i){for(var n=i.scale,a=n.getExtent(),s=Math.max(0,a[0]),o=Math.min(a[1],n.getOrdinalMeta().categories.length-1);s<=o;++s)if(t.ordinalNumbers[s]!==n.getRawOrdinalNumber(s))return!0},e.prototype._updateSortWithinSameData=function(t,i,n,a){if(this._isOrderChangedWithinSameData(t,i,n)){var s=this._dataSort(t,n,i);this._isOrderDifferentInView(s,n)&&(this._removeOnRenderedListener(a),a.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:s}))}},e.prototype._dispatchInitSort=function(t,i,n){var a=i.baseAxis,s=this._dataSort(t,a,function(o){return t.get(t.mapDimension(i.otherAxis.dim),o)});n.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",isInitSort:!0,axisId:a.index,sortInfo:s})},e.prototype.remove=function(t,i){this._clear(this._model),this._removeOnRenderedListener(i)},e.prototype.dispose=function(t,i){this._removeOnRenderedListener(i)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var i=this.group,n=this._data;t&&t.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(a){kv(a,t,ke(a).dataIndex)})):i.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(Tt),QO={cartesian2d:function(r,e){var t=e.width<0?-1:1,i=e.height<0?-1:1;t<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height);var n=r.x+r.width,a=r.y+r.height,s=MT(e.x,r.x),o=LT(e.x+e.width,n),l=MT(e.y,r.y),u=LT(e.y+e.height,a),c=o<s,h=u<l;return e.x=c&&s>n?o:s,e.y=h&&l>a?u:l,e.width=c?0:o-s,e.height=h?0:u-l,t<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height),c||h},polar:function(r,e){var t=e.r0<=e.r?1:-1;if(t<0){var i=e.r;e.r=e.r0,e.r0=i}var n=LT(e.r,r.r),a=MT(e.r0,r.r0);e.r=n,e.r0=a;var s=n-a<0;if(t<0){var i=e.r;e.r=e.r0,e.r0=i}return s}},JO={cartesian2d:function(r,e,t,i,n,a,s,o,l){var u=new at({shape:Q({},i),z2:1});if(u.__dataIndex=t,u.name="item",a){var c=u.shape,h=n?"height":"width";c[h]=0}return u},polar:function(r,e,t,i,n,a,s,o,l){var u=!n&&l?g_:di,c=new u({shape:i,z2:1});c.name="item";var h=Sq(n);if(c.calculateTextPosition=eye(h,{isRoundCap:u===g_}),a){var d=c.shape,f=n?"r":"endAngle",p={};d[f]=n?i.r0:i.startAngle,p[f]=i[f],(o?ct:Bt)(c,{shape:p},a)}return c}};function nye(r,e){var t=r.get("realtimeSort",!0),i=e.getBaseAxis();if(t&&i.type==="category"&&e.type==="cartesian2d")return{baseAxis:i,otherAxis:e.getOtherAxis(i)}}function eN(r,e,t,i,n,a,s,o){var l,u;a?(u={x:i.x,width:i.width},l={y:i.y,height:i.height}):(u={y:i.y,height:i.height},l={x:i.x,width:i.width}),o||(s?ct:Bt)(t,{shape:l},e,n,null);var c=e?r.baseAxis.model:null;(s?ct:Bt)(t,{shape:u},c,n)}function tN(r,e){for(var t=0;t<e.length;t++)if(!isFinite(r[e[t]]))return!0;return!1}var aye=["x","y","width","height"],sye=["cx","cy","r","startAngle","endAngle"],rN={cartesian2d:function(r){return!tN(r,aye)},polar:function(r){return!tN(r,sye)}},ry={cartesian2d:function(r,e,t){var i=r.getItemLayout(e),n=t?lye(t,i):0,a=i.width>0?1:-1,s=i.height>0?1:-1;return{x:i.x+a*n/2,y:i.y+s*n/2,width:i.width-a*n,height:i.height-s*n}},polar:function(r,e,t){var i=r.getItemLayout(e);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}}};function oye(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function Sq(r){return function(e){var t=e?"Arc":"Angle";return function(i){switch(i){case"start":case"insideStart":case"end":case"insideEnd":return i+t;default:return i}}}(r)}function iN(r,e,t,i,n,a,s,o){var l=e.getItemVisual(t,"style");if(o){if(!a.get("roundCap")){var c=r.shape,h=Pu(i.getModel("itemStyle"),c,!0);Q(c,h),r.setShape(c)}}else{var u=i.get(["itemStyle","borderRadius"])||0;r.setShape("r",u)}r.useStyle(l);var d=i.getShallow("cursor");d&&r.attr("cursor",d);var f=o?s?n.r>=n.r0?"endArc":"startArc":n.endAngle>=n.startAngle?"endAngle":"startAngle":s?n.height>=0?"bottom":"top":n.width>=0?"right":"left",p=Br(i);ti(r,p,{labelFetcher:a,labelDataIndex:t,defaultText:Tf(a.getData(),t),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:f});var v=r.getTextContent();if(o&&v){var g=i.get(["label","position"]);r.textConfig.inside=g==="middle"?!0:null,tye(r,g==="outside"?f:g,Sq(s),i.get(["label","rotate"]))}zH(v,p,a.getRawValue(t),function(y){return fq(e,y)});var m=i.getModel(["emphasis"]);Kt(r,m.get("focus"),m.get("blurScope"),m.get("disabled")),ei(r,i),oye(n)&&(r.style.fill="none",r.style.stroke="none",R(r.states,function(y){y.style&&(y.style.fill=y.style.stroke="none")}))}function lye(r,e){var t=r.get(["itemStyle","borderColor"]);if(!t||t==="none")return 0;var i=r.get(["itemStyle","borderWidth"])||0,n=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),a=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(i,n,a)}var uye=function(){function r(){}return r}(),nN=function(r){j(e,r);function e(t){var i=r.call(this,t)||this;return i.type="largeBar",i}return e.prototype.getDefaultShape=function(){return new uye},e.prototype.buildPath=function(t,i){for(var n=i.points,a=this.baseDimIdx,s=1-this.baseDimIdx,o=[],l=[],u=this.barWidth,c=0;c<n.length;c+=3)l[a]=u,l[s]=n[c+2],o[a]=n[c+a],o[s]=n[c+s],t.rect(o[0],o[1],l[0],l[1])},e}(Je);function aN(r,e,t,i){var n=r.getData(),a=n.getLayout("valueAxisHorizontal")?1:0,s=n.getLayout("largeDataIndices"),o=n.getLayout("size"),l=r.getModel("backgroundStyle"),u=n.getLayout("largeBackgroundPoints");if(u){var c=new nN({shape:{points:u},incremental:!!i,silent:!0,z2:0});c.baseDimIdx=a,c.largeDataIndices=s,c.barWidth=o,c.useStyle(l.getItemStyle()),e.add(c),t&&t.push(c)}var h=new nN({shape:{points:n.getLayout("largePoints")},incremental:!!i,ignoreCoarsePointer:!0,z2:1});h.baseDimIdx=a,h.largeDataIndices=s,h.barWidth=o,e.add(h),h.useStyle(n.getVisual("style")),ke(h).seriesIndex=r.seriesIndex,r.get("silent")||(h.on("mousedown",sN),h.on("mousemove",sN)),t&&t.push(h)}var sN=W1(function(r){var e=this,t=cye(e,r.offsetX,r.offsetY);ke(e).dataIndex=t>=0?t:null},30,!1);function cye(r,e,t){for(var i=r.baseDimIdx,n=1-i,a=r.shape.points,s=r.largeDataIndices,o=[],l=[],u=r.barWidth,c=0,h=a.length/3;c<h;c++){var d=c*3;if(l[i]=u,l[n]=a[d+2],o[i]=a[d+i],o[n]=a[d+n],l[n]<0&&(o[n]+=l[n],l[n]=-l[n]),e>=o[0]&&e<=o[0]+l[0]&&t>=o[1]&&t<=o[1]+l[1])return s[c]}return-1}function Tq(r,e,t){if(bc(t,"cartesian2d")){var i=e,n=t.getArea();return{x:r?i.x:n.x,y:r?n.y:i.y,width:r?i.width:n.width,height:r?n.height:i.height}}else{var n=t.getArea(),a=e;return{cx:n.cx,cy:n.cy,r0:r?n.r0:a.r0,r:r?n.r:a.r,startAngle:r?a.startAngle:0,endAngle:r?a.endAngle:Math.PI*2}}}function hye(r,e,t){var i=r.type==="polar"?di:at;return new i({shape:Tq(e,t,r),silent:!0,z2:0})}function fye(r){r.registerChartView(iye),r.registerSeriesModel(Qme),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,Be(DW,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,EW("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,bq("bar")),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,t){var i=e.componentType||"series";t.eachComponent({mainType:i,query:e},function(n){e.sortInfo&&n.axis.setCategorySortInfo(e.sortInfo)})})}var oN=Math.PI*2,iy=Math.PI/180;function xq(r,e){return br(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function wq(r,e){var t=xq(r,e),i=r.get("center"),n=r.get("radius");ie(n)||(n=[0,n]);var a=ce(t.width,e.getWidth()),s=ce(t.height,e.getHeight()),o=Math.min(a,s),l=ce(n[0],o/2),u=ce(n[1],o/2),c,h,d=r.coordinateSystem;if(d){var f=d.dataToPoint(i);c=f[0]||0,h=f[1]||0}else ie(i)||(i=[i,i]),c=ce(i[0],a)+t.x,h=ce(i[1],s)+t.y;return{cx:c,cy:h,r0:l,r:u}}function dye(r,e,t){e.eachSeriesByType(r,function(i){var n=i.getData(),a=n.mapDimension("value"),s=xq(i,t),o=wq(i,t),l=o.cx,u=o.cy,c=o.r,h=o.r0,d=-i.get("startAngle")*iy,f=i.get("endAngle"),p=i.get("padAngle")*iy;f=f==="auto"?d-oN:-f*iy;var v=i.get("minAngle")*iy,g=v+p,m=0;n.each(a,function($){!isNaN($)&&m++});var y=n.getSum(a),_=Math.PI/(y||m)*2,b=i.get("clockwise"),T=i.get("roseType"),x=i.get("stillShowZeroSum"),C=n.getDataExtent(a);C[0]=0;var D=b?1:-1,I=[d,f],M=D*p/2;ED(I,!b),d=I[0],f=I[1];var L=Cq(i);L.startAngle=d,L.endAngle=f,L.clockwise=b;var N=Math.abs(f-d),O=N,B=0,F=d;if(n.setLayout({viewRect:s,r:c}),n.each(a,function($,q){var Z;if(isNaN($)){n.setItemLayout(q,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:b,cx:l,cy:u,r0:h,r:T?NaN:c});return}T!=="area"?Z=y===0&&x?_:$*_:Z=N/m,Z<g?(Z=g,O-=g):B+=$;var te=F+D*Z,J=0,oe=0;p>Z?(J=F+D*Z/2,oe=J):(J=F+M,oe=te-M),n.setItemLayout(q,{angle:Z,startAngle:J,endAngle:oe,clockwise:b,cx:l,cy:u,r0:h,r:T?yt($,C,[h,c]):c}),F=te}),O<oN&&m)if(O<=.001){var U=N/m;n.each(a,function($,q){if(!isNaN($)){var Z=n.getItemLayout(q);Z.angle=U;var te=0,J=0;U<p?(te=d+D*(q+1/2)*U,J=te):(te=d+D*q*U+M,J=d+D*(q+1)*U-M),Z.startAngle=te,Z.endAngle=J}})}else _=O/B,F=d,n.each(a,function($,q){if(!isNaN($)){var Z=n.getItemLayout(q),te=Z.angle===g?g:$*_,J=0,oe=0;te<p?(J=F+D*te/2,oe=J):(J=F+M,oe=F+D*te-M),Z.startAngle=J,Z.endAngle=oe,F+=D*te}})})}var Cq=lt();function Mg(r){return{seriesType:r,reset:function(e,t){var i=t.findComponents({mainType:"legend"});if(!(!i||!i.length)){var n=e.getData();n.filterSelf(function(a){for(var s=n.getName(a),o=0;o<i.length;o++)if(!i[o].isSelected(s))return!1;return!0})}}}}var pye=Math.PI/180;function lN(r,e,t,i,n,a,s,o,l,u){if(r.length<2)return;function c(v){for(var g=v.rB,m=g*g,y=0;y<v.list.length;y++){var _=v.list[y],b=Math.abs(_.label.y-t),T=i+_.len,x=T*T,C=Math.sqrt((1-Math.abs(b*b/m))*x),D=e+(C+_.len2)*n,I=D-_.label.x,M=_.targetTextWidth-I*n;Aq(_,M,!0),_.label.x=D}}function h(v){for(var g={list:[],maxY:0},m={list:[],maxY:0},y=0;y<v.length;y++)if(v[y].labelAlignTo==="none"){var _=v[y],b=_.label.y>t?m:g,T=Math.abs(_.label.y-t);if(T>=b.maxY){var x=_.label.x-e-_.len2*n,C=i+_.len,D=Math.abs(x)<C?Math.sqrt(T*T/(1-x*x/C/C)):C;b.rB=D,b.maxY=T}b.list.push(_)}c(g),c(m)}for(var d=r.length,f=0;f<d;f++)if(r[f].position==="outer"&&r[f].labelAlignTo==="labelLine"){var p=r[f].label.x-u;r[f].linePoints[1][0]+=p,r[f].label.x=u}YW(r,l,l+s)&&h(r)}function vye(r,e,t,i,n,a,s,o){for(var l=[],u=[],c=Number.MAX_VALUE,h=-Number.MAX_VALUE,d=0;d<r.length;d++){var f=r[d].label;kT(r[d])||(f.x<e?(c=Math.min(c,f.x),l.push(r[d])):(h=Math.max(h,f.x),u.push(r[d])))}for(var d=0;d<r.length;d++){var p=r[d];if(!kT(p)&&p.linePoints){if(p.labelStyleWidth!=null)continue;var f=p.label,v=p.linePoints,g=void 0;p.labelAlignTo==="edge"?f.x<e?g=v[2][0]-p.labelDistance-s-p.edgeDistance:g=s+n-p.edgeDistance-v[2][0]-p.labelDistance:p.labelAlignTo==="labelLine"?f.x<e?g=c-s-p.bleedMargin:g=s+n-h-p.bleedMargin:f.x<e?g=f.x-s-p.bleedMargin:g=s+n-f.x-p.bleedMargin,p.targetTextWidth=g,Aq(p,g)}}lN(u,e,t,i,1,n,a,s,o,h),lN(l,e,t,i,-1,n,a,s,o,c);for(var d=0;d<r.length;d++){var p=r[d];if(!kT(p)&&p.linePoints){var f=p.label,v=p.linePoints,m=p.labelAlignTo==="edge",y=f.style.padding,_=y?y[1]+y[3]:0,b=f.style.backgroundColor?0:_,T=p.rect.width+b,x=v[1][0]-v[2][0];m?f.x<e?v[2][0]=s+p.edgeDistance+T+p.labelDistance:v[2][0]=s+n-p.edgeDistance-T-p.labelDistance:(f.x<e?v[2][0]=f.x+p.labelDistance:v[2][0]=f.x-p.labelDistance,v[1][0]=v[2][0]+x),v[1][1]=v[2][1]=f.y}}}function Aq(r,e,t){if(t===void 0&&(t=!1),r.labelStyleWidth==null){var i=r.label,n=i.style,a=r.rect,s=n.backgroundColor,o=n.padding,l=o?o[1]+o[3]:0,u=n.overflow,c=a.width+(s?0:l);if(e<c||t){var h=a.height;if(u&&u.match("break")){i.setStyle("backgroundColor",null),i.setStyle("width",e-l);var d=i.getBoundingRect();i.setStyle("width",Math.ceil(d.width)),i.setStyle("backgroundColor",s)}else{var f=e-l,p=e<c?f:t?f>r.unconstrainedWidth?null:f:null;i.setStyle("width",p)}var v=i.getBoundingRect();a.width=v.width;var g=(i.style.margin||0)+2.1;a.height=v.height+g,a.y-=(a.height-h)/2}}}function kT(r){return r.position==="center"}function gye(r){var e=r.getData(),t=[],i,n,a=!1,s=(r.get("minShowLabelAngle")||0)*pye,o=e.getLayout("viewRect"),l=e.getLayout("r"),u=o.width,c=o.x,h=o.y,d=o.height;function f(x){x.ignore=!0}function p(x){if(!x.ignore)return!0;for(var C in x.states)if(x.states[C].ignore===!1)return!0;return!1}e.each(function(x){var C=e.getItemGraphicEl(x),D=C.shape,I=C.getTextContent(),M=C.getTextGuideLine(),L=e.getItemModel(x),N=L.getModel("label"),O=N.get("position")||L.get(["emphasis","label","position"]),B=N.get("distanceToLabelLine"),F=N.get("alignTo"),U=ce(N.get("edgeDistance"),u),$=N.get("bleedMargin"),q=L.getModel("labelLine"),Z=q.get("length");Z=ce(Z,u);var te=q.get("length2");if(te=ce(te,u),Math.abs(D.endAngle-D.startAngle)<s){R(I.states,f),I.ignore=!0,M&&(R(M.states,f),M.ignore=!0);return}if(p(I)){var J=(D.startAngle+D.endAngle)/2,oe=Math.cos(J),he=Math.sin(J),ue,Ie,Oe,Ue;i=D.cx,n=D.cy;var me=O==="inside"||O==="inner";if(O==="center")ue=D.cx,Ie=D.cy,Ue="center";else{var ze=(me?(D.r+D.r0)/2*oe:D.r*oe)+i,Pe=(me?(D.r+D.r0)/2*he:D.r*he)+n;if(ue=ze+oe*3,Ie=Pe+he*3,!me){var _e=ze+oe*(Z+l-D.r),Me=Pe+he*(Z+l-D.r),St=_e+(oe<0?-1:1)*te,Re=Me;F==="edge"?ue=oe<0?c+U:c+u-U:ue=St+(oe<0?-B:B),Ie=Re,Oe=[[ze,Pe],[_e,Me],[St,Re]]}Ue=me?"center":F==="edge"?oe>0?"right":"left":oe>0?"left":"right"}var Ge=Math.PI,Lt=0,At=N.get("rotate");if(ut(At))Lt=At*(Ge/180);else if(O==="center")Lt=0;else if(At==="radial"||At===!0){var Dt=oe<0?-J+Ge:-J;Lt=Dt}else if(At==="tangential"&&O!=="outside"&&O!=="outer"){var nr=Math.atan2(oe,he);nr<0&&(nr=Ge*2+nr);var ht=he>0;ht&&(nr=Ge+nr),Lt=nr-Ge}if(a=!!Lt,I.x=ue,I.y=Ie,I.rotation=Lt,I.setStyle({verticalAlign:"middle"}),me){I.setStyle({align:Ue});var lo=I.states.select;lo&&(lo.x+=I.x,lo.y+=I.y)}else{var nn=I.getBoundingRect().clone();nn.applyTransform(I.getComputedTransform());var Sr=(I.style.margin||0)+2.1;nn.y-=Sr/2,nn.height+=Sr,t.push({label:I,labelLine:M,position:O,len:Z,len2:te,minTurnAngle:q.get("minTurnAngle"),maxSurfaceAngle:q.get("maxSurfaceAngle"),surfaceNormal:new $e(oe,he),linePoints:Oe,textAlign:Ue,labelDistance:B,labelAlignTo:F,edgeDistance:U,bleedMargin:$,rect:nn,unconstrainedWidth:nn.width,labelStyleWidth:I.style.width})}C.setTextConfig({inside:me})}}),!a&&r.get("avoidLabelOverlap")&&vye(t,i,n,l,u,d,c,h);for(var v=0;v<t.length;v++){var g=t[v],m=g.label,y=g.labelLine,_=isNaN(m.x)||isNaN(m.y);if(m){m.setStyle({align:g.textAlign}),_&&(R(m.states,f),m.ignore=!0);var b=m.states.select;b&&(b.x+=m.x,b.y+=m.y)}if(y){var T=g.linePoints;_||!T?(R(y.states,f),y.ignore=!0):(qW(T,g.minTurnAngle),Uge(T,g.surfaceNormal,g.maxSurfaceAngle),y.setShape({points:T}),m.__hostTarget.textGuideLineConfig={anchor:new $e(T[0][0],T[0][1])})}}}var mye=function(r){j(e,r);function e(t,i,n){var a=r.call(this)||this;a.z2=2;var s=new nt;return a.setTextContent(s),a.updateData(t,i,n,!0),a}return e.prototype.updateData=function(t,i,n,a){var s=this,o=t.hostModel,l=t.getItemModel(i),u=l.getModel("emphasis"),c=t.getItemLayout(i),h=Q(Pu(l.getModel("itemStyle"),c,!0),c);if(isNaN(h.startAngle)){s.setShape(h);return}if(a){s.setShape(h);var d=o.getShallow("animationType");o.ecModel.ssr?(Bt(s,{scaleX:0,scaleY:0},o,{dataIndex:i,isFrom:!0}),s.originX=h.cx,s.originY=h.cy):d==="scale"?(s.shape.r=c.r0,Bt(s,{shape:{r:c.r}},o,i)):n!=null?(s.setShape({startAngle:n,endAngle:n}),Bt(s,{shape:{startAngle:c.startAngle,endAngle:c.endAngle}},o,i)):(s.shape.endAngle=c.startAngle,ct(s,{shape:{endAngle:c.endAngle}},o,i))}else Ia(s),ct(s,{shape:h},o,i);s.useStyle(t.getItemVisual(i,"style")),ei(s,l);var f=(c.startAngle+c.endAngle)/2,p=o.get("selectedOffset"),v=Math.cos(f)*p,g=Math.sin(f)*p,m=l.getShallow("cursor");m&&s.attr("cursor",m),this._updateLabel(o,t,i),s.ensureState("emphasis").shape=Q({r:c.r+(u.get("scale")&&u.get("scaleSize")||0)},Pu(u.getModel("itemStyle"),c)),Q(s.ensureState("select"),{x:v,y:g,shape:Pu(l.getModel(["select","itemStyle"]),c)}),Q(s.ensureState("blur"),{shape:Pu(l.getModel(["blur","itemStyle"]),c)});var y=s.getTextGuideLine(),_=s.getTextContent();y&&Q(y.ensureState("select"),{x:v,y:g}),Q(_.ensureState("select"),{x:v,y:g}),Kt(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,i,n){var a=this,s=i.getItemModel(n),o=s.getModel("labelLine"),l=i.getItemVisual(n,"style"),u=l&&l.fill,c=l&&l.opacity;ti(a,Br(s),{labelFetcher:i.hostModel,labelDataIndex:n,inheritColor:u,defaultOpacity:c,defaultText:t.getFormattedLabel(n,"normal")||i.getName(n)});var h=a.getTextContent();a.setTextConfig({position:null,rotation:null}),h.attr({z2:10});var d=t.get(["label","position"]);if(d!=="outside"&&d!=="outer")a.removeTextGuideLine();else{var f=this.getTextGuideLine();f||(f=new mi,this.setTextGuideLine(f)),CE(this,AE(s),{stroke:u,opacity:Ta(o.get(["lineStyle","opacity"]),c,1)})}},e}(di),yye=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.ignoreLabelLineUpdate=!0,t}return e.prototype.render=function(t,i,n,a){var s=t.getData(),o=this._data,l=this.group,u;if(!o&&s.count()>0){for(var c=s.getItemLayout(0),h=1;isNaN(c&&c.startAngle)&&h<s.count();++h)c=s.getItemLayout(h);c&&(u=c.startAngle)}if(this._emptyCircleSector&&l.remove(this._emptyCircleSector),s.count()===0&&t.get("showEmptyCircle")){var d=Cq(t),f=new di({shape:Q(wq(t,n),d)});f.useStyle(t.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=f,l.add(f)}s.diff(o).add(function(p){var v=new mye(s,p,u);s.setItemGraphicEl(p,v),l.add(v)}).update(function(p,v){var g=o.getItemGraphicEl(v);g.updateData(s,p,u),g.off("click"),l.add(g),s.setItemGraphicEl(p,g)}).remove(function(p){var v=o.getItemGraphicEl(p);kv(v,t,p)}).execute(),gye(t),t.get("animationTypeUpdate")!=="expansion"&&(this._data=s)},e.prototype.dispose=function(){},e.prototype.containPoint=function(t,i){var n=i.getData(),a=n.getItemLayout(0);if(a){var s=t[0]-a.cx,o=t[1]-a.cy,l=Math.sqrt(s*s+o*o);return l<=a.r&&l>=a.r0}},e.type="pie",e}(Tt);function id(r,e,t){e=ie(e)&&{coordDimensions:e}||Q({encodeDefine:r.getEncode()},e);var i=r.getSource(),n=ed(i,e).dimensions,a=new hi(n,r);return a.initData(i,t),a}var Lg=function(){function r(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return r.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},r.prototype.containName=function(e){var t=this._getRawData();return t.indexOfName(e)>=0},r.prototype.indexOfName=function(e){var t=this._getDataWithEncodedVisual();return t.indexOfName(e)},r.prototype.getItemVisual=function(e,t){var i=this._getDataWithEncodedVisual();return i.getItemVisual(e,t)},r}(),_ye=lt(),bye=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new Lg(ge(this.getData,this),ge(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.mergeOption=function(){r.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return id(this,{coordDimensions:["value"],encodeDefaulter:Be(ZD,this)})},e.prototype.getDataParams=function(t){var i=this.getData(),n=_ye(i),a=n.seats;if(!a){var s=[];i.each(i.mapDimension("value"),function(l){s.push(l)}),a=n.seats=X9(s,i.hostModel.get("percentPrecision"))}var o=r.prototype.getDataParams.call(this,t);return o.percent=a[t]||0,o.$vars.push("percent"),o},e.prototype._defaultLabelLine=function(t){ac(t,"labelLine",["show"]);var i=t.labelLine,n=t.emphasis.labelLine;i.show=i.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(Ct);function Sye(r){return{seriesType:r,reset:function(e,t){var i=e.getData();i.filterSelf(function(n){var a=i.mapDimension("value"),s=i.get(a,n);return!(ut(s)&&!isNaN(s)&&s<0)})}}}function Tye(r){r.registerChartView(yye),r.registerSeriesModel(bye),$$("pie",r.registerAction),r.registerLayout(Be(dye,"pie")),r.registerProcessor(Mg("pie")),r.registerProcessor(Sye("pie"))}var xye=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t,i){return _s(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return t??(this.option.large?5e3:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t??(this.option.large?1e4:this.get("progressiveThreshold"))},e.prototype.brushSelector=function(t,i,n){return n.point(i.getItemLayout(t))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},e}(Ct),Dq=4,wye=function(){function r(){}return r}(),Cye=function(r){j(e,r);function e(t){var i=r.call(this,t)||this;return i._off=0,i.hoverDataIdx=-1,i}return e.prototype.getDefaultShape=function(){return new wye},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(t,i){var n=i.points,a=i.size,s=this.symbolProxy,o=s.shape,l=t.getContext?t.getContext():t,u=l&&a[0]<Dq,c=this.softClipShape,h;if(u){this._ctx=l;return}for(this._ctx=null,h=this._off;h<n.length;){var d=n[h++],f=n[h++];isNaN(d)||isNaN(f)||c&&!c.contain(d,f)||(o.x=d-a[0]/2,o.y=f-a[1]/2,o.width=a[0],o.height=a[1],s.buildPath(t,o,!0))}this.incremental&&(this._off=h,this.notClear=!0)},e.prototype.afterBrush=function(){var t=this.shape,i=t.points,n=t.size,a=this._ctx,s=this.softClipShape,o;if(a){for(o=this._off;o<i.length;){var l=i[o++],u=i[o++];isNaN(l)||isNaN(u)||s&&!s.contain(l,u)||a.fillRect(l-n[0]/2,u-n[1]/2,n[0],n[1])}this.incremental&&(this._off=o,this.notClear=!0)}},e.prototype.findDataIndex=function(t,i){for(var n=this.shape,a=n.points,s=n.size,o=Math.max(s[0],4),l=Math.max(s[1],4),u=a.length/2-1;u>=0;u--){var c=u*2,h=a[c]-o/2,d=a[c+1]-l/2;if(t>=h&&i>=d&&t<=h+o&&i<=d+l)return u}return-1},e.prototype.contain=function(t,i){var n=this.transformCoordToLocal(t,i),a=this.getBoundingRect();if(t=n[0],i=n[1],a.contain(t,i)){var s=this.hoverDataIdx=this.findDataIndex(t,i);return s>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var i=this.shape,n=i.points,a=i.size,s=a[0],o=a[1],l=1/0,u=1/0,c=-1/0,h=-1/0,d=0;d<n.length;){var f=n[d++],p=n[d++];l=Math.min(f,l),c=Math.max(f,c),u=Math.min(p,u),h=Math.max(p,h)}t=this._rect=new We(l-s/2,u-o/2,c-l+s,h-u+o)}return t},e}(Je),Aye=function(){function r(){this.group=new Le}return r.prototype.updateData=function(e,t){this._clear();var i=this._create();i.setShape({points:e.getLayout("points")}),this._setCommon(i,e,t)},r.prototype.updateLayout=function(e){var t=e.getLayout("points");this.group.eachChild(function(i){if(i.startIndex!=null){var n=(i.endIndex-i.startIndex)*2,a=i.startIndex*4*2;t=new Float32Array(t.buffer,a,n)}i.setShape("points",t),i.reset()})},r.prototype.incrementalPrepareUpdate=function(e){this._clear()},r.prototype.incrementalUpdate=function(e,t,i){var n=this._newAdded[0],a=t.getLayout("points"),s=n&&n.shape.points;if(s&&s.length<2e4){var o=s.length,l=new Float32Array(o+a.length);l.set(s),l.set(a,o),n.endIndex=e.end,n.setShape({points:l})}else{this._newAdded=[];var u=this._create();u.startIndex=e.start,u.endIndex=e.end,u.incremental=!0,u.setShape({points:a}),this._setCommon(u,t,i)}},r.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},r.prototype._create=function(){var e=new Cye({cursor:"default"});return e.ignoreCoarsePointer=!0,this.group.add(e),this._newAdded.push(e),e},r.prototype._setCommon=function(e,t,i){var n=t.hostModel;i=i||{};var a=t.getVisual("symbolSize");e.setShape("size",a instanceof Array?a:[a,a]),e.softClipShape=i.clipShape||null,e.symbolProxy=cr(t.getVisual("symbol"),0,0,0,0),e.setColor=e.symbolProxy.setColor;var s=e.shape.size[0]<Dq;e.useStyle(n.getModel("itemStyle").getItemStyle(s?["color","shadowBlur","shadowColor"]:["color"]));var o=t.getVisual("style"),l=o&&o.fill;l&&e.setColor(l);var u=ke(e);u.seriesIndex=n.seriesIndex,e.on("mousemove",function(c){u.dataIndex=null;var h=e.hoverDataIdx;h>=0&&(u.dataIndex=h+(e.startIndex||0))})},r.prototype.remove=function(){this._clear()},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}(),Dye=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,n){var a=t.getData(),s=this._updateSymbolDraw(a,t);s.updateData(a,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,i,n){var a=t.getData(),s=this._updateSymbolDraw(a,t);s.incrementalPrepareUpdate(a),this._finished=!1},e.prototype.incrementalRender=function(t,i,n){this._symbolDraw.incrementalUpdate(t,i.getData(),{clipShape:this._getClipShape(i)}),this._finished=t.end===i.getData().count()},e.prototype.updateTransform=function(t,i,n){var a=t.getData();if(this.group.dirty(),!this._finished||a.count()>1e4)return{update:!0};var s=Pg("").reset(t,i,n);s.progress&&s.progress({start:0,end:a.count(),count:a.count()},a),this._symbolDraw.updateLayout(a)},e.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},e.prototype._getClipShape=function(t){if(t.get("clip",!0)){var i=t.coordinateSystem;return i&&i.getArea&&i.getArea(.1)}},e.prototype._updateSymbolDraw=function(t,i){var n=this._symbolDraw,a=i.pipelineContext,s=a.large;return(!n||s!==this._isLargeDraw)&&(n&&n.remove(),n=this._symbolDraw=s?new Aye:new Eg,this._isLargeDraw=s,this.group.removeAll()),this.group.add(n.group),n},e.prototype.remove=function(t,i){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(Tt),Eye=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},e}(Qe),q2=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",_r).models[0]},e.type="cartesian2dAxis",e}(Qe);ir(q2,rd);var Eq={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#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)"]}}},Iye=He({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},Eq),kE=He({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}}},Eq),Pye=He({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},kE),Mye=Ce({logBase:10},kE);const Iq={category:Iye,value:kE,time:Pye,log:Mye};var Lye={value:1,category:1,time:1,log:1};function xf(r,e,t,i){R(Lye,function(n,a){var s=He(He({},Iq[a],!0),i,!0),o=function(l){j(u,l);function u(){var c=l!==null&&l.apply(this,arguments)||this;return c.type=e+"Axis."+a,c}return u.prototype.mergeDefaultAndTheme=function(c,h){var d=Ov(this),f=d?Xf(c):{},p=h.getTheme();He(c,p.get(a+"Axis")),He(c,this.getDefaultOption()),c.type=uN(c),d&&ll(c,f,d)},u.prototype.optionUpdated=function(){var c=this.option;c.type==="category"&&(this.__ordinalMeta=F2.createByAxisModel(this))},u.prototype.getCategories=function(c){var h=this.option;if(h.type==="category")return c?h.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.type=e+"Axis."+a,u.defaultOption=s,u}(t);r.registerComponentModel(o)}),r.registerSubTypeDefaulter(e+"Axis",uN)}function uN(r){return r.type||(r.data?"category":"value")}var kye=function(){function r(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return r.prototype.getAxis=function(e){return this._axes[e]},r.prototype.getAxes=function(){return ae(this._dimList,function(e){return this._axes[e]},this)},r.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),_t(this.getAxes(),function(t){return t.scale.type===e})},r.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},r}(),j2=["x","y"];function cN(r){return r.type==="interval"||r.type==="time"}var Rye=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=j2,t}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,i=this.getAxis("y").scale;if(!(!cN(t)||!cN(i))){var n=t.getExtent(),a=i.getExtent(),s=this.dataToPoint([n[0],a[0]]),o=this.dataToPoint([n[1],a[1]]),l=n[1]-n[0],u=a[1]-a[0];if(!(!l||!u)){var c=(o[0]-s[0])/l,h=(o[1]-s[1])/u,d=s[0]-n[0]*c,f=s[1]-a[0]*h,p=this._transform=[c,0,0,h,d,f];this._invTransform=gc([],p)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(t){var i=this.getAxis("x"),n=this.getAxis("y");return i.contain(i.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.containZone=function(t,i){var n=this.dataToPoint(t),a=this.dataToPoint(i),s=this.getArea(),o=new We(n[0],n[1],a[0]-n[0],a[1]-n[1]);return s.intersect(o)},e.prototype.dataToPoint=function(t,i,n){n=n||[];var a=t[0],s=t[1];if(this._transform&&a!=null&&isFinite(a)&&s!=null&&isFinite(s))return $r(n,t,this._transform);var o=this.getAxis("x"),l=this.getAxis("y");return n[0]=o.toGlobalCoord(o.dataToCoord(a,i)),n[1]=l.toGlobalCoord(l.dataToCoord(s,i)),n},e.prototype.clampData=function(t,i){var n=this.getAxis("x").scale,a=this.getAxis("y").scale,s=n.getExtent(),o=a.getExtent(),l=n.parse(t[0]),u=a.parse(t[1]);return i=i||[],i[0]=Math.min(Math.max(Math.min(s[0],s[1]),l),Math.max(s[0],s[1])),i[1]=Math.min(Math.max(Math.min(o[0],o[1]),u),Math.max(o[0],o[1])),i},e.prototype.pointToData=function(t,i){var n=[];if(this._invTransform)return $r(n,t,this._invTransform);var a=this.getAxis("x"),s=this.getAxis("y");return n[0]=a.coordToData(a.toLocalCoord(t[0]),i),n[1]=s.coordToData(s.toLocalCoord(t[1]),i),n},e.prototype.getOtherAxis=function(t){return this.getAxis(t.dim==="x"?"y":"x")},e.prototype.getArea=function(t){t=t||0;var i=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),a=Math.min(i[0],i[1])-t,s=Math.min(n[0],n[1])-t,o=Math.max(i[0],i[1])-a+t,l=Math.max(n[0],n[1])-s+t;return new We(a,s,o,l)},e}(kye),Oye=function(r){j(e,r);function e(t,i,n,a,s){var o=r.call(this,t,i,n)||this;return o.index=0,o.type=a||"value",o.position=s||"bottom",o}return e.prototype.isHorizontal=function(){var t=this.position;return t==="top"||t==="bottom"},e.prototype.getGlobalExtent=function(t){var i=this.getExtent();return i[0]=this.toGlobalCoord(i[0]),i[1]=this.toGlobalCoord(i[1]),t&&i[0]>i[1]&&i.reverse(),i},e.prototype.pointToData=function(t,i){return this.coordToData(this.toLocalCoord(t[this.dim==="x"?0:1]),i)},e.prototype.setCategorySortInfo=function(t){if(this.type!=="category")return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e}(aa);function X2(r,e,t){t=t||{};var i=r.coordinateSystem,n=e.axis,a={},s=n.getAxesOnZeroOf()[0],o=n.position,l=s?"onZero":o,u=n.dim,c=i.getRect(),h=[c.x,c.x+c.width,c.y,c.y+c.height],d={left:0,right:1,top:0,bottom:1,onZero:2},f=e.get("offset")||0,p=u==="x"?[h[2]-f,h[3]+f]:[h[0]-f,h[1]+f];if(s){var v=s.toGlobalCoord(s.dataToCoord(0));p[d.onZero]=Math.max(Math.min(v,p[1]),p[0])}a.position=[u==="y"?p[d[l]]:h[0],u==="x"?p[d[l]]:h[3]],a.rotation=Math.PI/2*(u==="x"?0:1);var g={top:-1,bottom:1,left:-1,right:1};a.labelDirection=a.tickDirection=a.nameDirection=g[o],a.labelOffset=s?p[d[o]]-p[d.onZero]:0,e.get(["axisTick","inside"])&&(a.tickDirection=-a.tickDirection),Rr(t.labelInside,e.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var m=e.get(["axisLabel","rotate"]);return a.labelRotate=l==="top"?-m:m,a.z2=1,a}function hN(r){return r.get("coordinateSystem")==="cartesian2d"}function fN(r){var e={xAxisModel:null,yAxisModel:null};return R(e,function(t,i){var n=i.replace(/Model$/,""),a=r.getReferringComponents(n,_r).models[0];e[i]=a}),e}var RT=Math.log;function Pq(r,e,t){var i=io.prototype,n=i.getTicks.call(t),a=i.getTicks.call(t,!0),s=n.length-1,o=i.getInterval.call(t),l=kW(r,e),u=l.extent,c=l.fixMin,h=l.fixMax;if(r.type==="log"){var d=RT(r.base);u=[RT(u[0])/d,RT(u[1])/d]}r.setExtent(u[0],u[1]),r.calcNiceExtent({splitNumber:s,fixMin:c,fixMax:h});var f=i.getExtent.call(r);c&&(u[0]=f[0]),h&&(u[1]=f[1]);var p=i.getInterval.call(r),v=u[0],g=u[1];if(c&&h)p=(g-v)/s;else if(c)for(g=u[0]+p*s;g<u[1]&&isFinite(g)&&isFinite(u[1]);)p=_T(p),g=u[0]+p*s;else if(h)for(v=u[1]-p*s;v>u[0]&&isFinite(v)&&isFinite(u[0]);)p=_T(p),v=u[1]-p*s;else{var m=r.getTicks().length-1;m>s&&(p=_T(p));var y=p*s;g=Math.ceil(u[1]/p)*p,v=Yt(g-y),v<0&&u[0]>=0?(v=0,g=Yt(y)):g>0&&u[1]<=0&&(g=0,v=-Yt(y))}var _=(n[0].value-a[0].value)/o,b=(n[s].value-a[s].value)/o;i.setExtent.call(r,v+p*_,g+p*b),i.setInterval.call(r,p),(_||b)&&i.setNiceExtent.call(r,v+p,g-p)}var Nye=function(){function r(e,t,i){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=j2,this._initCartesian(e,t,i),this.model=e}return r.prototype.getRect=function(){return this._rect},r.prototype.update=function(e,t){var i=this._axesMap;this._updateScale(e,this.model);function n(s){var o,l=rt(s),u=l.length;if(u){for(var c=[],h=u-1;h>=0;h--){var d=+l[h],f=s[d],p=f.model,v=f.scale;U2(v)&&p.get("alignTicks")&&p.get("interval")==null?c.push(f):(cc(v,p),U2(v)&&(o=f))}c.length&&(o||(o=c.pop(),cc(o.scale,o.model)),R(c,function(g){Pq(g.scale,g.model,o.scale)}))}}n(i.x),n(i.y);var a={};R(i.x,function(s){dN(i,"y",s,a)}),R(i.y,function(s){dN(i,"x",s,a)}),this.resize(this.model,t)},r.prototype.resize=function(e,t,i){var n=e.getBoxLayoutParams(),a=!i&&e.get("containLabel"),s=br(n,{width:t.getWidth(),height:t.getHeight()});this._rect=s;var o=this._axesList;l(),a&&(R(o,function(u){if(!u.model.get(["axisLabel","inside"])){var c=rge(u);if(c){var h=u.isHorizontal()?"height":"width",d=u.model.get(["axisLabel","margin"]);s[h]-=c[h]+d,u.position==="top"?s.y+=c.height+d:u.position==="left"&&(s.x+=c.width+d)}}}),l()),R(this._coordsList,function(u){u.calcAffineTransform()});function l(){R(o,function(u){var c=u.isHorizontal(),h=c?[0,s.width]:[0,s.height],d=u.inverse?1:0;u.setExtent(h[d],h[1-d]),Bye(u,c?s.x:s.y)})}},r.prototype.getAxis=function(e,t){var i=this._axesMap[e];if(i!=null)return i[t||0]},r.prototype.getAxes=function(){return this._axesList.slice()},r.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var i="x"+e+"y"+t;return this._coordsMap[i]}Ae(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var n=0,a=this._coordsList;n<a.length;n++)if(a[n].getAxis("x").index===e||a[n].getAxis("y").index===t)return a[n]},r.prototype.getCartesians=function(){return this._coordsList.slice()},r.prototype.convertToPixel=function(e,t,i){var n=this._findConvertTarget(t);return n.cartesian?n.cartesian.dataToPoint(i):n.axis?n.axis.toGlobalCoord(n.axis.dataToCoord(i)):null},r.prototype.convertFromPixel=function(e,t,i){var n=this._findConvertTarget(t);return n.cartesian?n.cartesian.pointToData(i):n.axis?n.axis.coordToData(n.axis.toLocalCoord(i)):null},r.prototype._findConvertTarget=function(e){var t=e.seriesModel,i=e.xAxisModel||t&&t.getReferringComponents("xAxis",_r).models[0],n=e.yAxisModel||t&&t.getReferringComponents("yAxis",_r).models[0],a=e.gridModel,s=this._coordsList,o,l;if(t)o=t.coordinateSystem,Xe(s,o)<0&&(o=null);else if(i&&n)o=this.getCartesian(i.componentIndex,n.componentIndex);else if(i)l=this.getAxis("x",i.componentIndex);else if(n)l=this.getAxis("y",n.componentIndex);else if(a){var u=a.coordinateSystem;u===this&&(o=this._coordsList[0])}return{cartesian:o,axis:l}},r.prototype.containPoint=function(e){var t=this._coordsList[0];if(t)return t.containPoint(e)},r.prototype._initCartesian=function(e,t,i){var n=this,a=this,s={left:!1,right:!1,top:!1,bottom:!1},o={x:{},y:{}},l={x:0,y:0};if(t.eachComponent("xAxis",u("x"),this),t.eachComponent("yAxis",u("y"),this),!l.x||!l.y){this._axesMap={},this._axesList=[];return}this._axesMap=o,R(o.x,function(c,h){R(o.y,function(d,f){var p="x"+h+"y"+f,v=new Rye(p);v.master=n,v.model=e,n._coordsMap[p]=v,n._coordsList.push(v),v.addAxis(c),v.addAxis(d)})});function u(c){return function(h,d){if(OT(h,e)){var f=h.get("position");c==="x"?f!=="top"&&f!=="bottom"&&(f=s.bottom?"top":"bottom"):f!=="left"&&f!=="right"&&(f=s.left?"right":"left"),s[f]=!0;var p=new Oye(c,Ag(h),[0,0],h.get("type"),f),v=p.type==="category";p.onBand=v&&h.get("boundaryGap"),p.inverse=h.get("inverse"),h.axis=p,p.model=h,p.grid=a,p.index=d,a._axesList.push(p),o[c][d]=p,l[c]++}}}},r.prototype._updateScale=function(e,t){R(this._axesList,function(n){if(n.scale.setExtent(1/0,-1/0),n.type==="category"){var a=n.model.get("categorySortInfo");n.scale.setSortInfo(a)}}),e.eachSeries(function(n){if(hN(n)){var a=fN(n),s=a.xAxisModel,o=a.yAxisModel;if(!OT(s,t)||!OT(o,t))return;var l=this.getCartesian(s.componentIndex,o.componentIndex),u=n.getData(),c=l.getAxis("x"),h=l.getAxis("y");i(u,c),i(u,h)}},this);function i(n,a){R(f_(n,a.dim),function(s){a.scale.unionExtentFromData(n,s)})}},r.prototype.getTooltipAxes=function(e){var t=[],i=[];return R(this.getCartesians(),function(n){var a=e!=null&&e!=="auto"?n.getAxis(e):n.getBaseAxis(),s=n.getOtherAxis(a);Xe(t,a)<0&&t.push(a),Xe(i,s)<0&&i.push(s)}),{baseAxes:t,otherAxes:i}},r.create=function(e,t){var i=[];return e.eachComponent("grid",function(n,a){var s=new r(n,e,t);s.name="grid_"+a,s.resize(n,t,!0),n.coordinateSystem=s,i.push(s)}),e.eachSeries(function(n){if(hN(n)){var a=fN(n),s=a.xAxisModel,o=a.yAxisModel,l=s.getCoordSysModel(),u=l.coordinateSystem;n.coordinateSystem=u.getCartesian(s.componentIndex,o.componentIndex)}}),i},r.dimensions=j2,r}();function OT(r,e){return r.getCoordSysModel()===e}function dN(r,e,t,i){t.getAxesOnZeroOf=function(){return a?[a]:[]};var n=r[e],a,s=t.model,o=s.get(["axisLine","onZero"]),l=s.get(["axisLine","onZeroAxisIndex"]);if(!o)return;if(l!=null)pN(n[l])&&(a=n[l]);else for(var u in n)if(n.hasOwnProperty(u)&&pN(n[u])&&!i[c(n[u])]){a=n[u];break}a&&(i[c(a)]=!0);function c(h){return h.dim+"_"+h.index}}function pN(r){return r&&r.type!=="category"&&r.type!=="time"&&tge(r)}function Bye(r,e){var t=r.getExtent(),i=t[0]+t[1];r.toGlobalCoord=r.dim==="x"?function(n){return n+e}:function(n){return i-n+e},r.toLocalCoord=r.dim==="x"?function(n){return n-e}:function(n){return i-n+e}}var Ho=Math.PI,ki=function(){function r(e,t){this.group=new Le,this.opt=t,this.axisModel=e,Ce(t,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var i=new Le({x:t.position[0],y:t.position[1],rotation:t.rotation});i.updateTransform(),this._transformGroup=i}return r.prototype.hasBuilder=function(e){return!!vN[e]},r.prototype.add=function(e){vN[e](this.opt,this.axisModel,this.group,this._transformGroup)},r.prototype.getGroup=function(){return this.group},r.innerTextLayout=function(e,t,i){var n=SD(t-e),a,s;return mf(n)?(s=i>0?"top":"bottom",a="center"):mf(n-Ho)?(s=i>0?"bottom":"top",a="center"):(s="middle",n>0&&n<Ho?a=i>0?"right":"left":a=i>0?"left":"right"),{rotation:n,textAlign:a,textVerticalAlign:s}},r.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},r.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},r}(),vN={axisLine:function(r,e,t,i){var n=e.get(["axisLine","show"]);if(n==="auto"&&r.handleAutoShown&&(n=r.handleAutoShown("axisLine")),!!n){var a=e.axis.getExtent(),s=i.transform,o=[a[0],0],l=[a[1],0],u=o[0]>l[0];s&&($r(o,o,s),$r(l,l,s));var c=Q({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),h=new Ar({shape:{x1:o[0],y1:o[1],x2:l[0],y2:l[1]},style:c,strokeContainThreshold:r.strokeContainThreshold||5,silent:!0,z2:1});_f(h.shape,h.style.lineWidth),h.anid="line",t.add(h);var d=e.get(["axisLine","symbol"]);if(d!=null){var f=e.get(["axisLine","symbolSize"]);de(d)&&(d=[d,d]),(de(f)||ut(f))&&(f=[f,f]);var p=_c(e.get(["axisLine","symbolOffset"])||0,f),v=f[0],g=f[1];R([{rotate:r.rotation+Math.PI/2,offset:p[0],r:0},{rotate:r.rotation-Math.PI/2,offset:p[1],r:Math.sqrt((o[0]-l[0])*(o[0]-l[0])+(o[1]-l[1])*(o[1]-l[1]))}],function(m,y){if(d[y]!=="none"&&d[y]!=null){var _=cr(d[y],-v/2,-g/2,v,g,c.stroke,!0),b=m.r+m.offset,T=u?l:o;_.attr({rotation:m.rotate,x:T[0]+b*Math.cos(r.rotation),y:T[1]-b*Math.sin(r.rotation),silent:!0,z2:11}),t.add(_)}})}}},axisTickLabel:function(r,e,t,i){var n=Vye(t,i,e,r),a=Gye(t,i,e,r);if(Uye(e,a,n),zye(t,i,e,r.tickDirection),e.get(["axisLabel","hideOverlap"])){var s=jW(ae(a,function(o){return{label:o,priority:o.z2,defaultAttr:{ignore:o.ignore}}}));KW(s)}},axisName:function(r,e,t,i){var n=Rr(r.axisName,e.get("name"));if(n){var a=e.get("nameLocation"),s=r.nameDirection,o=e.getModel("nameTextStyle"),l=e.get("nameGap")||0,u=e.axis.getExtent(),c=u[0]>u[1]?-1:1,h=[a==="start"?u[0]-c*l:a==="end"?u[1]+c*l:(u[0]+u[1])/2,mN(a)?r.labelOffset+s*l:0],d,f=e.get("nameRotate");f!=null&&(f=f*Ho/180);var p;mN(a)?d=ki.innerTextLayout(r.rotation,f??r.rotation,s):(d=Fye(r.rotation,a,f||0,u),p=r.axisNameAvailableWidth,p!=null&&(p=Math.abs(p/Math.sin(d.rotation)),!isFinite(p)&&(p=null)));var v=o.getFont(),g=e.get("nameTruncate",!0)||{},m=g.ellipsis,y=Rr(r.nameTruncateMaxWidth,g.maxWidth,p),_=new nt({x:h[0],y:h[1],rotation:d.rotation,silent:ki.isLabelSilent(e),style:Mt(o,{text:n,font:v,overflow:"truncate",width:y,ellipsis:m,fill:o.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:o.get("align")||d.textAlign,verticalAlign:o.get("verticalAlign")||d.textVerticalAlign}),z2:1});if(Wf({el:_,componentModel:e,itemName:n}),_.__fullText=n,_.anid="name",e.get("triggerEvent")){var b=ki.makeAxisEventDataBase(e);b.targetType="axisName",b.name=n,ke(_).eventData=b}i.add(_),_.updateTransform(),t.add(_),_.decomposeTransform()}}};function Fye(r,e,t,i){var n=SD(t-r),a,s,o=i[0]>i[1],l=e==="start"&&!o||e!=="start"&&o;return mf(n-Ho/2)?(s=l?"bottom":"top",a="center"):mf(n-Ho*1.5)?(s=l?"top":"bottom",a="center"):(s="middle",n<Ho*1.5&&n>Ho/2?a=l?"left":"right":a=l?"right":"left"),{rotation:n,textAlign:a,textVerticalAlign:s}}function Uye(r,e,t){if(!RW(r.axis)){var i=r.get(["axisLabel","showMinLabel"]),n=r.get(["axisLabel","showMaxLabel"]);e=e||[],t=t||[];var a=e[0],s=e[1],o=e[e.length-1],l=e[e.length-2],u=t[0],c=t[1],h=t[t.length-1],d=t[t.length-2];i===!1?(Ln(a),Ln(u)):gN(a,s)&&(i?(Ln(s),Ln(c)):(Ln(a),Ln(u))),n===!1?(Ln(o),Ln(h)):gN(l,o)&&(n?(Ln(l),Ln(d)):(Ln(o),Ln(h)))}}function Ln(r){r&&(r.ignore=!0)}function gN(r,e){var t=r&&r.getBoundingRect().clone(),i=e&&e.getBoundingRect().clone();if(!(!t||!i)){var n=vg([]);return vl(n,n,-r.rotation),t.applyTransform(os([],n,r.getLocalTransform())),i.applyTransform(os([],n,e.getLocalTransform())),t.intersect(i)}}function mN(r){return r==="middle"||r==="center"}function Mq(r,e,t,i,n){for(var a=[],s=[],o=[],l=0;l<r.length;l++){var u=r[l].coord;s[0]=u,s[1]=0,o[0]=u,o[1]=t,e&&($r(s,s,e),$r(o,o,e));var c=new Ar({shape:{x1:s[0],y1:s[1],x2:o[0],y2:o[1]},style:i,z2:2,autoBatch:!0,silent:!0});_f(c.shape,c.style.lineWidth),c.anid=n+"_"+r[l].tickValue,a.push(c)}return a}function Vye(r,e,t,i){var n=t.axis,a=t.getModel("axisTick"),s=a.get("show");if(s==="auto"&&i.handleAutoShown&&(s=i.handleAutoShown("axisTick")),!(!s||n.scale.isBlank())){for(var o=a.getModel("lineStyle"),l=i.tickDirection*a.get("length"),u=n.getTicksCoords(),c=Mq(u,e.transform,l,Ce(o.getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])}),"ticks"),h=0;h<c.length;h++)r.add(c[h]);return c}}function zye(r,e,t,i){var n=t.axis,a=t.getModel("minorTick");if(!(!a.get("show")||n.scale.isBlank())){var s=n.getMinorTicksCoords();if(s.length)for(var o=a.getModel("lineStyle"),l=i*a.get("length"),u=Ce(o.getLineStyle(),Ce(t.getModel("axisTick").getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])})),c=0;c<s.length;c++)for(var h=Mq(s[c],e.transform,l,u,"minorticks_"+c),d=0;d<h.length;d++)r.add(h[d])}}function Gye(r,e,t,i){var n=t.axis,a=Rr(i.axisLabelShow,t.get(["axisLabel","show"]));if(!(!a||n.scale.isBlank())){var s=t.getModel("axisLabel"),o=s.get("margin"),l=n.getViewLabels(),u=(Rr(i.labelRotate,s.get("rotate"))||0)*Ho/180,c=ki.innerTextLayout(i.rotation,u,i.labelDirection),h=t.getCategories&&t.getCategories(!0),d=[],f=ki.isLabelSilent(t),p=t.get("triggerEvent");return R(l,function(v,g){var m=n.scale.type==="ordinal"?n.scale.getRawOrdinalNumber(v.tickValue):v.tickValue,y=v.formattedLabel,_=v.rawLabel,b=s;if(h&&h[m]){var T=h[m];Ae(T)&&T.textStyle&&(b=new ft(T.textStyle,s,t.ecModel))}var x=b.getTextColor()||t.get(["axisLine","lineStyle","color"]),C=n.dataToCoord(m),D=b.getShallow("align",!0)||c.textAlign,I=Fe(b.getShallow("alignMinLabel",!0),D),M=Fe(b.getShallow("alignMaxLabel",!0),D),L=b.getShallow("verticalAlign",!0)||b.getShallow("baseline",!0)||c.textVerticalAlign,N=Fe(b.getShallow("verticalAlignMinLabel",!0),L),O=Fe(b.getShallow("verticalAlignMaxLabel",!0),L),B=new nt({x:C,y:i.labelOffset+i.labelDirection*o,rotation:c.rotation,silent:f,z2:10+(v.level||0),style:Mt(b,{text:y,align:g===0?I:g===l.length-1?M:D,verticalAlign:g===0?N:g===l.length-1?O:L,fill:xe(x)?x(n.type==="category"?_:n.type==="value"?m+"":m,g):x})});if(B.anid="label_"+m,p){var F=ki.makeAxisEventDataBase(t);F.targetType="axisLabel",F.value=_,F.tickIndex=g,n.type==="category"&&(F.dataIndex=m),ke(B).eventData=F}e.add(B),B.updateTransform(),d.push(B),r.add(B),B.decomposeTransform()}),d}}function Hye(r,e){var t={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return $ye(t,r,e),t.seriesInvolved&&qye(t,r),t}function $ye(r,e,t){var i=e.getComponent("tooltip"),n=e.getComponent("axisPointer"),a=n.get("link",!0)||[],s=[];R(t.getCoordinateSystems(),function(o){if(!o.axisPointerEnabled)return;var l=$v(o.model),u=r.coordSysAxesInfo[l]={};r.coordSysMap[l]=o;var c=o.model,h=c.getModel("tooltip",i);if(R(o.getAxes(),Be(v,!1,null)),o.getTooltipAxes&&i&&h.get("show")){var d=h.get("trigger")==="axis",f=h.get(["axisPointer","type"])==="cross",p=o.getTooltipAxes(h.get(["axisPointer","axis"]));(d||f)&&R(p.baseAxes,Be(v,f?"cross":!0,d)),f&&R(p.otherAxes,Be(v,"cross",!1))}function v(g,m,y){var _=y.model.getModel("axisPointer",n),b=_.get("show");if(!(!b||b==="auto"&&!g&&!Y2(_))){m==null&&(m=_.get("triggerTooltip")),_=g?Wye(y,h,n,e,g,m):_;var T=_.get("snap"),x=_.get("triggerEmphasis"),C=$v(y.model),D=m||T||y.type==="category",I=r.axesInfo[C]={key:C,axis:y,coordSys:o,axisPointerModel:_,triggerTooltip:m,triggerEmphasis:x,involveSeries:D,snap:T,useHandle:Y2(_),seriesModels:[],linkGroup:null};u[C]=I,r.seriesInvolved=r.seriesInvolved||D;var M=jye(a,y);if(M!=null){var L=s[M]||(s[M]={axesInfo:{}});L.axesInfo[C]=I,L.mapper=a[M].mapper,I.linkGroup=L}}}})}function Wye(r,e,t,i,n,a){var s=e.getModel("axisPointer"),o=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};R(o,function(d){l[d]=Ee(s.get(d))}),l.snap=r.type!=="category"&&!!a,s.get("type")==="cross"&&(l.type="line");var u=l.label||(l.label={});if(u.show==null&&(u.show=!1),n==="cross"){var c=s.get(["label","show"]);if(u.show=c??!0,!a){var h=l.lineStyle=s.get("crossStyle");h&&Ce(u,h.textStyle)}}return r.model.getModel("axisPointer",new ft(l,t,i))}function qye(r,e){e.eachSeries(function(t){var i=t.coordinateSystem,n=t.get(["tooltip","trigger"],!0),a=t.get(["tooltip","show"],!0);!i||n==="none"||n===!1||n==="item"||a===!1||t.get(["axisPointer","show"],!0)===!1||R(r.coordSysAxesInfo[$v(i.model)],function(s){var o=s.axis;i.getAxis(o.dim)===o&&(s.seriesModels.push(t),s.seriesDataCount==null&&(s.seriesDataCount=0),s.seriesDataCount+=t.getData().count())})})}function jye(r,e){for(var t=e.model,i=e.dim,n=0;n<r.length;n++){var a=r[n]||{};if(NT(a[i+"AxisId"],t.id)||NT(a[i+"AxisIndex"],t.componentIndex)||NT(a[i+"AxisName"],t.name))return n}}function NT(r,e){return r==="all"||ie(r)&&Xe(r,e)>=0||r===e}function Xye(r){var e=RE(r);if(e){var t=e.axisPointerModel,i=e.axis.scale,n=t.option,a=t.get("status"),s=t.get("value");s!=null&&(s=i.parse(s));var o=Y2(t);a==null&&(n.status=o?"show":"hide");var l=i.getExtent().slice();l[0]>l[1]&&l.reverse(),(s==null||s>l[1])&&(s=l[1]),s<l[0]&&(s=l[0]),n.value=s,o&&(n.status=e.axis.scale.isBlank()?"hide":"show")}}function RE(r){var e=(r.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[$v(r)]}function Yye(r){var e=RE(r);return e&&e.axisPointerModel}function Y2(r){return!!r.get(["handle","show"])}function $v(r){return r.type+"||"+r.id}var yN={},Sc=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,n,a){this.axisPointerClass&&Xye(t),r.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(t,n,!0)},e.prototype.updateAxisPointer=function(t,i,n,a){this._doUpdateAxisPointerClass(t,n,!1)},e.prototype.remove=function(t,i){var n=this._axisPointer;n&&n.remove(i)},e.prototype.dispose=function(t,i){this._disposeAxisPointer(i),r.prototype.dispose.apply(this,arguments)},e.prototype._doUpdateAxisPointerClass=function(t,i,n){var a=e.getAxisPointerClass(this.axisPointerClass);if(a){var s=Yye(t);s?(this._axisPointer||(this._axisPointer=new a)).render(t,s,i,n):this._disposeAxisPointer(i)}},e.prototype._disposeAxisPointer=function(t){this._axisPointer&&this._axisPointer.dispose(t),this._axisPointer=null},e.registerAxisPointerClass=function(t,i){yN[t]=i},e.getAxisPointerClass=function(t){return t&&yN[t]},e.type="axis",e}(Nt),K2=lt();function Lq(r,e,t,i){var n=t.axis;if(!n.scale.isBlank()){var a=t.getModel("splitArea"),s=a.getModel("areaStyle"),o=s.get("color"),l=i.coordinateSystem.getRect(),u=n.getTicksCoords({tickModel:a,clamp:!0});if(u.length){var c=o.length,h=K2(r).splitAreaColors,d=be(),f=0;if(h)for(var p=0;p<u.length;p++){var v=h.get(u[p].tickValue);if(v!=null){f=(v+(c-1)*p)%c;break}}var g=n.toGlobalCoord(u[0].coord),m=s.getAreaStyle();o=ie(o)?o:[o];for(var p=1;p<u.length;p++){var y=n.toGlobalCoord(u[p].coord),_=void 0,b=void 0,T=void 0,x=void 0;n.isHorizontal()?(_=g,b=l.y,T=y-_,x=l.height,g=_+T):(_=l.x,b=g,T=l.width,x=y-b,g=b+x);var C=u[p-1].tickValue;C!=null&&d.set(C,f),e.add(new at({anid:C!=null?"area_"+C:null,shape:{x:_,y:b,width:T,height:x},style:Ce({fill:o[f]},m),autoBatch:!0,silent:!0})),f=(f+1)%c}K2(r).splitAreaColors=d}}}function kq(r){K2(r).splitAreaColors=null}var Kye=["axisLine","axisTickLabel","axisName"],Zye=["splitArea","splitLine","minorSplitLine"],Rq=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="CartesianAxisPointer",t}return e.prototype.render=function(t,i,n,a){this.group.removeAll();var s=this._axisGroup;if(this._axisGroup=new Le,this.group.add(this._axisGroup),!!t.get("show")){var o=t.getCoordSysModel(),l=X2(o,t),u=new ki(t,Q({handleAutoShown:function(h){for(var d=o.coordinateSystem.getCartesians(),f=0;f<d.length;f++)if(U2(d[f].getOtherAxis(t.axis).scale))return!0;return!1}},l));R(Kye,u.add,u),this._axisGroup.add(u.getGroup()),R(Zye,function(h){t.get([h,"show"])&&Qye[h](this,this._axisGroup,t,o)},this);var c=a&&a.type==="changeAxisOrder"&&a.isInitSort;c||xg(s,this._axisGroup,t),r.prototype.render.call(this,t,i,n,a)}},e.prototype.remove=function(){kq(this)},e.type="cartesianAxis",e}(Sc),Qye={splitLine:function(r,e,t,i){var n=t.axis;if(!n.scale.isBlank()){var a=t.getModel("splitLine"),s=a.getModel("lineStyle"),o=s.get("color");o=ie(o)?o:[o];for(var l=i.coordinateSystem.getRect(),u=n.isHorizontal(),c=0,h=n.getTicksCoords({tickModel:a}),d=[],f=[],p=s.getLineStyle(),v=0;v<h.length;v++){var g=n.toGlobalCoord(h[v].coord);u?(d[0]=g,d[1]=l.y,f[0]=g,f[1]=l.y+l.height):(d[0]=l.x,d[1]=g,f[0]=l.x+l.width,f[1]=g);var m=c++%o.length,y=h[v].tickValue,_=new Ar({anid:y!=null?"line_"+h[v].tickValue:null,autoBatch:!0,shape:{x1:d[0],y1:d[1],x2:f[0],y2:f[1]},style:Ce({stroke:o[m]},p),silent:!0});_f(_.shape,p.lineWidth),e.add(_)}}},minorSplitLine:function(r,e,t,i){var n=t.axis,a=t.getModel("minorSplitLine"),s=a.getModel("lineStyle"),o=i.coordinateSystem.getRect(),l=n.isHorizontal(),u=n.getMinorTicksCoords();if(u.length)for(var c=[],h=[],d=s.getLineStyle(),f=0;f<u.length;f++)for(var p=0;p<u[f].length;p++){var v=n.toGlobalCoord(u[f][p].coord);l?(c[0]=v,c[1]=o.y,h[0]=v,h[1]=o.y+o.height):(c[0]=o.x,c[1]=v,h[0]=o.x+o.width,h[1]=v);var g=new Ar({anid:"minor_line_"+u[f][p].tickValue,autoBatch:!0,shape:{x1:c[0],y1:c[1],x2:h[0],y2:h[1]},style:d,silent:!0});_f(g.shape,d.lineWidth),e.add(g)}},splitArea:function(r,e,t,i){Lq(r,e,t,i)}},Oq=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="xAxis",e}(Rq),Jye=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=Oq.type,t}return e.type="yAxis",e}(Rq),e0e=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="grid",t}return e.prototype.render=function(t,i){this.group.removeAll(),t.get("show")&&this.group.add(new at({shape:t.coordinateSystem.getRect(),style:Ce({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))},e.type="grid",e}(Nt),_N={offset:0};function Nq(r){r.registerComponentView(e0e),r.registerComponentModel(Eye),r.registerCoordinateSystem("cartesian2d",Nye),xf(r,"x",q2,_N),xf(r,"y",q2,_N),r.registerComponentView(Oq),r.registerComponentView(Jye),r.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}function t0e(r){Ye(Nq),r.registerSeriesModel(xye),r.registerChartView(Dye),r.registerLayout(Pg("scatter"))}function r0e(r){r.eachSeriesByType("radar",function(e){var t=e.getData(),i=[],n=e.coordinateSystem;if(n){var a=n.getIndicatorAxes();R(a,function(s,o){t.each(t.mapDimension(a[o].dim),function(l,u){i[u]=i[u]||[];var c=n.dataToPoint(l,o);i[u][o]=bN(c)?c:SN(n)})}),t.each(function(s){var o=c9(i[s],function(l){return bN(l)})||SN(n);i[s].push(o.slice()),t.setItemLayout(s,i[s])})}})}function bN(r){return!isNaN(r[0])&&!isNaN(r[1])}function SN(r){return[r.cx,r.cy]}function i0e(r){var e=r.polar;if(e){ie(e)||(e=[e]);var t=[];R(e,function(i,n){i.indicator?(i.type&&!i.shape&&(i.shape=i.type),r.radar=r.radar||[],ie(r.radar)||(r.radar=[r.radar]),r.radar.push(i)):t.push(i)}),r.polar=t}R(r.series,function(i){i&&i.type==="radar"&&i.polarIndex&&(i.radarIndex=i.polarIndex)})}var n0e=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,n){var a=t.coordinateSystem,s=this.group,o=t.getData(),l=this._data;function u(d,f){var p=d.getItemVisual(f,"symbol")||"circle";if(p!=="none"){var v=Jf(d.getItemVisual(f,"symbolSize")),g=cr(p,-1,-1,2,2),m=d.getItemVisual(f,"symbolRotate")||0;return g.attr({style:{strokeNoScale:!0},z2:100,scaleX:v[0]/2,scaleY:v[1]/2,rotation:m*Math.PI/180||0}),g}}function c(d,f,p,v,g,m){p.removeAll();for(var y=0;y<f.length-1;y++){var _=u(v,g);_&&(_.__dimIdx=y,d[y]?(_.setPosition(d[y]),mc[m?"initProps":"updateProps"](_,{x:f[y][0],y:f[y][1]},t,g)):_.setPosition(f[y]),p.add(_))}}function h(d){return ae(d,function(f){return[a.cx,a.cy]})}o.diff(l).add(function(d){var f=o.getItemLayout(d);if(f){var p=new pi,v=new mi,g={shape:{points:f}};p.shape.points=h(f),v.shape.points=h(f),Bt(p,g,t,d),Bt(v,g,t,d);var m=new Le,y=new Le;m.add(v),m.add(p),m.add(y),c(v.shape.points,f,y,o,d,!0),o.setItemGraphicEl(d,m)}}).update(function(d,f){var p=l.getItemGraphicEl(f),v=p.childAt(0),g=p.childAt(1),m=p.childAt(2),y={shape:{points:o.getItemLayout(d)}};y.shape.points&&(c(v.shape.points,y.shape.points,m,o,d,!1),Ia(g),Ia(v),ct(v,y,t),ct(g,y,t),o.setItemGraphicEl(d,p))}).remove(function(d){s.remove(l.getItemGraphicEl(d))}).execute(),o.eachItemGraphicEl(function(d,f){var p=o.getItemModel(f),v=d.childAt(0),g=d.childAt(1),m=d.childAt(2),y=o.getItemVisual(f,"style"),_=y.fill;s.add(d),v.useStyle(Ce(p.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:_})),ei(v,p,"lineStyle"),ei(g,p,"areaStyle");var b=p.getModel("areaStyle"),T=b.isEmpty()&&b.parentModel.isEmpty();g.ignore=T,R(["emphasis","select","blur"],function(D){var I=p.getModel([D,"areaStyle"]),M=I.isEmpty()&&I.parentModel.isEmpty();g.ensureState(D).ignore=M&&T}),g.useStyle(Ce(b.getAreaStyle(),{fill:_,opacity:.7,decal:y.decal}));var x=p.getModel("emphasis"),C=x.getModel("itemStyle").getItemStyle();m.eachChild(function(D){if(D instanceof Ur){var I=D.style;D.useStyle(Q({image:I.image,x:I.x,y:I.y,width:I.width,height:I.height},y))}else D.useStyle(y),D.setColor(_),D.style.strokeNoScale=!0;var M=D.ensureState("emphasis");M.style=Ee(C);var L=o.getStore().get(o.getDimensionIndex(D.__dimIdx),f);(L==null||isNaN(L))&&(L=""),ti(D,Br(p),{labelFetcher:o.hostModel,labelDataIndex:f,labelDimIndex:D.__dimIdx,defaultText:L,inheritColor:_,defaultOpacity:y.opacity})}),Kt(d,x.get("focus"),x.get("blurScope"),x.get("disabled"))}),this._data=o},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.type="radar",e}(Tt),a0e=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new Lg(ge(this.getData,this),ge(this.getRawData,this))},e.prototype.getInitialData=function(t,i){return id(this,{generateCoord:"indicator_",generateCoordCount:1/0})},e.prototype.formatTooltip=function(t,i,n){var a=this.getData(),s=this.coordinateSystem,o=s.getIndicatorAxes(),l=this.getData().getName(t),u=l===""?this.name:l,c=L$(this,t);return Fr("section",{header:u,sortBlocks:!0,blocks:ae(o,function(h){var d=a.get(a.mapDimension(h.dim),t);return Fr("nameValue",{markerType:"subItem",markerColor:c,name:h.name,value:d,sortParam:d})})})},e.prototype.getTooltipPosition=function(t){if(t!=null){for(var i=this.getData(),n=this.coordinateSystem,a=i.getValues(ae(n.dimensions,function(u){return i.mapDimension(u)}),t),s=0,o=a.length;s<o;s++)if(!isNaN(a[s])){var l=n.getIndicatorAxes();return n.coordToPoint(l[s].dataToCoord(a[s]),s)}}},e.type="series.radar",e.dependencies=["radar"],e.defaultOption={z:2,colorBy:"data",coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid",join:"round"},label:{position:"top"},symbolSize:8},e}(Ct),qd=Iq.value;function ny(r,e){return Ce({show:e},r)}var s0e=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){var t=this.get("boundaryGap"),i=this.get("splitNumber"),n=this.get("scale"),a=this.get("axisLine"),s=this.get("axisTick"),o=this.get("axisLabel"),l=this.get("axisName"),u=this.get(["axisName","show"]),c=this.get(["axisName","formatter"]),h=this.get("axisNameGap"),d=this.get("triggerEvent"),f=ae(this.get("indicator")||[],function(p){p.max!=null&&p.max>0&&!p.min?p.min=0:p.min!=null&&p.min<0&&!p.max&&(p.max=0);var v=l;p.color!=null&&(v=Ce({color:p.color},l));var g=He(Ee(p),{boundaryGap:t,splitNumber:i,scale:n,axisLine:a,axisTick:s,axisLabel:o,name:p.text,showName:u,nameLocation:"end",nameGap:h,nameTextStyle:v,triggerEvent:d},!1);if(de(c)){var m=g.name;g.name=c.replace("{value}",m??"")}else xe(c)&&(g.name=c(g.name,g));var y=new ft(g,null,this.ecModel);return ir(y,rd.prototype),y.mainType="radar",y.componentIndex=this.componentIndex,y},this);this._indicatorModels=f},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:He({lineStyle:{color:"#bbb"}},qd.axisLine),axisLabel:ny(qd.axisLabel,!1),axisTick:ny(qd.axisTick,!1),splitLine:ny(qd.splitLine,!0),splitArea:ny(qd.splitArea,!0),indicator:[]},e}(Qe),o0e=["axisLine","axisTickLabel","axisName"],l0e=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,n){var a=this.group;a.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t){var i=t.coordinateSystem,n=i.getIndicatorAxes(),a=ae(n,function(s){var o=s.model.get("showName")?s.name:"",l=new ki(s.model,{axisName:o,position:[i.cx,i.cy],rotation:s.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return l});R(a,function(s){R(o0e,s.add,s),this.group.add(s.getGroup())},this)},e.prototype._buildSplitLineAndArea=function(t){var i=t.coordinateSystem,n=i.getIndicatorAxes();if(!n.length)return;var a=t.get("shape"),s=t.getModel("splitLine"),o=t.getModel("splitArea"),l=s.getModel("lineStyle"),u=o.getModel("areaStyle"),c=s.get("show"),h=o.get("show"),d=l.get("color"),f=u.get("color"),p=ie(d)?d:[d],v=ie(f)?f:[f],g=[],m=[];function y(F,U,$){var q=$%U.length;return F[q]=F[q]||[],q}if(a==="circle")for(var _=n[0].getTicksCoords(),b=i.cx,T=i.cy,x=0;x<_.length;x++){if(c){var C=y(g,p,x);g[C].push(new ms({shape:{cx:b,cy:T,r:_[x].coord}}))}if(h&&x<_.length-1){var C=y(m,v,x);m[C].push(new Vf({shape:{cx:b,cy:T,r0:_[x].coord,r:_[x+1].coord}}))}}else for(var D,I=ae(n,function(F,U){var $=F.getTicksCoords();return D=D==null?$.length-1:Math.min($.length-1,D),ae($,function(q){return i.coordToPoint(q.coord,U)})}),M=[],x=0;x<=D;x++){for(var L=[],N=0;N<n.length;N++)L.push(I[N][x]);if(L[0]&&L.push(L[0].slice()),c){var C=y(g,p,x);g[C].push(new mi({shape:{points:L}}))}if(h&&M){var C=y(m,v,x-1);m[C].push(new pi({shape:{points:L.concat(M)}}))}M=L.slice().reverse()}var O=l.getLineStyle(),B=u.getAreaStyle();R(m,function(F,U){this.group.add(vn(F,{style:Ce({stroke:"none",fill:v[U%v.length]},B),silent:!0}))},this),R(g,function(F,U){this.group.add(vn(F,{style:Ce({fill:"none",stroke:p[U%p.length]},O),silent:!0}))},this)},e.type="radar",e}(Nt),u0e=function(r){j(e,r);function e(t,i,n){var a=r.call(this,t,i,n)||this;return a.type="value",a.angle=0,a.name="",a}return e}(aa),c0e=function(){function r(e,t,i){this.dimensions=[],this._model=e,this._indicatorAxes=ae(e.getIndicatorModels(),function(n,a){var s="indicator_"+a,o=new u0e(s,new io);return o.name=n.get("name"),o.model=n,n.axis=o,this.dimensions.push(s),o},this),this.resize(e,i)}return r.prototype.getIndicatorAxes=function(){return this._indicatorAxes},r.prototype.dataToPoint=function(e,t){var i=this._indicatorAxes[t];return this.coordToPoint(i.dataToCoord(e),t)},r.prototype.coordToPoint=function(e,t){var i=this._indicatorAxes[t],n=i.angle,a=this.cx+e*Math.cos(n),s=this.cy-e*Math.sin(n);return[a,s]},r.prototype.pointToData=function(e){var t=e[0]-this.cx,i=e[1]-this.cy,n=Math.sqrt(t*t+i*i);t/=n,i/=n;for(var a=Math.atan2(-i,t),s=1/0,o,l=-1,u=0;u<this._indicatorAxes.length;u++){var c=this._indicatorAxes[u],h=Math.abs(a-c.angle);h<s&&(o=c,l=u,s=h)}return[l,+(o&&o.coordToData(n))]},r.prototype.resize=function(e,t){var i=e.get("center"),n=t.getWidth(),a=t.getHeight(),s=Math.min(n,a)/2;this.cx=ce(i[0],n),this.cy=ce(i[1],a),this.startAngle=e.get("startAngle")*Math.PI/180;var o=e.get("radius");(de(o)||ut(o))&&(o=[0,o]),this.r0=ce(o[0],s),this.r=ce(o[1],s),R(this._indicatorAxes,function(l,u){l.setExtent(this.r0,this.r);var c=this.startAngle+u*Math.PI*2/this._indicatorAxes.length;c=Math.atan2(Math.sin(c),Math.cos(c)),l.angle=c},this)},r.prototype.update=function(e,t){var i=this._indicatorAxes,n=this._model;R(i,function(o){o.scale.setExtent(1/0,-1/0)}),e.eachSeriesByType("radar",function(o,l){if(!(o.get("coordinateSystem")!=="radar"||e.getComponent("radar",o.get("radarIndex"))!==n)){var u=o.getData();R(i,function(c){c.scale.unionExtentFromData(u,u.mapDimension(c.dim))})}},this);var a=n.get("splitNumber"),s=new io;s.setExtent(0,a),s.setInterval(1),R(i,function(o,l){Pq(o.scale,o.model,s)})},r.prototype.convertToPixel=function(e,t,i){return console.warn("Not implemented."),null},r.prototype.convertFromPixel=function(e,t,i){return console.warn("Not implemented."),null},r.prototype.containPoint=function(e){return console.warn("Not implemented."),!1},r.create=function(e,t){var i=[];return e.eachComponent("radar",function(n){var a=new r(n,e,t);i.push(a),n.coordinateSystem=a}),e.eachSeriesByType("radar",function(n){n.get("coordinateSystem")==="radar"&&(n.coordinateSystem=i[n.get("radarIndex")||0])}),i},r.dimensions=[],r}();function h0e(r){r.registerCoordinateSystem("radar",c0e),r.registerComponentModel(s0e),r.registerComponentView(l0e),r.registerVisual({seriesType:"radar",reset:function(e){var t=e.getData();t.each(function(i){t.setItemVisual(i,"legendIcon","roundRect")}),t.setVisual("legendIcon","roundRect")}})}function f0e(r){Ye(h0e),r.registerChartView(n0e),r.registerSeriesModel(a0e),r.registerLayout(r0e),r.registerProcessor(Mg("radar")),r.registerPreprocessor(i0e)}var TN="\0_ec_interaction_mutex";function d0e(r,e,t){var i=OE(r);i[e]=t}function p0e(r,e,t){var i=OE(r),n=i[e];n===t&&(i[e]=null)}function xN(r,e){return!!OE(r)[e]}function OE(r){return r[TN]||(r[TN]={})}La({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},tr);var kg=function(r){j(e,r);function e(t){var i=r.call(this)||this;i._zr=t;var n=ge(i._mousedownHandler,i),a=ge(i._mousemoveHandler,i),s=ge(i._mouseupHandler,i),o=ge(i._mousewheelHandler,i),l=ge(i._pinchHandler,i);return i.enable=function(u,c){this.disable(),this._opt=Ce(Ee(c)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),u==null&&(u=!0),(u===!0||u==="move"||u==="pan")&&(t.on("mousedown",n),t.on("mousemove",a),t.on("mouseup",s)),(u===!0||u==="scale"||u==="zoom")&&(t.on("mousewheel",o),t.on("pinch",l))},i.disable=function(){t.off("mousedown",n),t.off("mousemove",a),t.off("mouseup",s),t.off("mousewheel",o),t.off("pinch",l)},i}return e.prototype.isDragging=function(){return this._dragging},e.prototype.isPinching=function(){return this._pinching},e.prototype.setPointerChecker=function(t){this.pointerChecker=t},e.prototype.dispose=function(){this.disable()},e.prototype._mousedownHandler=function(t){if(!JL(t)){for(var i=t.target;i;){if(i.draggable)return;i=i.__hostTarget||i.parent}var n=t.offsetX,a=t.offsetY;this.pointerChecker&&this.pointerChecker(t,n,a)&&(this._x=n,this._y=a,this._dragging=!0)}},e.prototype._mousemoveHandler=function(t){if(!(!this._dragging||!Wy("moveOnMouseMove",t,this._opt)||t.gestureEvent==="pinch"||xN(this._zr,"globalPan"))){var i=t.offsetX,n=t.offsetY,a=this._x,s=this._y,o=i-a,l=n-s;this._x=i,this._y=n,this._opt.preventDefaultMouseMove&&Qs(t.event),Bq(this,"pan","moveOnMouseMove",t,{dx:o,dy:l,oldX:a,oldY:s,newX:i,newY:n,isAvailableBehavior:null})}},e.prototype._mouseupHandler=function(t){JL(t)||(this._dragging=!1)},e.prototype._mousewheelHandler=function(t){var i=Wy("zoomOnMouseWheel",t,this._opt),n=Wy("moveOnMouseWheel",t,this._opt),a=t.wheelDelta,s=Math.abs(a),o=t.offsetX,l=t.offsetY;if(!(a===0||!i&&!n)){if(i){var u=s>3?1.4:s>1?1.2:1.1,c=a>0?u:1/u;BT(this,"zoom","zoomOnMouseWheel",t,{scale:c,originX:o,originY:l,isAvailableBehavior:null})}if(n){var h=Math.abs(a),d=(a>0?1:-1)*(h>3?.4:h>1?.15:.05);BT(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:d,originX:o,originY:l,isAvailableBehavior:null})}}},e.prototype._pinchHandler=function(t){if(!xN(this._zr,"globalPan")){var i=t.pinchScale>1?1.1:1/1.1;BT(this,"zoom",null,t,{scale:i,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})}},e}(ta);function BT(r,e,t,i,n){r.pointerChecker&&r.pointerChecker(i,n.originX,n.originY)&&(Qs(i.event),Bq(r,e,t,i,n))}function Bq(r,e,t,i,n){n.isAvailableBehavior=ge(Wy,null,t,i),r.trigger(e,n)}function Wy(r,e,t){var i=t[r];return!r||i&&(!de(i)||e.event[i+"Key"])}function NE(r,e,t){var i=r.target;i.x+=e,i.y+=t,i.dirty()}function BE(r,e,t,i){var n=r.target,a=r.zoomLimit,s=r.zoom=r.zoom||1;if(s*=e,a){var o=a.min||0,l=a.max||1/0;s=Math.max(Math.min(l,s),o)}var u=s/r.zoom;r.zoom=s,n.x-=(t-n.x)*(u-1),n.y-=(i-n.y)*(u-1),n.scaleX*=u,n.scaleY*=u,n.dirty()}var v0e={axisPointer:1,tooltip:1,brush:1};function J1(r,e,t){var i=e.getComponentByElement(r.topTarget),n=i&&i.coordinateSystem;return i&&i!==t&&!v0e.hasOwnProperty(i.mainType)&&n&&n.model!==t}function Fq(r){if(de(r)){var e=new DOMParser;r=e.parseFromString(r,"text/xml")}var t=r;for(t.nodeType===9&&(t=t.firstChild);t.nodeName.toLowerCase()!=="svg"||t.nodeType!==1;)t=t.nextSibling;return t}var FT,m_={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-anchor":"textAlign",visibility:"visibility",display:"display"},wN=rt(m_),y_={"alignment-baseline":"textBaseline","stop-color":"stopColor"},CN=rt(y_),g0e=function(){function r(){this._defs={},this._root=null}return r.prototype.parse=function(e,t){t=t||{};var i=Fq(e);this._defsUsePending=[];var n=new Le;this._root=n;var a=[],s=i.getAttribute("viewBox")||"",o=parseFloat(i.getAttribute("width")||t.width),l=parseFloat(i.getAttribute("height")||t.height);isNaN(o)&&(o=null),isNaN(l)&&(l=null),un(i,n,null,!0,!1);for(var u=i.firstChild;u;)this._parseNode(u,n,a,null,!1,!1),u=u.nextSibling;_0e(this._defs,this._defsUsePending),this._defsUsePending=[];var c,h;if(s){var d=eb(s);d.length>=4&&(c={x:parseFloat(d[0]||0),y:parseFloat(d[1]||0),width:parseFloat(d[2]),height:parseFloat(d[3])})}if(c&&o!=null&&l!=null&&(h=Vq(c,{x:0,y:0,width:o,height:l}),!t.ignoreViewBox)){var f=n;n=new Le,n.add(f),f.scaleX=f.scaleY=h.scale,f.x=h.x,f.y=h.y}return!t.ignoreRootClip&&o!=null&&l!=null&&n.setClipPath(new at({shape:{x:0,y:0,width:o,height:l}})),{root:n,width:o,height:l,viewBoxRect:c,viewBoxTransform:h,named:a}},r.prototype._parseNode=function(e,t,i,n,a,s){var o=e.nodeName.toLowerCase(),l,u=n;if(o==="defs"&&(a=!0),o==="text"&&(s=!0),o==="defs"||o==="switch")l=t;else{if(!a){var c=FT[o];if(c&&ye(FT,o)){l=c.call(this,e,t);var h=e.getAttribute("name");if(h){var d={name:h,namedFrom:null,svgNodeTagLower:o,el:l};i.push(d),o==="g"&&(u=d)}else n&&i.push({name:n.name,namedFrom:n,svgNodeTagLower:o,el:l});t.add(l)}}var f=AN[o];if(f&&ye(AN,o)){var p=f.call(this,e),v=e.getAttribute("id");v&&(this._defs[v]=p)}}if(l&&l.isGroup)for(var g=e.firstChild;g;)g.nodeType===1?this._parseNode(g,l,i,u,a,s):g.nodeType===3&&s&&this._parseText(g,l),g=g.nextSibling},r.prototype._parseText=function(e,t){var i=new yf({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});kn(t,i),un(e,i,this._defsUsePending,!1,!1),m0e(i,t);var n=i.style,a=n.fontSize;a&&a<9&&(n.fontSize=9,i.scaleX*=a/9,i.scaleY*=a/9);var s=(n.fontSize||n.fontFamily)&&[n.fontStyle,n.fontWeight,(n.fontSize||12)+"px",n.fontFamily||"sans-serif"].join(" ");n.font=s;var o=i.getBoundingRect();return this._textX+=o.width,t.add(i),i},r.internalField=function(){FT={g:function(e,t){var i=new Le;return kn(t,i),un(e,i,this._defsUsePending,!1,!1),i},rect:function(e,t){var i=new at;return kn(t,i),un(e,i,this._defsUsePending,!1,!1),i.setShape({x:parseFloat(e.getAttribute("x")||"0"),y:parseFloat(e.getAttribute("y")||"0"),width:parseFloat(e.getAttribute("width")||"0"),height:parseFloat(e.getAttribute("height")||"0")}),i.silent=!0,i},circle:function(e,t){var i=new ms;return kn(t,i),un(e,i,this._defsUsePending,!1,!1),i.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),r:parseFloat(e.getAttribute("r")||"0")}),i.silent=!0,i},line:function(e,t){var i=new Ar;return kn(t,i),un(e,i,this._defsUsePending,!1,!1),i.setShape({x1:parseFloat(e.getAttribute("x1")||"0"),y1:parseFloat(e.getAttribute("y1")||"0"),x2:parseFloat(e.getAttribute("x2")||"0"),y2:parseFloat(e.getAttribute("y2")||"0")}),i.silent=!0,i},ellipse:function(e,t){var i=new bg;return kn(t,i),un(e,i,this._defsUsePending,!1,!1),i.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),rx:parseFloat(e.getAttribute("rx")||"0"),ry:parseFloat(e.getAttribute("ry")||"0")}),i.silent=!0,i},polygon:function(e,t){var i=e.getAttribute("points"),n;i&&(n=IN(i));var a=new pi({shape:{points:n||[]},silent:!0});return kn(t,a),un(e,a,this._defsUsePending,!1,!1),a},polyline:function(e,t){var i=e.getAttribute("points"),n;i&&(n=IN(i));var a=new mi({shape:{points:n||[]},silent:!0});return kn(t,a),un(e,a,this._defsUsePending,!1,!1),a},image:function(e,t){var i=new Ur;return kn(t,i),un(e,i,this._defsUsePending,!1,!1),i.setStyle({image:e.getAttribute("xlink:href")||e.getAttribute("href"),x:+e.getAttribute("x"),y:+e.getAttribute("y"),width:+e.getAttribute("width"),height:+e.getAttribute("height")}),i.silent=!0,i},text:function(e,t){var i=e.getAttribute("x")||"0",n=e.getAttribute("y")||"0",a=e.getAttribute("dx")||"0",s=e.getAttribute("dy")||"0";this._textX=parseFloat(i)+parseFloat(a),this._textY=parseFloat(n)+parseFloat(s);var o=new Le;return kn(t,o),un(e,o,this._defsUsePending,!1,!0),o},tspan:function(e,t){var i=e.getAttribute("x"),n=e.getAttribute("y");i!=null&&(this._textX=parseFloat(i)),n!=null&&(this._textY=parseFloat(n));var a=e.getAttribute("dx")||"0",s=e.getAttribute("dy")||"0",o=new Le;return kn(t,o),un(e,o,this._defsUsePending,!1,!0),this._textX+=parseFloat(a),this._textY+=parseFloat(s),o},path:function(e,t){var i=e.getAttribute("d")||"",n=IH(i);return kn(t,n),un(e,n,this._defsUsePending,!1,!1),n.silent=!0,n}}}(),r}(),AN={lineargradient:function(r){var e=parseInt(r.getAttribute("x1")||"0",10),t=parseInt(r.getAttribute("y1")||"0",10),i=parseInt(r.getAttribute("x2")||"10",10),n=parseInt(r.getAttribute("y2")||"0",10),a=new Gf(e,t,i,n);return DN(r,a),EN(r,a),a},radialgradient:function(r){var e=parseInt(r.getAttribute("cx")||"0",10),t=parseInt(r.getAttribute("cy")||"0",10),i=parseInt(r.getAttribute("r")||"0",10),n=new OD(e,t,i);return DN(r,n),EN(r,n),n}};function DN(r,e){var t=r.getAttribute("gradientUnits");t==="userSpaceOnUse"&&(e.global=!0)}function EN(r,e){for(var t=r.firstChild;t;){if(t.nodeType===1&&t.nodeName.toLocaleLowerCase()==="stop"){var i=t.getAttribute("offset"),n=void 0;i&&i.indexOf("%")>0?n=parseInt(i,10)/100:i?n=parseFloat(i):n=0;var a={};Uq(t,a,a);var s=a.stopColor||t.getAttribute("stop-color")||"#000000";e.colorStops.push({offset:n,color:s})}t=t.nextSibling}}function kn(r,e){r&&r.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),Ce(e.__inheritedStyle,r.__inheritedStyle))}function IN(r){for(var e=eb(r),t=[],i=0;i<e.length;i+=2){var n=parseFloat(e[i]),a=parseFloat(e[i+1]);t.push([n,a])}return t}function un(r,e,t,i,n){var a=e,s=a.__inheritedStyle=a.__inheritedStyle||{},o={};r.nodeType===1&&(T0e(r,e),Uq(r,s,o),i||x0e(r,s,o)),a.style=a.style||{},s.fill!=null&&(a.style.fill=PN(a,"fill",s.fill,t)),s.stroke!=null&&(a.style.stroke=PN(a,"stroke",s.stroke,t)),R(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(l){s[l]!=null&&(a.style[l]=parseFloat(s[l]))}),R(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign"],function(l){s[l]!=null&&(a.style[l]=s[l])}),n&&(a.__selfStyle=o),s.lineDash&&(a.style.lineDash=ae(eb(s.lineDash),function(l){return parseFloat(l)})),(s.visibility==="hidden"||s.visibility==="collapse")&&(a.invisible=!0),s.display==="none"&&(a.ignore=!0)}function m0e(r,e){var t=e.__selfStyle;if(t){var i=t.textBaseline,n=i;!i||i==="auto"||i==="baseline"?n="alphabetic":i==="before-edge"||i==="text-before-edge"?n="top":i==="after-edge"||i==="text-after-edge"?n="bottom":(i==="central"||i==="mathematical")&&(n="middle"),r.style.textBaseline=n}var a=e.__inheritedStyle;if(a){var s=a.textAlign,o=s;s&&(s==="middle"&&(o="center"),r.style.textAlign=o)}}var y0e=/^url\(\s*#(.*?)\)/;function PN(r,e,t,i){var n=t&&t.match(y0e);if(n){var a=qn(n[1]);i.push([r,e,a]);return}return t==="none"&&(t=null),t}function _0e(r,e){for(var t=0;t<e.length;t++){var i=e[t];i[0].style[i[1]]=r[i[2]]}}var b0e=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function eb(r){return r.match(b0e)||[]}var S0e=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g,UT=Math.PI/180;function T0e(r,e){var t=r.getAttribute("transform");if(t){t=t.replace(/,/g," ");var i=[],n=null;t.replace(S0e,function(h,d,f){return i.push(d,f),""});for(var a=i.length-1;a>0;a-=2){var s=i[a],o=i[a-1],l=eb(s);switch(n=n||Ji(),o){case"translate":Da(n,n,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":T1(n,n,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":vl(n,n,-parseFloat(l[0])*UT,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*UT);os(n,[1,0,u,1,0,0],n);break;case"skewY":var c=Math.tan(parseFloat(l[0])*UT);os(n,[1,c,0,1,0,0],n);break;case"matrix":n[0]=parseFloat(l[0]),n[1]=parseFloat(l[1]),n[2]=parseFloat(l[2]),n[3]=parseFloat(l[3]),n[4]=parseFloat(l[4]),n[5]=parseFloat(l[5]);break}}e.setLocalTransform(n)}}var MN=/([^\s:;]+)\s*:\s*([^:;]+)/g;function Uq(r,e,t){var i=r.getAttribute("style");if(i){MN.lastIndex=0;for(var n;(n=MN.exec(i))!=null;){var a=n[1],s=ye(m_,a)?m_[a]:null;s&&(e[s]=n[2]);var o=ye(y_,a)?y_[a]:null;o&&(t[o]=n[2])}}}function x0e(r,e,t){for(var i=0;i<wN.length;i++){var n=wN[i],a=r.getAttribute(n);a!=null&&(e[m_[n]]=a)}for(var i=0;i<CN.length;i++){var n=CN[i],a=r.getAttribute(n);a!=null&&(t[y_[n]]=a)}}function Vq(r,e){var t=e.width/r.width,i=e.height/r.height,n=Math.min(t,i);return{scale:n,x:-(r.x+r.width/2)*n+(e.x+e.width/2),y:-(r.y+r.height/2)*n+(e.y+e.height/2)}}function w0e(r,e){var t=new g0e;return t.parse(r,e)}var C0e=be(["rect","circle","line","ellipse","polygon","polyline","path","text","tspan","g"]),A0e=function(){function r(e,t){this.type="geoSVG",this._usedGraphicMap=be(),this._freedGraphics=[],this._mapName=e,this._parsedXML=Fq(t)}return r.prototype.load=function(){var e=this._firstGraphic;if(!e){e=this._firstGraphic=this._buildGraphic(this._parsedXML),this._freedGraphics.push(e),this._boundingRect=this._firstGraphic.boundingRect.clone();var t=E0e(e.named),i=t.regions,n=t.regionsMap;this._regions=i,this._regionsMap=n}return{boundingRect:this._boundingRect,regions:this._regions,regionsMap:this._regionsMap}},r.prototype._buildGraphic=function(e){var t,i;try{t=e&&w0e(e,{ignoreViewBox:!0,ignoreRootClip:!0})||{},i=t.root,fi(i!=null)}catch(g){throw new Error(`Invalid svg format
|
||
`+g.message)}var n=new Le;n.add(i),n.isGeoSVGGraphicRoot=!0;var a=t.width,s=t.height,o=t.viewBoxRect,l=this._boundingRect;if(!l){var u=void 0,c=void 0,h=void 0,d=void 0;if(a!=null?(u=0,h=a):o&&(u=o.x,h=o.width),s!=null?(c=0,d=s):o&&(c=o.y,d=o.height),u==null||c==null){var f=i.getBoundingRect();u==null&&(u=f.x,h=f.width),c==null&&(c=f.y,d=f.height)}l=this._boundingRect=new We(u,c,h,d)}if(o){var p=Vq(o,l);i.scaleX=i.scaleY=p.scale,i.x=p.x,i.y=p.y}n.setClipPath(new at({shape:l.plain()}));var v=[];return R(t.named,function(g){C0e.get(g.svgNodeTagLower)!=null&&(v.push(g),D0e(g.el))}),{root:n,boundingRect:l,named:v}},r.prototype.useGraphic=function(e){var t=this._usedGraphicMap,i=t.get(e);return i||(i=this._freedGraphics.pop()||this._buildGraphic(this._parsedXML),t.set(e,i),i)},r.prototype.freeGraphic=function(e){var t=this._usedGraphicMap,i=t.get(e);i&&(t.removeKey(e),this._freedGraphics.push(i))},r}();function D0e(r){r.silent=!1,r.isGroup&&r.traverse(function(e){e.silent=!1})}function E0e(r){var e=[],t=be();return R(r,function(i){if(i.namedFrom==null){var n=new pge(i.name,i.el);e.push(n),t.set(i.name,n)}}),{regions:e,regionsMap:t}}var Z2=[126,25],LN="南海诸岛",ou=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]];for(var iu=0;iu<ou.length;iu++)for(var eh=0;eh<ou[iu].length;eh++)ou[iu][eh][0]/=10.5,ou[iu][eh][1]/=-10.5/.75,ou[iu][eh][0]+=Z2[0],ou[iu][eh][1]+=Z2[1];function I0e(r,e){if(r==="china"){for(var t=0;t<e.length;t++)if(e[t].name===LN)return;e.push(new NW(LN,ae(ou,function(i){return{type:"polygon",exterior:i}}),Z2))}}var P0e={南海诸岛:[32,80],广东:[0,-10],香港:[10,5],澳门:[-10,10],天津:[5,5]};function M0e(r,e){if(r==="china"){var t=P0e[e.name];if(t){var i=e.getCenter();i[0]+=t[0]/10.5,i[1]+=-t[1]/(10.5/.75),e.setCenter(i)}}}var L0e=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];function k0e(r,e){r==="china"&&e.name==="台湾"&&e.geometries.push({type:"polygon",exterior:L0e[0]})}var R0e="name",O0e=function(){function r(e,t,i){this.type="geoJSON",this._parsedMap=be(),this._mapName=e,this._specialAreas=i,this._geoJSON=B0e(t)}return r.prototype.load=function(e,t){t=t||R0e;var i=this._parsedMap.get(t);if(!i){var n=this._parseToRegions(t);i=this._parsedMap.set(t,{regions:n,boundingRect:N0e(n)})}var a=be(),s=[];return R(i.regions,function(o){var l=o.name;e&&ye(e,l)&&(o=o.cloneShallow(l=e[l])),s.push(o),a.set(l,o)}),{regions:s,boundingRect:i.boundingRect||new We(0,0,0,0),regionsMap:a}},r.prototype._parseToRegions=function(e){var t=this._mapName,i=this._geoJSON,n;try{n=i?z2(i,e):[]}catch(a){throw new Error(`Invalid geoJson format
|
||
`+a.message)}return I0e(t,n),R(n,function(a){var s=a.name;M0e(t,a),k0e(t,a);var o=this._specialAreas&&this._specialAreas[s];o&&a.transformTo(o.left,o.top,o.width,o.height)},this),n},r.prototype.getMapForUser=function(){return{geoJson:this._geoJSON,geoJSON:this._geoJSON,specialAreas:this._specialAreas}},r}();function N0e(r){for(var e,t=0;t<r.length;t++){var i=r[t].getBoundingRect();e=e||i.clone(),e.union(i)}return e}function B0e(r){return de(r)?typeof JSON<"u"&&JSON.parse?JSON.parse(r):new Function("return ("+r+");")():r}var jd=be();const no={registerMap:function(r,e,t){if(e.svg){var i=new A0e(r,e.svg);jd.set(r,i)}else{var n=e.geoJson||e.geoJSON;n&&!e.features?t=e.specialAreas:n=e;var i=new O0e(r,n,t);jd.set(r,i)}},getGeoResource:function(r){return jd.get(r)},getMapForUser:function(r){var e=jd.get(r);return e&&e.type==="geoJSON"&&e.getMapForUser()},load:function(r,e,t){var i=jd.get(r);if(i)return i.load(e,t)}};var FE=["rect","circle","line","ellipse","polygon","polyline","path"],F0e=be(FE),U0e=be(FE.concat(["g"])),V0e=be(FE.concat(["g"])),zq=lt();function ay(r){var e=r.getItemStyle(),t=r.get("areaColor");return t!=null&&(e.fill=t),e}function kN(r){var e=r.style;e&&(e.stroke=e.stroke||e.fill,e.fill=null)}var Gq=function(){function r(e){var t=new Le;this.uid=jf("ec_map_draw"),this._controller=new kg(e.getZr()),this._controllerHost={target:t},this.group=t,t.add(this._regionsGroup=new Le),t.add(this._svgGroup=new Le)}return r.prototype.draw=function(e,t,i,n,a){var s=e.mainType==="geo",o=e.getData&&e.getData();s&&t.eachComponent({mainType:"series",subType:"map"},function(m){!o&&m.getHostGeoModel()===e&&(o=m.getData())});var l=e.coordinateSystem,u=this._regionsGroup,c=this.group,h=l.getTransformInfo(),d=h.raw,f=h.roam,p=!u.childAt(0)||a;p?(c.x=f.x,c.y=f.y,c.scaleX=f.scaleX,c.scaleY=f.scaleY,c.dirty()):ct(c,f,e);var v=o&&o.getVisual("visualMeta")&&o.getVisual("visualMeta").length>0,g={api:i,geo:l,mapOrGeoModel:e,data:o,isVisualEncodedByVisualMap:v,isGeo:s,transformInfoRaw:d};l.resourceType==="geoJSON"?this._buildGeoJSON(g):l.resourceType==="geoSVG"&&this._buildSVG(g),this._updateController(e,t,i),this._updateMapSelectHandler(e,u,i,n)},r.prototype._buildGeoJSON=function(e){var t=this._regionsGroupByName=be(),i=be(),n=this._regionsGroup,a=e.transformInfoRaw,s=e.mapOrGeoModel,o=e.data,l=e.geo.projection,u=l&&l.stream;function c(f,p){return p&&(f=p(f)),f&&[f[0]*a.scaleX+a.x,f[1]*a.scaleY+a.y]}function h(f){for(var p=[],v=!u&&l&&l.project,g=0;g<f.length;++g){var m=c(f[g],v);m&&p.push(m)}return p}function d(f){return{shape:{points:h(f)}}}n.removeAll(),R(e.geo.regions,function(f){var p=f.name,v=t.get(p),g=i.get(p)||{},m=g.dataIdx,y=g.regionModel;v||(v=t.set(p,new Le),n.add(v),m=o?o.indexOfName(p):null,y=e.isGeo?s.getRegionModel(p):o?o.getItemModel(m):null,i.set(p,{dataIdx:m,regionModel:y}));var _=[],b=[];R(f.geometries,function(C){if(C.type==="polygon"){var D=[C.exterior].concat(C.interiors||[]);u&&(D=UN(D,u)),R(D,function(M){_.push(new pi(d(M)))})}else{var I=C.points;u&&(I=UN(I,u,!0)),R(I,function(M){b.push(new mi(d(M)))})}});var T=c(f.getCenter(),l&&l.project);function x(C,D){if(C.length){var I=new k1({culling:!0,segmentIgnoreThreshold:1,shape:{paths:C}});v.add(I),RN(e,I,m,y),ON(e,I,p,y,s,m,T),D&&(kN(I),R(I.states,kN))}}x(_),x(b,!0)}),t.each(function(f,p){var v=i.get(p),g=v.dataIdx,m=v.regionModel;NN(e,f,p,m,s,g),BN(e,f,p,m,s),FN(e,f,p,m,s)},this)},r.prototype._buildSVG=function(e){var t=e.geo.map,i=e.transformInfoRaw;this._svgGroup.x=i.x,this._svgGroup.y=i.y,this._svgGroup.scaleX=i.scaleX,this._svgGroup.scaleY=i.scaleY,this._svgResourceChanged(t)&&(this._freeSVG(),this._useSVG(t));var n=this._svgDispatcherMap=be(),a=!1;R(this._svgGraphicRecord.named,function(s){var o=s.name,l=e.mapOrGeoModel,u=e.data,c=s.svgNodeTagLower,h=s.el,d=u?u.indexOfName(o):null,f=l.getRegionModel(o);if(F0e.get(c)!=null&&h instanceof Jn&&RN(e,h,d,f),h instanceof Jn&&(h.culling=!0),h.z2EmphasisLift=0,!s.namedFrom&&(V0e.get(c)!=null&&ON(e,h,o,f,l,d,null),NN(e,h,o,f,l,d),BN(e,h,o,f,l),U0e.get(c)!=null)){var p=FN(e,h,o,f,l);p==="self"&&(a=!0);var v=n.get(o)||n.set(o,[]);v.push(h)}},this),this._enableBlurEntireSVG(a,e)},r.prototype._enableBlurEntireSVG=function(e,t){if(e&&t.isGeo){var i=t.mapOrGeoModel.getModel(["blur","itemStyle"]).getItemStyle(),n=i.opacity;this._svgGraphicRecord.root.traverse(function(a){if(!a.isGroup){lc(a);var s=a.ensureState("blur").style||{};s.opacity==null&&n!=null&&(s.opacity=n),a.ensureState("emphasis")}})}},r.prototype.remove=function(){this._regionsGroup.removeAll(),this._regionsGroupByName=null,this._svgGroup.removeAll(),this._freeSVG(),this._controller.dispose(),this._controllerHost=null},r.prototype.findHighDownDispatchers=function(e,t){if(e==null)return[];var i=t.coordinateSystem;if(i.resourceType==="geoJSON"){var n=this._regionsGroupByName;if(n){var a=n.get(e);return a?[a]:[]}}else if(i.resourceType==="geoSVG")return this._svgDispatcherMap&&this._svgDispatcherMap.get(e)||[]},r.prototype._svgResourceChanged=function(e){return this._svgMapName!==e},r.prototype._useSVG=function(e){var t=no.getGeoResource(e);if(t&&t.type==="geoSVG"){var i=t.useGraphic(this.uid);this._svgGroup.add(i.root),this._svgGraphicRecord=i,this._svgMapName=e}},r.prototype._freeSVG=function(){var e=this._svgMapName;if(e!=null){var t=no.getGeoResource(e);t&&t.type==="geoSVG"&&t.freeGraphic(this.uid),this._svgGraphicRecord=null,this._svgDispatcherMap=null,this._svgGroup.removeAll(),this._svgMapName=null}},r.prototype._updateController=function(e,t,i){var n=e.coordinateSystem,a=this._controller,s=this._controllerHost;s.zoomLimit=e.get("scaleLimit"),s.zoom=n.getZoom(),a.enable(e.get("roam")||!1);var o=e.mainType;function l(){var u={type:"geoRoam",componentType:o};return u[o+"Id"]=e.id,u}a.off("pan").on("pan",function(u){this._mouseDownFlag=!1,NE(s,u.dx,u.dy),i.dispatchAction(Q(l(),{dx:u.dx,dy:u.dy,animation:{duration:0}}))},this),a.off("zoom").on("zoom",function(u){this._mouseDownFlag=!1,BE(s,u.scale,u.originX,u.originY),i.dispatchAction(Q(l(),{totalZoom:s.zoom,zoom:u.scale,originX:u.originX,originY:u.originY,animation:{duration:0}}))},this),a.setPointerChecker(function(u,c,h){return n.containPoint([c,h])&&!J1(u,i,e)})},r.prototype.resetForLabelLayout=function(){this.group.traverse(function(e){var t=e.getTextContent();t&&(t.ignore=zq(t).ignore)})},r.prototype._updateMapSelectHandler=function(e,t,i,n){var a=this;t.off("mousedown"),t.off("click"),e.get("selectedMode")&&(t.on("mousedown",function(){a._mouseDownFlag=!0}),t.on("click",function(s){a._mouseDownFlag&&(a._mouseDownFlag=!1)}))},r}();function RN(r,e,t,i){var n=i.getModel("itemStyle"),a=i.getModel(["emphasis","itemStyle"]),s=i.getModel(["blur","itemStyle"]),o=i.getModel(["select","itemStyle"]),l=ay(n),u=ay(a),c=ay(o),h=ay(s),d=r.data;if(d){var f=d.getItemVisual(t,"style"),p=d.getItemVisual(t,"decal");r.isVisualEncodedByVisualMap&&f.fill&&(l.fill=f.fill),p&&(l.decal=Sf(p,r.api))}e.setStyle(l),e.style.strokeNoScale=!0,e.ensureState("emphasis").style=u,e.ensureState("select").style=c,e.ensureState("blur").style=h,lc(e)}function ON(r,e,t,i,n,a,s){var o=r.data,l=r.isGeo,u=o&&isNaN(o.get(o.mapDimension("value"),a)),c=o&&o.getItemLayout(a);if(l||u||c&&c.showLabel){var h=l?t:a,d=void 0;(!o||a>=0)&&(d=n);var f=s?{normal:{align:"center",verticalAlign:"middle"}}:null;ti(e,Br(i),{labelFetcher:d,labelDataIndex:h,defaultText:t},f);var p=e.getTextContent();if(p&&(zq(p).ignore=p.ignore,e.textConfig&&s)){var v=e.getBoundingRect().clone();e.textConfig.layoutRect=v,e.textConfig.position=[(s[0]-v.x)/v.width*100+"%",(s[1]-v.y)/v.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function NN(r,e,t,i,n,a){r.data?r.data.setItemGraphicEl(a,e):ke(e).eventData={componentType:"geo",componentIndex:n.componentIndex,geoIndex:n.componentIndex,name:t,region:i&&i.option||{}}}function BN(r,e,t,i,n){r.data||Wf({el:e,componentModel:n,itemName:t,itemTooltipOption:i.get("tooltip")})}function FN(r,e,t,i,n){e.highDownSilentOnTouch=!!n.get("selectedMode");var a=i.getModel("emphasis"),s=a.get("focus");return Kt(e,s,a.get("blurScope"),a.get("disabled")),r.isGeo&&Che(e,n,t),s}function UN(r,e,t){var i=[],n;function a(){n=[]}function s(){n.length&&(i.push(n),n=[])}var o=e({polygonStart:a,polygonEnd:s,lineStart:a,lineEnd:s,point:function(l,u){isFinite(l)&&isFinite(u)&&n.push([l,u])},sphere:function(){}});return!t&&o.polygonStart(),R(r,function(l){o.lineStart();for(var u=0;u<l.length;u++)o.point(l[u][0],l[u][1]);o.lineEnd()}),!t&&o.polygonEnd(),i}var z0e=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,n,a){if(!(a&&a.type==="mapToggleSelect"&&a.from===this.uid)){var s=this.group;if(s.removeAll(),!t.getHostGeoModel()){if(this._mapDraw&&a&&a.type==="geoRoam"&&this._mapDraw.resetForLabelLayout(),a&&a.type==="geoRoam"&&a.componentType==="series"&&a.seriesId===t.id){var o=this._mapDraw;o&&s.add(o.group)}else if(t.needsDrawMap){var o=this._mapDraw||new Gq(n);s.add(o.group),o.draw(t,i,n,this,a),this._mapDraw=o}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;t.get("showLegendSymbol")&&i.getComponent("legend")&&this._renderSymbols(t,i,n)}}},e.prototype.remove=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},e.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},e.prototype._renderSymbols=function(t,i,n){var a=t.originalData,s=this.group;a.each(a.mapDimension("value"),function(o,l){if(!isNaN(o)){var u=a.getItemLayout(l);if(!(!u||!u.point)){var c=u.point,h=u.offset,d=new ms({style:{fill:t.getData().getVisual("style").fill},shape:{cx:c[0]+h*9,cy:c[1],r:3},silent:!0,z2:8+(h?0:Uf+1)});if(!h){var f=t.mainSeries.getData(),p=a.getName(l),v=f.indexOfName(p),g=a.getItemModel(l),m=g.getModel("label"),y=f.getItemGraphicEl(v);ti(d,Br(g),{labelFetcher:{getFormattedLabel:function(_,b){return t.getFormattedLabel(v,b)}},defaultText:p}),d.disableLabelAnimation=!0,m.get("position")||d.setTextConfig({position:"bottom"}),y.onHoverStateChange=function(_){Y0(d,_)}}s.add(d)}}})},e.type="map",e}(Tt),G0e=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.needsDrawMap=!1,t.seriesGroup=[],t.getTooltipPosition=function(i){if(i!=null){var n=this.getData().getName(i),a=this.coordinateSystem,s=a.getRegion(n);return s&&a.dataToPoint(s.getCenter())}},t}return e.prototype.getInitialData=function(t){for(var i=id(this,{coordDimensions:["value"],encodeDefaulter:Be(ZD,this)}),n=be(),a=[],s=0,o=i.count();s<o;s++){var l=i.getName(s);n.set(l,!0)}var u=no.load(this.getMapType(),this.option.nameMap,this.option.nameProperty);return R(u.regions,function(c){var h=c.name;n.get(h)||a.push(h)}),i.appendValues([],a),i},e.prototype.getHostGeoModel=function(){var t=this.option.geoIndex;return t!=null?this.ecModel.getComponent("geo",t):null},e.prototype.getMapType=function(){return(this.getHostGeoModel()||this).option.map},e.prototype.getRawValue=function(t){var i=this.getData();return i.get(i.mapDimension("value"),t)},e.prototype.getRegionModel=function(t){var i=this.getData();return i.getItemModel(i.indexOfName(t))},e.prototype.formatTooltip=function(t,i,n){for(var a=this.getData(),s=this.getRawValue(t),o=a.getName(t),l=this.seriesGroup,u=[],c=0;c<l.length;c++){var h=l[c].originalData.indexOfName(o),d=a.mapDimension("value");isNaN(l[c].originalData.get(d,h))||u.push(l[c].name)}return Fr("section",{header:u.join(", "),noHeader:!u.length,blocks:[Fr("nameValue",{name:o,value:s})]})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.getLegendIcon=function(t){var i=t.icon||"roundRect",n=cr(i,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill);return n.setStyle(t.itemStyle),n.style.stroke="none",i.indexOf("empty")>-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2),n},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},e}(Ct);function H0e(r,e){var t={};return R(r,function(i){i.each(i.mapDimension("value"),function(n,a){var s="ec-"+i.getName(a);t[s]=t[s]||[],isNaN(n)||t[s].push(n)})}),r[0].map(r[0].mapDimension("value"),function(i,n){for(var a="ec-"+r[0].getName(n),s=0,o=1/0,l=-1/0,u=t[a].length,c=0;c<u;c++)o=Math.min(o,t[a][c]),l=Math.max(l,t[a][c]),s+=t[a][c];var h;return e==="min"?h=o:e==="max"?h=l:e==="average"?h=s/u:h=s,u===0?NaN:h})}function $0e(r){var e={};r.eachSeriesByType("map",function(t){var i=t.getHostGeoModel(),n=i?"o"+i.id:"i"+t.getMapType();(e[n]=e[n]||[]).push(t)}),R(e,function(t,i){for(var n=H0e(ae(t,function(s){return s.getData()}),t[0].get("mapValueCalculation")),a=0;a<t.length;a++)t[a].originalData=t[a].getData();for(var a=0;a<t.length;a++)t[a].seriesGroup=t,t[a].needsDrawMap=a===0&&!t[a].getHostGeoModel(),t[a].setData(n.cloneShallow()),t[a].mainSeries=t[0]})}function W0e(r){var e={};r.eachSeriesByType("map",function(t){var i=t.getMapType();if(!(t.getHostGeoModel()||e[i])){var n={};R(t.seriesGroup,function(s){var o=s.coordinateSystem,l=s.originalData;s.get("showLegendSymbol")&&r.getComponent("legend")&&l.each(l.mapDimension("value"),function(u,c){var h=l.getName(c),d=o.getRegion(h);if(!(!d||isNaN(u))){var f=n[h]||0,p=o.dataToPoint(d.getCenter());n[h]=f+1,l.setItemLayout(c,{point:p,offset:f})}})});var a=t.getData();a.each(function(s){var o=a.getName(s),l=a.getItemLayout(s)||{};l.showLabel=!n[o],a.setItemLayout(s,l)}),e[i]=!0}})}var VN=$r,Rg=function(r){j(e,r);function e(t){var i=r.call(this)||this;return i.type="view",i.dimensions=["x","y"],i._roamTransformable=new Vs,i._rawTransformable=new Vs,i.name=t,i}return e.prototype.setBoundingRect=function(t,i,n,a){return this._rect=new We(t,i,n,a),this._rect},e.prototype.getBoundingRect=function(){return this._rect},e.prototype.setViewRect=function(t,i,n,a){this._transformTo(t,i,n,a),this._viewRect=new We(t,i,n,a)},e.prototype._transformTo=function(t,i,n,a){var s=this.getBoundingRect(),o=this._rawTransformable;o.transform=s.calculateTransform(new We(t,i,n,a));var l=o.parent;o.parent=null,o.decomposeTransform(),o.parent=l,this._updateTransform()},e.prototype.setCenter=function(t,i){t&&(this._center=[ce(t[0],i.getWidth()),ce(t[1],i.getHeight())],this._updateCenterAndZoom())},e.prototype.setZoom=function(t){t=t||1;var i=this.zoomLimit;i&&(i.max!=null&&(t=Math.min(i.max,t)),i.min!=null&&(t=Math.max(i.min,t))),this._zoom=t,this._updateCenterAndZoom()},e.prototype.getDefaultCenter=function(){var t=this.getBoundingRect(),i=t.x+t.width/2,n=t.y+t.height/2;return[i,n]},e.prototype.getCenter=function(){return this._center||this.getDefaultCenter()},e.prototype.getZoom=function(){return this._zoom||1},e.prototype.getRoamTransform=function(){return this._roamTransformable.getLocalTransform()},e.prototype._updateCenterAndZoom=function(){var t=this._rawTransformable.getLocalTransform(),i=this._roamTransformable,n=this.getDefaultCenter(),a=this.getCenter(),s=this.getZoom();a=$r([],a,t),n=$r([],n,t),i.originX=a[0],i.originY=a[1],i.x=n[0]-a[0],i.y=n[1]-a[1],i.scaleX=i.scaleY=s,this._updateTransform()},e.prototype._updateTransform=function(){var t=this._roamTransformable,i=this._rawTransformable;i.parent=t,t.updateTransform(),i.updateTransform(),S1(this.transform||(this.transform=[]),i.transform||Ji()),this._rawTransform=i.getLocalTransform(),this.invTransform=this.invTransform||[],gc(this.invTransform,this.transform),this.decomposeTransform()},e.prototype.getTransformInfo=function(){var t=this._rawTransformable,i=this._roamTransformable,n=new Vs;return n.transform=i.transform,n.decomposeTransform(),{roam:{x:n.x,y:n.y,scaleX:n.scaleX,scaleY:n.scaleY},raw:{x:t.x,y:t.y,scaleX:t.scaleX,scaleY:t.scaleY}}},e.prototype.getViewRect=function(){return this._viewRect},e.prototype.getViewRectAfterRoam=function(){var t=this.getBoundingRect().clone();return t.applyTransform(this.transform),t},e.prototype.dataToPoint=function(t,i,n){var a=i?this._rawTransform:this.transform;return n=n||[],a?VN(n,t,a):ni(n,t)},e.prototype.pointToData=function(t){var i=this.invTransform;return i?VN([],t,i):[t[0],t[1]]},e.prototype.convertToPixel=function(t,i,n){var a=zN(i);return a===this?a.dataToPoint(n):null},e.prototype.convertFromPixel=function(t,i,n){var a=zN(i);return a===this?a.pointToData(n):null},e.prototype.containPoint=function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])},e.dimensions=["x","y"],e}(Vs);function zN(r){var e=r.seriesModel;return e?e.coordinateSystem:null}var q0e={geoJSON:{aspectScale:.75,invertLongitute:!0},geoSVG:{aspectScale:1,invertLongitute:!1}},Hq=["lng","lat"],Q2=function(r){j(e,r);function e(t,i,n){var a=r.call(this,t)||this;a.dimensions=Hq,a.type="geo",a._nameCoordMap=be(),a.map=i;var s=n.projection,o=no.load(i,n.nameMap,n.nameProperty),l=no.getGeoResource(i);a.resourceType=l?l.type:null;var u=a.regions=o.regions,c=q0e[l.type];a._regionsMap=o.regionsMap,a.regions=o.regions,a.projection=s;var h;if(s)for(var d=0;d<u.length;d++){var f=u[d].getBoundingRect(s);h=h||f.clone(),h.union(f)}else h=o.boundingRect;return a.setBoundingRect(h.x,h.y,h.width,h.height),a.aspectScale=s?1:Fe(n.aspectScale,c.aspectScale),a._invertLongitute=s?!1:c.invertLongitute,a}return e.prototype._transformTo=function(t,i,n,a){var s=this.getBoundingRect(),o=this._invertLongitute;s=s.clone(),o&&(s.y=-s.y-s.height);var l=this._rawTransformable;l.transform=s.calculateTransform(new We(t,i,n,a));var u=l.parent;l.parent=null,l.decomposeTransform(),l.parent=u,o&&(l.scaleY=-l.scaleY),this._updateTransform()},e.prototype.getRegion=function(t){return this._regionsMap.get(t)},e.prototype.getRegionByCoord=function(t){for(var i=this.regions,n=0;n<i.length;n++){var a=i[n];if(a.type==="geoJSON"&&a.contain(t))return i[n]}},e.prototype.addGeoCoord=function(t,i){this._nameCoordMap.set(t,i)},e.prototype.getGeoCoord=function(t){var i=this._regionsMap.get(t);return this._nameCoordMap.get(t)||i&&i.getCenter()},e.prototype.dataToPoint=function(t,i,n){if(de(t)&&(t=this.getGeoCoord(t)),t){var a=this.projection;return a&&(t=a.project(t)),t&&this.projectedToPoint(t,i,n)}},e.prototype.pointToData=function(t){var i=this.projection;return i&&(t=i.unproject(t)),t&&this.pointToProjected(t)},e.prototype.pointToProjected=function(t){return r.prototype.pointToData.call(this,t)},e.prototype.projectedToPoint=function(t,i,n){return r.prototype.dataToPoint.call(this,t,i,n)},e.prototype.convertToPixel=function(t,i,n){var a=GN(i);return a===this?a.dataToPoint(n):null},e.prototype.convertFromPixel=function(t,i,n){var a=GN(i);return a===this?a.pointToData(n):null},e}(Rg);ir(Q2,Rg);function GN(r){var e=r.geoModel,t=r.seriesModel;return e?e.coordinateSystem:t?t.coordinateSystem||(t.getReferringComponents("geo",_r).models[0]||{}).coordinateSystem:null}function HN(r,e){var t=r.get("boundingCoords");if(t!=null){var i=t[0],n=t[1];if(isFinite(i[0])&&isFinite(i[1])&&isFinite(n[0])&&isFinite(n[1])){var a=this.projection;if(a){var s=i[0],o=i[1],l=n[0],u=n[1];i=[1/0,1/0],n=[-1/0,-1/0];var c=function(x,C,D,I){for(var M=D-x,L=I-C,N=0;N<=100;N++){var O=N/100,B=a.project([x+M*O,C+L*O]);Fs(i,i,B),Us(n,n,B)}};c(s,o,l,o),c(l,o,l,u),c(l,u,s,u),c(s,u,l,o)}this.setBoundingRect(i[0],i[1],n[0]-i[0],n[1]-i[1])}}var h=this.getBoundingRect(),d=r.get("layoutCenter"),f=r.get("layoutSize"),p=e.getWidth(),v=e.getHeight(),g=h.width/h.height*this.aspectScale,m=!1,y,_;d&&f&&(y=[ce(d[0],p),ce(d[1],v)],_=ce(f,Math.min(p,v)),!isNaN(y[0])&&!isNaN(y[1])&&!isNaN(_)&&(m=!0));var b;if(m)b={},g>1?(b.width=_,b.height=_/g):(b.height=_,b.width=_*g),b.y=y[1]-b.height/2,b.x=y[0]-b.width/2;else{var T=r.getBoxLayoutParams();T.aspect=g,b=br(T,{width:p,height:v})}this.setViewRect(b.x,b.y,b.width,b.height),this.setCenter(r.get("center"),e),this.setZoom(r.get("zoom"))}function j0e(r,e){R(e.get("geoCoord"),function(t,i){r.addGeoCoord(i,t)})}var X0e=function(){function r(){this.dimensions=Hq}return r.prototype.create=function(e,t){var i=[];function n(s){return{nameProperty:s.get("nameProperty"),aspectScale:s.get("aspectScale"),projection:s.get("projection")}}e.eachComponent("geo",function(s,o){var l=s.get("map"),u=new Q2(l+o,l,Q({nameMap:s.get("nameMap")},n(s)));u.zoomLimit=s.get("scaleLimit"),i.push(u),s.coordinateSystem=u,u.model=s,u.resize=HN,u.resize(s,t)}),e.eachSeries(function(s){var o=s.get("coordinateSystem");if(o==="geo"){var l=s.get("geoIndex")||0;s.coordinateSystem=i[l]}});var a={};return e.eachSeriesByType("map",function(s){if(!s.getHostGeoModel()){var o=s.getMapType();a[o]=a[o]||[],a[o].push(s)}}),R(a,function(s,o){var l=ae(s,function(c){return c.get("nameMap")}),u=new Q2(o,o,Q({nameMap:y1(l)},n(s[0])));u.zoomLimit=Rr.apply(null,ae(s,function(c){return c.get("scaleLimit")})),i.push(u),u.resize=HN,u.resize(s[0],t),R(s,function(c){c.coordinateSystem=u,j0e(u,c)})}),i},r.prototype.getFilledRegions=function(e,t,i,n){for(var a=(e||[]).slice(),s=be(),o=0;o<a.length;o++)s.set(a[o].name,a[o]);var l=no.load(t,i,n);return R(l.regions,function(u){var c=u.name;!s.get(c)&&a.push({name:c})}),a},r}(),$q=new X0e,Y0e=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,i,n){var a=no.getGeoResource(t.map);if(a&&a.type==="geoJSON"){var s=t.itemStyle=t.itemStyle||{};"color"in s||(s.color="#eee")}this.mergeDefaultAndTheme(t,n),ac(t,"label",["show"])},e.prototype.optionUpdated=function(){var t=this,i=this.option;i.regions=$q.getFilledRegions(i.regions,i.map,i.nameMap,i.nameProperty);var n={};this._optionModelMap=Qn(i.regions||[],function(a,s){var o=s.name;return o&&(a.set(o,new ft(s,t,t.ecModel)),s.selected&&(n[o]=!0)),a},be()),i.selectedMap||(i.selectedMap=n)},e.prototype.getRegionModel=function(t){return this._optionModelMap.get(t)||new ft(null,this,this.ecModel)},e.prototype.getFormattedLabel=function(t,i){var n=this.getRegionModel(t),a=i==="normal"?n.get(["label","formatter"]):n.get(["emphasis","label","formatter"]),s={name:t};if(xe(a))return s.status=i,a(s);if(de(a))return a.replace("{a}",t??"")},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.select=function(t){var i=this.option,n=i.selectedMode;if(n){n!=="multiple"&&(i.selectedMap=null);var a=i.selectedMap||(i.selectedMap={});a[t]=!0}},e.prototype.unSelect=function(t){var i=this.option.selectedMap;i&&(i[t]=!1)},e.prototype.toggleSelected=function(t){this[this.isSelected(t)?"unSelect":"select"](t)},e.prototype.isSelected=function(t){var i=this.option.selectedMap;return!!(i&&i[t])},e.type="geo",e.layoutMode="box",e.defaultOption={z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},e}(Qe);function $N(r,e){return r.pointToProjected?r.pointToProjected(e):r.pointToData(e)}function UE(r,e,t,i){var n=r.getZoom(),a=r.getCenter(),s=e.zoom,o=r.projectedToPoint?r.projectedToPoint(a):r.dataToPoint(a);if(e.dx!=null&&e.dy!=null&&(o[0]-=e.dx,o[1]-=e.dy,r.setCenter($N(r,o),i)),s!=null){if(t){var l=t.min||0,u=t.max||1/0;s=Math.max(Math.min(n*s,u),l)/n}r.scaleX*=s,r.scaleY*=s;var c=(e.originX-r.x)*(s-1),h=(e.originY-r.y)*(s-1);r.x-=c,r.y-=h,r.updateTransform(),r.setCenter($N(r,o),i),r.setZoom(s*n)}return{center:r.getCenter(),zoom:r.getZoom()}}var K0e=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.focusBlurEnabled=!0,t}return e.prototype.init=function(t,i){this._api=i},e.prototype.render=function(t,i,n,a){if(this._model=t,!t.get("show")){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;return}this._mapDraw||(this._mapDraw=new Gq(n));var s=this._mapDraw;s.draw(t,i,n,this,a),s.group.on("click",this._handleRegionClick,this),s.group.silent=t.get("silent"),this.group.add(s.group),this.updateSelectStatus(t,i,n)},e.prototype._handleRegionClick=function(t){var i;Du(t.target,function(n){return(i=ke(n).eventData)!=null},!0),i&&this._api.dispatchAction({type:"geoToggleSelect",geoId:this._model.id,name:i.name})},e.prototype.updateSelectStatus=function(t,i,n){var a=this;this._mapDraw.group.traverse(function(s){var o=ke(s).eventData;if(o)return a._model.isSelected(o.name)?n.enterSelect(s):n.leaveSelect(s),!0})},e.prototype.findHighDownDispatchers=function(t){return this._mapDraw&&this._mapDraw.findHighDownDispatchers(t,this._model)},e.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove()},e.type="geo",e}(Nt);function Z0e(r,e,t){no.registerMap(r,e,t)}function Wq(r){r.registerCoordinateSystem("geo",$q),r.registerComponentModel(Y0e),r.registerComponentView(K0e),r.registerImpl("registerMap",Z0e),r.registerImpl("getMap",function(t){return no.getMapForUser(t)});function e(t,i){i.update="geo:updateSelectStatus",r.registerAction(i,function(n,a){var s={},o=[];return a.eachComponent({mainType:"geo",query:n},function(l){l[t](n.name);var u=l.coordinateSystem;R(u.regions,function(h){s[h.name]=l.isSelected(h.name)||!1});var c=[];R(s,function(h,d){s[d]&&c.push(d)}),o.push({geoIndex:l.componentIndex,name:c})}),{selected:s,allSelected:o,name:n.name}})}e("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),e("select",{type:"geoSelect",event:"geoselected"}),e("unSelect",{type:"geoUnSelect",event:"geounselected"}),r.registerAction({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(t,i,n){var a=t.componentType||"series";i.eachComponent({mainType:a,query:t},function(s){var o=s.coordinateSystem;if(o.type==="geo"){var l=UE(o,t,s.get("scaleLimit"),n);s.setCenter&&s.setCenter(l.center),s.setZoom&&s.setZoom(l.zoom),a==="series"&&R(s.seriesGroup,function(u){u.setCenter(l.center),u.setZoom(l.zoom)})}})})}function Q0e(r){Ye(Wq),r.registerChartView(z0e),r.registerSeriesModel(G0e),r.registerLayout(W0e),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,$0e),$$("map",r.registerAction)}function J0e(r){var e=r;e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var t=[e],i,n;i=t.pop();)if(n=i.children,i.isExpand&&n.length)for(var a=n.length,s=a-1;s>=0;s--){var o=n[s];o.hierNode={defaultAncestor:null,ancestor:o,prelim:0,modifier:0,change:0,shift:0,i:s,thread:null},t.push(o)}}function e_e(r,e){var t=r.isExpand?r.children:[],i=r.parentNode.children,n=r.hierNode.i?i[r.hierNode.i-1]:null;if(t.length){i_e(r);var a=(t[0].hierNode.prelim+t[t.length-1].hierNode.prelim)/2;n?(r.hierNode.prelim=n.hierNode.prelim+e(r,n),r.hierNode.modifier=r.hierNode.prelim-a):r.hierNode.prelim=a}else n&&(r.hierNode.prelim=n.hierNode.prelim+e(r,n));r.parentNode.hierNode.defaultAncestor=n_e(r,n,r.parentNode.hierNode.defaultAncestor||i[0],e)}function t_e(r){var e=r.hierNode.prelim+r.parentNode.hierNode.modifier;r.setLayout({x:e},!0),r.hierNode.modifier+=r.parentNode.hierNode.modifier}function WN(r){return arguments.length?r:o_e}function xp(r,e){return r-=Math.PI/2,{x:e*Math.cos(r),y:e*Math.sin(r)}}function r_e(r,e){return br(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function i_e(r){for(var e=r.children,t=e.length,i=0,n=0;--t>=0;){var a=e[t];a.hierNode.prelim+=i,a.hierNode.modifier+=i,n+=a.hierNode.change,i+=a.hierNode.shift+n}}function n_e(r,e,t,i){if(e){for(var n=r,a=r,s=a.parentNode.children[0],o=e,l=n.hierNode.modifier,u=a.hierNode.modifier,c=s.hierNode.modifier,h=o.hierNode.modifier;o=VT(o),a=zT(a),o&&a;){n=VT(n),s=zT(s),n.hierNode.ancestor=r;var d=o.hierNode.prelim+h-a.hierNode.prelim-u+i(o,a);d>0&&(s_e(a_e(o,r,t),r,d),u+=d,l+=d),h+=o.hierNode.modifier,u+=a.hierNode.modifier,l+=n.hierNode.modifier,c+=s.hierNode.modifier}o&&!VT(n)&&(n.hierNode.thread=o,n.hierNode.modifier+=h-l),a&&!zT(s)&&(s.hierNode.thread=a,s.hierNode.modifier+=u-c,t=r)}return t}function VT(r){var e=r.children;return e.length&&r.isExpand?e[e.length-1]:r.hierNode.thread}function zT(r){var e=r.children;return e.length&&r.isExpand?e[0]:r.hierNode.thread}function a_e(r,e,t){return r.hierNode.ancestor.parentNode===e.parentNode?r.hierNode.ancestor:t}function s_e(r,e,t){var i=t/(e.hierNode.i-r.hierNode.i);e.hierNode.change-=i,e.hierNode.shift+=t,e.hierNode.modifier+=t,e.hierNode.prelim+=t,r.hierNode.change+=i}function o_e(r,e){return r.parentNode===e.parentNode?1:2}var l_e=function(){function r(){this.parentPoint=[],this.childPoints=[]}return r}(),u_e=function(r){j(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new l_e},e.prototype.buildPath=function(t,i){var n=i.childPoints,a=n.length,s=i.parentPoint,o=n[0],l=n[a-1];if(a===1){t.moveTo(s[0],s[1]),t.lineTo(o[0],o[1]);return}var u=i.orient,c=u==="TB"||u==="BT"?0:1,h=1-c,d=ce(i.forkPosition,1),f=[];f[c]=s[c],f[h]=s[h]+(l[h]-s[h])*d,t.moveTo(s[0],s[1]),t.lineTo(f[0],f[1]),t.moveTo(o[0],o[1]),f[c]=o[c],t.lineTo(f[0],f[1]),f[c]=l[c],t.lineTo(f[0],f[1]),t.lineTo(l[0],l[1]);for(var p=1;p<a-1;p++){var v=n[p];t.moveTo(v[0],v[1]),f[c]=v[c],t.lineTo(f[0],f[1])}},e}(Je),c_e=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._mainGroup=new Le,t}return e.prototype.init=function(t,i){this._controller=new kg(i.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},e.prototype.render=function(t,i,n){var a=t.getData(),s=t.layoutInfo,o=this._mainGroup,l=t.get("layout");l==="radial"?(o.x=s.x+s.width/2,o.y=s.y+s.height/2):(o.x=s.x,o.y=s.y),this._updateViewCoordSys(t,n),this._updateController(t,i,n);var u=this._data;a.diff(u).add(function(c){qN(a,c)&&jN(a,c,null,o,t)}).update(function(c,h){var d=u.getItemGraphicEl(h);if(!qN(a,c)){d&&YN(u,h,d,o,t);return}jN(a,c,d,o,t)}).remove(function(c){var h=u.getItemGraphicEl(c);h&&YN(u,c,h,o,t)}).execute(),this._nodeScaleRatio=t.get("nodeScaleRatio"),this._updateNodeAndLinkScale(t),t.get("expandAndCollapse")===!0&&a.eachItemGraphicEl(function(c,h){c.off("click").on("click",function(){n.dispatchAction({type:"treeExpandAndCollapse",seriesId:t.id,dataIndex:h})})}),this._data=a},e.prototype._updateViewCoordSys=function(t,i){var n=t.getData(),a=[];n.each(function(h){var d=n.getItemLayout(h);d&&!isNaN(d.x)&&!isNaN(d.y)&&a.push([+d.x,+d.y])});var s=[],o=[];P1(a,s,o);var l=this._min,u=this._max;o[0]-s[0]===0&&(s[0]=l?l[0]:s[0]-1,o[0]=u?u[0]:o[0]+1),o[1]-s[1]===0&&(s[1]=l?l[1]:s[1]-1,o[1]=u?u[1]:o[1]+1);var c=t.coordinateSystem=new Rg;c.zoomLimit=t.get("scaleLimit"),c.setBoundingRect(s[0],s[1],o[0]-s[0],o[1]-s[1]),c.setCenter(t.get("center"),i),c.setZoom(t.get("zoom")),this.group.attr({x:c.x,y:c.y,scaleX:c.scaleX,scaleY:c.scaleY}),this._min=s,this._max=o},e.prototype._updateController=function(t,i,n){var a=this,s=this._controller,o=this._controllerHost,l=this.group;s.setPointerChecker(function(u,c,h){var d=l.getBoundingRect();return d.applyTransform(l.transform),d.contain(c,h)&&!J1(u,n,t)}),s.enable(t.get("roam")),o.zoomLimit=t.get("scaleLimit"),o.zoom=t.coordinateSystem.getZoom(),s.off("pan").off("zoom").on("pan",function(u){NE(o,u.dx,u.dy),n.dispatchAction({seriesId:t.id,type:"treeRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){BE(o,u.scale,u.originX,u.originY),n.dispatchAction({seriesId:t.id,type:"treeRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),a._updateNodeAndLinkScale(t),n.updateLabelLayout()})},e.prototype._updateNodeAndLinkScale=function(t){var i=t.getData(),n=this._getNodeGlobalScale(t);i.eachItemGraphicEl(function(a,s){a.setSymbolScale(n)})},e.prototype._getNodeGlobalScale=function(t){var i=t.coordinateSystem;if(i.type!=="view")return 1;var n=this._nodeScaleRatio,a=i.scaleX||1,s=i.getZoom(),o=(s-1)*n+1;return o/a},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype.remove=function(){this._mainGroup.removeAll(),this._data=null},e.type="tree",e}(Tt);function qN(r,e){var t=r.getItemLayout(e);return t&&!isNaN(t.x)&&!isNaN(t.y)}function jN(r,e,t,i,n){var a=!t,s=r.tree.getNodeByDataIndex(e),o=s.getModel(),l=s.getVisual("style").fill,u=s.isExpand===!1&&s.children.length!==0?l:"#fff",c=r.tree.root,h=s.parentNode===c?s:s.parentNode||s,d=r.getItemGraphicEl(h.dataIndex),f=h.getLayout(),p=d?{x:d.__oldX,y:d.__oldY,rawX:d.__radialOldRawX,rawY:d.__radialOldRawY}:f,v=s.getLayout();a?(t=new Dg(r,e,null,{symbolInnerColor:u,useNameLabel:!0}),t.x=p.x,t.y=p.y):t.updateData(r,e,null,{symbolInnerColor:u,useNameLabel:!0}),t.__radialOldRawX=t.__radialRawX,t.__radialOldRawY=t.__radialRawY,t.__radialRawX=v.rawX,t.__radialRawY=v.rawY,i.add(t),r.setItemGraphicEl(e,t),t.__oldX=t.x,t.__oldY=t.y,ct(t,{x:v.x,y:v.y},n);var g=t.getSymbolPath();if(n.get("layout")==="radial"){var m=c.children[0],y=m.getLayout(),_=m.children.length,b=void 0,T=void 0;if(v.x===y.x&&s.isExpand===!0&&m.children.length){var x={x:(m.children[0].getLayout().x+m.children[_-1].getLayout().x)/2,y:(m.children[0].getLayout().y+m.children[_-1].getLayout().y)/2};b=Math.atan2(x.y-y.y,x.x-y.x),b<0&&(b=Math.PI*2+b),T=x.x<y.x,T&&(b=b-Math.PI)}else b=Math.atan2(v.y-y.y,v.x-y.x),b<0&&(b=Math.PI*2+b),s.children.length===0||s.children.length!==0&&s.isExpand===!1?(T=v.x<y.x,T&&(b=b-Math.PI)):(T=v.x>y.x,T||(b=b-Math.PI));var C=T?"left":"right",D=o.getModel("label"),I=D.get("rotate"),M=I*(Math.PI/180),L=g.getTextContent();L&&(g.setTextConfig({position:D.get("position")||C,rotation:I==null?-b:M,origin:"center"}),L.setStyle("verticalAlign","middle"))}var N=o.get(["emphasis","focus"]),O=N==="relative"?xv(s.getAncestorsIndices(),s.getDescendantIndices()):N==="ancestor"?s.getAncestorsIndices():N==="descendant"?s.getDescendantIndices():null;O&&(ke(t).focus=O),h_e(n,s,c,t,p,f,v,i),t.__edge&&(t.onHoverStateChange=function(B){if(B!=="blur"){var F=s.parentNode&&r.getItemGraphicEl(s.parentNode.dataIndex);F&&F.hoverState===_g||Y0(t.__edge,B)}})}function h_e(r,e,t,i,n,a,s,o){var l=e.getModel(),u=r.get("edgeShape"),c=r.get("layout"),h=r.getOrient(),d=r.get(["lineStyle","curveness"]),f=r.get("edgeForkPosition"),p=l.getModel("lineStyle").getLineStyle(),v=i.__edge;if(u==="curve")e.parentNode&&e.parentNode!==t&&(v||(v=i.__edge=new zf({shape:J2(c,h,d,n,n)})),ct(v,{shape:J2(c,h,d,a,s)},r));else if(u==="polyline"&&c==="orthogonal"&&e!==t&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var g=e.children,m=[],y=0;y<g.length;y++){var _=g[y].getLayout();m.push([_.x,_.y])}v||(v=i.__edge=new u_e({shape:{parentPoint:[s.x,s.y],childPoints:[[s.x,s.y]],orient:h,forkPosition:f}})),ct(v,{shape:{parentPoint:[s.x,s.y],childPoints:m}},r)}v&&!(u==="polyline"&&!e.isExpand)&&(v.useStyle(Ce({strokeNoScale:!0,fill:null},p)),ei(v,l,"lineStyle"),lc(v),o.add(v))}function XN(r,e,t,i,n){var a=e.tree.root,s=qq(a,r),o=s.source,l=s.sourceLayout,u=e.getItemGraphicEl(r.dataIndex);if(u){var c=e.getItemGraphicEl(o.dataIndex),h=c.__edge,d=u.__edge||(o.isExpand===!1||o.children.length===1?h:void 0),f=i.get("edgeShape"),p=i.get("layout"),v=i.get("orient"),g=i.get(["lineStyle","curveness"]);d&&(f==="curve"?ol(d,{shape:J2(p,v,g,l,l),style:{opacity:0}},i,{cb:function(){t.remove(d)},removeOpt:n}):f==="polyline"&&i.get("layout")==="orthogonal"&&ol(d,{shape:{parentPoint:[l.x,l.y],childPoints:[[l.x,l.y]]},style:{opacity:0}},i,{cb:function(){t.remove(d)},removeOpt:n}))}}function qq(r,e){for(var t=e.parentNode===r?e:e.parentNode||e,i;i=t.getLayout(),i==null;)t=t.parentNode===r?t:t.parentNode||t;return{source:t,sourceLayout:i}}function YN(r,e,t,i,n){var a=r.tree.getNodeByDataIndex(e),s=r.tree.root,o=qq(s,a).sourceLayout,l={duration:n.get("animationDurationUpdate"),easing:n.get("animationEasingUpdate")};ol(t,{x:o.x+1,y:o.y+1},n,{cb:function(){i.remove(t),r.setItemGraphicEl(e,null)},removeOpt:l}),t.fadeOut(null,r.hostModel,{fadeLabel:!0,animation:l}),a.children.forEach(function(u){XN(u,r,i,n,l)}),XN(a,r,i,n,l)}function J2(r,e,t,i,n){var a,s,o,l,u,c,h,d;if(r==="radial"){u=i.rawX,h=i.rawY,c=n.rawX,d=n.rawY;var f=xp(u,h),p=xp(u,h+(d-h)*t),v=xp(c,d+(h-d)*t),g=xp(c,d);return{x1:f.x||0,y1:f.y||0,x2:g.x||0,y2:g.y||0,cpx1:p.x||0,cpy1:p.y||0,cpx2:v.x||0,cpy2:v.y||0}}else u=i.x,h=i.y,c=n.x,d=n.y,(e==="LR"||e==="RL")&&(a=u+(c-u)*t,s=h,o=c+(u-c)*t,l=d),(e==="TB"||e==="BT")&&(a=u,s=h+(d-h)*t,o=c,l=d+(h-d)*t);return{x1:u,y1:h,x2:c,y2:d,cpx1:a,cpy1:s,cpx2:o,cpy2:l}}var Xn=lt();function jq(r){var e=r.mainData,t=r.datas;t||(t={main:e},r.datasAttr={main:"data"}),r.datas=r.mainData=null,Xq(e,t,r),R(t,function(i){R(e.TRANSFERABLE_METHODS,function(n){i.wrapMethod(n,Be(f_e,r))})}),e.wrapMethod("cloneShallow",Be(p_e,r)),R(e.CHANGABLE_METHODS,function(i){e.wrapMethod(i,Be(d_e,r))}),fi(t[e.dataType]===e)}function f_e(r,e){if(m_e(this)){var t=Q({},Xn(this).datas);t[this.dataType]=e,Xq(e,t,r)}else VE(e,this.dataType,Xn(this).mainData,r);return e}function d_e(r,e){return r.struct&&r.struct.update(),e}function p_e(r,e){return R(Xn(e).datas,function(t,i){t!==e&&VE(t.cloneShallow(),i,e,r)}),e}function v_e(r){var e=Xn(this).mainData;return r==null||e==null?e:Xn(e).datas[r]}function g_e(){var r=Xn(this).mainData;return r==null?[{data:r}]:ae(rt(Xn(r).datas),function(e){return{type:e,data:Xn(r).datas[e]}})}function m_e(r){return Xn(r).mainData===r}function Xq(r,e,t){Xn(r).datas={},R(e,function(i,n){VE(i,n,r,t)})}function VE(r,e,t,i){Xn(t).datas[e]=r,Xn(r).mainData=t,r.dataType=e,i.struct&&(r[i.structAttr]=i.struct,i.struct[i.datasAttr[e]]=r),r.getLinkedData=v_e,r.getLinkedDataAll=g_e}var y_e=function(){function r(e,t){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=e||"",this.hostTree=t}return r.prototype.isRemoved=function(){return this.dataIndex<0},r.prototype.eachNode=function(e,t,i){xe(e)&&(i=t,t=e,e=null),e=e||{},de(e)&&(e={order:e});var n=e.order||"preorder",a=this[e.attr||"children"],s;n==="preorder"&&(s=t.call(i,this));for(var o=0;!s&&o<a.length;o++)a[o].eachNode(e,t,i);n==="postorder"&&t.call(i,this)},r.prototype.updateDepthAndHeight=function(e){var t=0;this.depth=e;for(var i=0;i<this.children.length;i++){var n=this.children[i];n.updateDepthAndHeight(e+1),n.height>t&&(t=n.height)}this.height=t+1},r.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,i=this.children,n=i.length;t<n;t++){var a=i[t].getNodeById(e);if(a)return a}},r.prototype.contains=function(e){if(e===this)return!0;for(var t=0,i=this.children,n=i.length;t<n;t++){var a=i[t].contains(e);if(a)return a}},r.prototype.getAncestors=function(e){for(var t=[],i=e?this:this.parentNode;i;)t.push(i),i=i.parentNode;return t.reverse(),t},r.prototype.getAncestorsIndices=function(){for(var e=[],t=this;t;)e.push(t.dataIndex),t=t.parentNode;return e.reverse(),e},r.prototype.getDescendantIndices=function(){var e=[];return this.eachNode(function(t){e.push(t.dataIndex)}),e},r.prototype.getValue=function(e){var t=this.hostTree.data;return t.getStore().get(t.getDimensionIndex(e||"value"),this.dataIndex)},r.prototype.setLayout=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},r.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostTree,i=t.data.getItemModel(this.dataIndex);return i.getModel(e)}},r.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},r.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},r.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},r.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},r.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},r.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t<e.length;++t)if(e[t]===this)return t;return-1}return-1},r.prototype.isAncestorOf=function(e){for(var t=e.parentNode;t;){if(t===this)return!0;t=t.parentNode}return!1},r.prototype.isDescendantOf=function(e){return e!==this&&e.isAncestorOf(this)},r}(),zE=function(){function r(e){this.type="tree",this._nodes=[],this.hostModel=e}return r.prototype.eachNode=function(e,t,i){this.root.eachNode(e,t,i)},r.prototype.getNodeByDataIndex=function(e){var t=this.data.getRawIndex(e);return this._nodes[t]},r.prototype.getNodeById=function(e){return this.root.getNodeById(e)},r.prototype.update=function(){for(var e=this.data,t=this._nodes,i=0,n=t.length;i<n;i++)t[i].dataIndex=-1;for(var i=0,n=e.count();i<n;i++)t[e.getRawIndex(i)].dataIndex=i},r.prototype.clearLayouts=function(){this.data.clearItemLayouts()},r.createTree=function(e,t,i){var n=new r(t),a=[],s=1;o(e);function o(c,h){var d=c.value;s=Math.max(s,ie(d)?d.length:1),a.push(c);var f=new y_e(Cr(c.name,""),n);h?__e(f,h):n.root=f,n._nodes.push(f);var p=c.children;if(p)for(var v=0;v<p.length;v++)o(p[v],f)}n.root.updateDepthAndHeight(0);var l=ed(a,{coordDimensions:["value"],dimensionsCount:s}).dimensions,u=new hi(l,t);return u.initData(a),i&&i(u),jq({mainData:u,struct:n,structAttr:"tree"}),n.update(),n},r}();function __e(r,e){var t=e.children;r.parentNode!==e&&(t.push(r),r.parentNode=e)}function Wv(r,e,t){if(r&&Xe(e,r.type)>=0){var i=t.getData().tree.root,n=r.targetNode;if(de(n)&&(n=i.getNodeById(n)),n&&i.contains(n))return{node:n};var a=r.targetNodeId;if(a!=null&&(n=i.getNodeById(a)))return{node:n}}}function Yq(r){for(var e=[];r;)r=r.parentNode,r&&e.push(r);return e.reverse()}function GE(r,e){var t=Yq(r);return Xe(t,e)>=0}function tb(r,e){for(var t=[];r;){var i=r.dataIndex;t.push({name:r.name,dataIndex:i,value:e.getRawValue(i)}),r=r.parentNode}return t.reverse(),t}var b_e=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.hasSymbolVisual=!0,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t){var i={name:t.name,children:t.data},n=t.leaves||{},a=new ft(n,this,this.ecModel),s=zE.createTree(i,this,o);function o(h){h.wrapMethod("getItemModel",function(d,f){var p=s.getNodeByDataIndex(f);return p&&p.children.length&&p.isExpand||(d.parentModel=a),d})}var l=0;s.eachNode("preorder",function(h){h.depth>l&&(l=h.depth)});var u=t.expandAndCollapse,c=u&&t.initialTreeDepth>=0?t.initialTreeDepth:l;return s.root.eachNode("preorder",function(h){var d=h.hostTree.data.getRawDataItem(h.dataIndex);h.isExpand=d&&d.collapsed!=null?!d.collapsed:h.depth<=c}),s.data},e.prototype.getOrient=function(){var t=this.get("orient");return t==="horizontal"?t="LR":t==="vertical"&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,i,n){for(var a=this.getData().tree,s=a.root.children[0],o=a.getNodeByDataIndex(t),l=o.getValue(),u=o.name;o&&o!==s;)u=o.parentNode.name+"."+u,o=o.parentNode;return Fr("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},e.prototype.getDataParams=function(t){var i=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return i.treeAncestors=tb(n,this),i.collapsed=!n.isExpand,i},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(Ct);function S_e(r,e,t){for(var i=[r],n=[],a;a=i.pop();)if(n.push(a),a.isExpand){var s=a.children;if(s.length)for(var o=0;o<s.length;o++)i.push(s[o])}for(;a=n.pop();)e(a,t)}function Xd(r,e){for(var t=[r],i;i=t.pop();)if(e(i),i.isExpand){var n=i.children;if(n.length)for(var a=n.length-1;a>=0;a--)t.push(n[a])}}function T_e(r,e){r.eachSeriesByType("tree",function(t){x_e(t,e)})}function x_e(r,e){var t=r_e(r,e);r.layoutInfo=t;var i=r.get("layout"),n=0,a=0,s=null;i==="radial"?(n=2*Math.PI,a=Math.min(t.height,t.width)/2,s=WN(function(_,b){return(_.parentNode===b.parentNode?1:2)/_.depth})):(n=t.width,a=t.height,s=WN());var o=r.getData().tree.root,l=o.children[0];if(l){J0e(o),S_e(l,e_e,s),o.hierNode.modifier=-l.hierNode.prelim,Xd(l,t_e);var u=l,c=l,h=l;Xd(l,function(_){var b=_.getLayout().x;b<u.getLayout().x&&(u=_),b>c.getLayout().x&&(c=_),_.depth>h.depth&&(h=_)});var d=u===c?1:s(u,c)/2,f=d-u.getLayout().x,p=0,v=0,g=0,m=0;if(i==="radial")p=n/(c.getLayout().x+d+f),v=a/(h.depth-1||1),Xd(l,function(_){g=(_.getLayout().x+f)*p,m=(_.depth-1)*v;var b=xp(g,m);_.setLayout({x:b.x,y:b.y,rawX:g,rawY:m},!0)});else{var y=r.getOrient();y==="RL"||y==="LR"?(v=a/(c.getLayout().x+d+f),p=n/(h.depth-1||1),Xd(l,function(_){m=(_.getLayout().x+f)*v,g=y==="LR"?(_.depth-1)*p:n-(_.depth-1)*p,_.setLayout({x:g,y:m},!0)})):(y==="TB"||y==="BT")&&(p=n/(c.getLayout().x+d+f),v=a/(h.depth-1||1),Xd(l,function(_){g=(_.getLayout().x+f)*p,m=y==="TB"?(_.depth-1)*v:a-(_.depth-1)*v,_.setLayout({x:g,y:m},!0)}))}}}function w_e(r){r.eachSeriesByType("tree",function(e){var t=e.getData(),i=t.tree;i.eachNode(function(n){var a=n.getModel(),s=a.getModel("itemStyle").getItemStyle(),o=t.ensureUniqueItemVisual(n.dataIndex,"style");Q(o,s)})})}function C_e(r){r.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},function(i){var n=e.dataIndex,a=i.getData().tree,s=a.getNodeByDataIndex(n);s.isExpand=!s.isExpand})}),r.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(e,t,i){t.eachComponent({mainType:"series",subType:"tree",query:e},function(n){var a=n.coordinateSystem,s=UE(a,e,void 0,i);n.setCenter&&n.setCenter(s.center),n.setZoom&&n.setZoom(s.zoom)})})}function A_e(r){r.registerChartView(c_e),r.registerSeriesModel(b_e),r.registerLayout(T_e),r.registerVisual(w_e),C_e(r)}var KN=["treemapZoomToNode","treemapRender","treemapMove"];function D_e(r){for(var e=0;e<KN.length;e++)r.registerAction({type:KN[e],update:"updateView"},tr);r.registerAction({type:"treemapRootToNode",update:"updateView"},function(t,i){i.eachComponent({mainType:"series",subType:"treemap",query:t},n);function n(a,s){var o=["treemapZoomToNode","treemapRootToNode"],l=Wv(t,o,a);if(l){var u=a.getViewRoot();u&&(t.direction=GE(u,l.node)?"rollUp":"drillDown"),a.resetViewRoot(l.node)}}})}function Kq(r){var e=r.getData(),t=e.tree,i={};t.eachNode(function(n){for(var a=n;a&&a.depth>1;)a=a.parentNode;var s=A2(r.ecModel,a.name||a.dataIndex+"",i);n.setVisual("decal",s)})}var E_e=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.preventUsingHoverLayer=!0,t}return e.prototype.getInitialData=function(t,i){var n={name:t.name,children:t.data};Zq(n);var a=t.levels||[],s=this.designatedVisualItemStyle={},o=new ft({itemStyle:s},this,i);a=t.levels=I_e(a,i);var l=ae(a||[],function(h){return new ft(h,o,i)},this),u=zE.createTree(n,this,c);function c(h){h.wrapMethod("getItemModel",function(d,f){var p=u.getNodeByDataIndex(f),v=p?l[p.depth]:null;return d.parentModel=v||o,d})}return u.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,i,n){var a=this.getData(),s=this.getRawValue(t),o=a.getName(t);return Fr("nameValue",{name:o,value:s})},e.prototype.getDataParams=function(t){var i=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return i.treeAncestors=tb(n,this),i.treePathInfo=i.treeAncestors,i},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},Q(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var i=this._idIndexMap;i||(i=this._idIndexMap=be(),this._idIndexMapCount=0);var n=i.get(t);return n==null&&i.set(t,n=this._idIndexMapCount++),n},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var i=this.getRawData().tree.root;(!t||t!==i&&!i.contains(t))&&(this._viewRoot=i)},e.prototype.enableAriaDecal=function(){Kq(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.32*.32,scaleLimit:null,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}},emphasis:{itemStyle:{color:"rgba(0,0,0,0.9)"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(Ct);function Zq(r){var e=0;R(r.children,function(i){Zq(i);var n=i.value;ie(n)&&(n=n[0]),e+=n});var t=r.value;ie(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),ie(r.value)?r.value[0]=t:r.value=t}function I_e(r,e){var t=wt(e.get("color")),i=wt(e.get(["aria","decal","decals"]));if(t){r=r||[];var n,a;R(r,function(o){var l=new ft(o),u=l.get("color"),c=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(n=!0),(l.get(["itemStyle","decal"])||c&&c!=="none")&&(a=!0)});var s=r[0]||(r[0]={});return n||(s.color=t.slice()),!a&&i&&(s.decal=i.slice()),r}}var P_e=8,ZN=8,GT=5,M_e=function(){function r(e){this.group=new Le,e.add(this.group)}return r.prototype.render=function(e,t,i,n){var a=e.getModel("breadcrumb"),s=this.group;if(s.removeAll(),!(!a.get("show")||!i)){var o=a.getModel("itemStyle"),l=a.getModel("emphasis"),u=o.getModel("textStyle"),c=l.getModel(["itemStyle","textStyle"]),h={pos:{left:a.get("left"),right:a.get("right"),top:a.get("top"),bottom:a.get("bottom")},box:{width:t.getWidth(),height:t.getHeight()},emptyItemWidth:a.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(i,h,u),this._renderContent(e,h,o,l,u,c,n),z1(s,h.pos,h.box)}},r.prototype._prepare=function(e,t,i){for(var n=e;n;n=n.parentNode){var a=Cr(n.getModel().get("name"),""),s=i.getTextRect(a),o=Math.max(s.width+P_e*2,t.emptyItemWidth);t.totalWidth+=o+ZN,t.renderList.push({node:n,text:a,width:o})}},r.prototype._renderContent=function(e,t,i,n,a,s,o){for(var l=0,u=t.emptyItemWidth,c=e.get(["breadcrumb","height"]),h=Cfe(t.pos,t.box),d=t.totalWidth,f=t.renderList,p=n.getModel("itemStyle").getItemStyle(),v=f.length-1;v>=0;v--){var g=f[v],m=g.node,y=g.width,_=g.text;d>h.width&&(d-=y-u,y=u,_=null);var b=new pi({shape:{points:L_e(l,0,y,c,v===f.length-1,v===0)},style:Ce(i.getItemStyle(),{lineJoin:"bevel"}),textContent:new nt({style:Mt(a,{text:_})}),textConfig:{position:"inside"},z2:Uf*1e4,onclick:Be(o,m)});b.disableLabelAnimation=!0,b.getTextContent().ensureState("emphasis").style=Mt(s,{text:_}),b.ensureState("emphasis").style=p,Kt(b,n.get("focus"),n.get("blurScope"),n.get("disabled")),this.group.add(b),k_e(b,e,m),l+=y+ZN}},r.prototype.remove=function(){this.group.removeAll()},r}();function L_e(r,e,t,i,n,a){var s=[[n?r:r-GT,e],[r+t,e],[r+t,e+i],[n?r:r-GT,e+i]];return!a&&s.splice(2,0,[r+t+GT,e+i/2]),!n&&s.push([r,e+i/2]),s}function k_e(r,e,t){ke(r).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:t&&t.dataIndex,name:t&&t.name},treePathInfo:t&&tb(t,e)}}var R_e=function(){function r(){this._storage=[],this._elExistsMap={}}return r.prototype.add=function(e,t,i,n,a){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:i,delay:n,easing:a}),!0)},r.prototype.finished=function(e){return this._finishedCallback=e,this},r.prototype.start=function(){for(var e=this,t=this._storage.length,i=function(){t--,t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},n=0,a=this._storage.length;n<a;n++){var s=this._storage[n];s.el.animateTo(s.target,{duration:s.duration,delay:s.delay,easing:s.easing,setToFinal:!0,done:i,aborted:i})}return this},r}();function O_e(){return new R_e}var eC=Le,QN=at,JN=3,eB="label",tB="upperLabel",N_e=Uf*10,B_e=Uf*2,F_e=Uf*3,lu=oc([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),rB=function(r){var e=lu(r);return e.stroke=e.fill=e.lineWidth=null,e},__=lt(),U_e=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._state="ready",t._storage=Yd(),t}return e.prototype.render=function(t,i,n,a){var s=i.findComponents({mainType:"series",subType:"treemap",query:a});if(!(Xe(s,t)<0)){this.seriesModel=t,this.api=n,this.ecModel=i;var o=["treemapZoomToNode","treemapRootToNode"],l=Wv(a,o,t),u=a&&a.type,c=t.layoutInfo,h=!this._oldTree,d=this._storage,f=u==="treemapRootToNode"&&l&&d?{rootNodeGroup:d.nodeGroup[l.node.getRawIndex()],direction:a.direction}:null,p=this._giveContainerGroup(c),v=t.get("animation"),g=this._doRender(p,t,f);v&&!h&&(!u||u==="treemapZoomToNode"||u==="treemapRootToNode")?this._doAnimation(p,g,t,f):g.renderFinally(),this._resetController(n),this._renderBreadcrumb(t,n,l)}},e.prototype._giveContainerGroup=function(t){var i=this._containerGroup;return i||(i=this._containerGroup=new eC,this._initEvents(i),this.group.add(i)),i.x=t.x,i.y=t.y,i},e.prototype._doRender=function(t,i,n){var a=i.getData().tree,s=this._oldTree,o=Yd(),l=Yd(),u=this._storage,c=[];function h(y,_,b,T){return V_e(i,l,u,n,o,c,y,_,b,T)}v(a.root?[a.root]:[],s&&s.root?[s.root]:[],t,a===s||!s,0);var d=g(u);if(this._oldTree=a,this._storage=l,this._controllerHost){var f=this.seriesModel.layoutInfo,p=a.root.getLayout();p.width===f.width&&p.height===f.height&&(this._controllerHost.zoom=1)}return{lastsForAnimation:o,willDeleteEls:d,renderFinally:m};function v(y,_,b,T,x){T?(_=y,R(y,function(I,M){!I.isRemoved()&&D(M,M)})):new to(_,y,C,C).add(D).update(D).remove(Be(D,null)).execute();function C(I){return I.getId()}function D(I,M){var L=I!=null?y[I]:null,N=M!=null?_[M]:null,O=h(L,N,b,x);O&&v(L&&L.viewChildren||[],N&&N.viewChildren||[],O,T,x+1)}}function g(y){var _=Yd();return y&&R(y,function(b,T){var x=_[T];R(b,function(C){C&&(x.push(C),__(C).willDelete=!0)})}),_}function m(){R(d,function(y){R(y,function(_){_.parent&&_.parent.remove(_)})}),R(c,function(y){y.invisible=!0,y.dirty()})}},e.prototype._doAnimation=function(t,i,n,a){var s=n.get("animationDurationUpdate"),o=n.get("animationEasing"),l=(xe(s)?0:s)||0,u=(xe(o)?null:o)||"cubicOut",c=O_e();R(i.willDeleteEls,function(h,d){R(h,function(f,p){if(!f.invisible){var v=f.parent,g,m=__(v);if(a&&a.direction==="drillDown")g=v===a.rootNodeGroup?{shape:{x:0,y:0,width:m.nodeWidth,height:m.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var y=0,_=0;m.willDelete||(y=m.nodeWidth/2,_=m.nodeHeight/2),g=d==="nodeGroup"?{x:y,y:_,style:{opacity:0}}:{shape:{x:y,y:_,width:0,height:0},style:{opacity:0}}}g&&c.add(f,g,l,0,u)}})}),R(this._storage,function(h,d){R(h,function(f,p){var v=i.lastsForAnimation[d][p],g={};v&&(f instanceof Le?v.oldX!=null&&(g.x=f.x,g.y=f.y,f.x=v.oldX,f.y=v.oldY):(v.oldShape&&(g.shape=Q({},f.shape),f.setShape(v.oldShape)),v.fadein?(f.setStyle("opacity",0),g.style={opacity:1}):f.style.opacity!==1&&(g.style={opacity:1})),c.add(f,g,l,0,u))})},this),this._state="animating",c.finished(ge(function(){this._state="ready",i.renderFinally()},this)).start()},e.prototype._resetController=function(t){var i=this._controller,n=this._controllerHost;n||(this._controllerHost={target:this.group},n=this._controllerHost),i||(i=this._controller=new kg(t.getZr()),i.enable(this.seriesModel.get("roam")),n.zoomLimit=this.seriesModel.get("scaleLimit"),n.zoom=this.seriesModel.get("zoom"),i.on("pan",ge(this._onPan,this)),i.on("zoom",ge(this._onZoom,this)));var a=new We(0,0,t.getWidth(),t.getHeight());i.setPointerChecker(function(s,o,l){return a.contain(o,l)})},e.prototype._clearController=function(){var t=this._controller;this._controllerHost=null,t&&(t.dispose(),t=null)},e.prototype._onPan=function(t){if(this._state!=="animating"&&(Math.abs(t.dx)>JN||Math.abs(t.dy)>JN)){var i=this.seriesModel.getData().tree.root;if(!i)return;var n=i.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+t.dx,y:n.y+t.dy,width:n.width,height:n.height}})}},e.prototype._onZoom=function(t){var i=t.originX,n=t.originY,a=t.scale;if(this._state!=="animating"){var s=this.seriesModel.getData().tree.root;if(!s)return;var o=s.getLayout();if(!o)return;var l=new We(o.x,o.y,o.width,o.height),u=null,c=this._controllerHost;u=c.zoomLimit;var h=c.zoom=c.zoom||1;if(h*=a,u){var d=u.min||0,f=u.max||1/0;h=Math.max(Math.min(f,h),d)}var p=h/c.zoom;c.zoom=h;var v=this.seriesModel.layoutInfo;i-=v.x,n-=v.y;var g=Ji();Da(g,g,[-i,-n]),T1(g,g,[p,p]),Da(g,g,[i,n]),l.applyTransform(g),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:l.x,y:l.y,width:l.width,height:l.height}})}},e.prototype._initEvents=function(t){var i=this;t.on("click",function(n){if(i._state==="ready"){var a=i.seriesModel.get("nodeClick",!0);if(a){var s=i.findTarget(n.offsetX,n.offsetY);if(s){var o=s.node;if(o.getLayout().isLeafRoot)i._rootToNode(s);else if(a==="zoomToNode")i._zoomToNode(s);else if(a==="link"){var l=o.hostTree.data.getItemModel(o.dataIndex),u=l.get("link",!0),c=l.get("target",!0)||"blank";u&&t_(u,c)}}}}},this)},e.prototype._renderBreadcrumb=function(t,i,n){var a=this;n||(n=t.get("leafDepth",!0)!=null?{node:t.getViewRoot()}:this.findTarget(i.getWidth()/2,i.getHeight()/2),n||(n={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new M_e(this.group))).render(t,i,n.node,function(s){a._state!=="animating"&&(GE(t.getViewRoot(),s)?a._rootToNode({node:s}):a._zoomToNode({node:s}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=Yd(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype.findTarget=function(t,i){var n,a=this.seriesModel.getViewRoot();return a.eachNode({attr:"viewChildren",order:"preorder"},function(s){var o=this._storage.background[s.getRawIndex()];if(o){var l=o.transformCoordToLocal(t,i),u=o.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)n={node:s,offsetX:l[0],offsetY:l[1]};else return!1}},this),n},e.type="treemap",e}(Tt);function Yd(){return{nodeGroup:[],background:[],content:[]}}function V_e(r,e,t,i,n,a,s,o,l,u){if(!s)return;var c=s.getLayout(),h=r.getData(),d=s.getModel();if(h.setItemGraphicEl(s.dataIndex,null),!c||!c.isInView)return;var f=c.width,p=c.height,v=c.borderWidth,g=c.invisible,m=s.getRawIndex(),y=o&&o.getRawIndex(),_=s.viewChildren,b=c.upperHeight,T=_&&_.length,x=d.getModel("itemStyle"),C=d.getModel(["emphasis","itemStyle"]),D=d.getModel(["blur","itemStyle"]),I=d.getModel(["select","itemStyle"]),M=x.get("borderRadius")||0,L=ue("nodeGroup",eC);if(!L)return;if(l.add(L),L.x=c.x||0,L.y=c.y||0,L.markRedraw(),__(L).nodeWidth=f,__(L).nodeHeight=p,c.isAboveViewRoot)return L;var N=ue("background",QN,u,B_e);N&&Z(L,N,T&&c.upperLabelHeight);var O=d.getModel("emphasis"),B=O.get("focus"),F=O.get("blurScope"),U=O.get("disabled"),$=B==="ancestor"?s.getAncestorsIndices():B==="descendant"?s.getDescendantIndices():B;if(T)Lv(L)&&Cu(L,!1),N&&(Cu(N,!U),h.setItemGraphicEl(s.dataIndex,N),y2(N,$,F));else{var q=ue("content",QN,u,F_e);q&&te(L,q),N.disableMorphing=!0,N&&Lv(N)&&Cu(N,!1),Cu(L,!U),h.setItemGraphicEl(s.dataIndex,L),y2(L,$,F)}return L;function Z(Ue,me,ze){var Pe=ke(me);if(Pe.dataIndex=s.dataIndex,Pe.seriesIndex=r.seriesIndex,me.setShape({x:0,y:0,width:f,height:p,r:M}),g)J(me);else{me.invisible=!1;var _e=s.getVisual("style"),Me=_e.stroke,St=rB(x);St.fill=Me;var Re=lu(C);Re.fill=C.get("borderColor");var Ge=lu(D);Ge.fill=D.get("borderColor");var Lt=lu(I);if(Lt.fill=I.get("borderColor"),ze){var At=f-2*v;oe(me,Me,_e.opacity,{x:v,y:0,width:At,height:b})}else me.removeTextContent();me.setStyle(St),me.ensureState("emphasis").style=Re,me.ensureState("blur").style=Ge,me.ensureState("select").style=Lt,lc(me)}Ue.add(me)}function te(Ue,me){var ze=ke(me);ze.dataIndex=s.dataIndex,ze.seriesIndex=r.seriesIndex;var Pe=Math.max(f-2*v,0),_e=Math.max(p-2*v,0);if(me.culling=!0,me.setShape({x:v,y:v,width:Pe,height:_e,r:M}),g)J(me);else{me.invisible=!1;var Me=s.getVisual("style"),St=Me.fill,Re=rB(x);Re.fill=St,Re.decal=Me.decal;var Ge=lu(C),Lt=lu(D),At=lu(I);oe(me,St,Me.opacity,null),me.setStyle(Re),me.ensureState("emphasis").style=Ge,me.ensureState("blur").style=Lt,me.ensureState("select").style=At,lc(me)}Ue.add(me)}function J(Ue){!Ue.invisible&&a.push(Ue)}function oe(Ue,me,ze,Pe){var _e=d.getModel(Pe?tB:eB),Me=Cr(d.get("name"),null),St=_e.getShallow("show");ti(Ue,Br(d,Pe?tB:eB),{defaultText:St?Me:null,inheritColor:me,defaultOpacity:ze,labelFetcher:r,labelDataIndex:s.dataIndex});var Re=Ue.getTextContent();if(Re){var Ge=Re.style,Lt=b1(Ge.padding||0);Pe&&(Ue.setTextConfig({layoutRect:Pe}),Re.disableLabelLayout=!0),Re.beforeUpdate=function(){var Dt=Math.max((Pe?Pe.width:Ue.shape.width)-Lt[1]-Lt[3],0),nr=Math.max((Pe?Pe.height:Ue.shape.height)-Lt[0]-Lt[2],0);(Ge.width!==Dt||Ge.height!==nr)&&Re.setStyle({width:Dt,height:nr})},Ge.truncateMinChar=2,Ge.lineOverflow="truncate",he(Ge,Pe,c);var At=Re.getState("emphasis");he(At?At.style:null,Pe,c)}}function he(Ue,me,ze){var Pe=Ue?Ue.text:null;if(!me&&ze.isLeafRoot&&Pe!=null){var _e=r.get("drillDownIcon",!0);Ue.text=_e?_e+" "+Pe:Pe}}function ue(Ue,me,ze,Pe){var _e=y!=null&&t[Ue][y],Me=n[Ue];return _e?(t[Ue][y]=null,Ie(Me,_e)):g||(_e=new me,_e instanceof Jn&&(_e.z2=z_e(ze,Pe)),Oe(Me,_e)),e[Ue][m]=_e}function Ie(Ue,me){var ze=Ue[m]={};me instanceof eC?(ze.oldX=me.x,ze.oldY=me.y):ze.oldShape=Q({},me.shape)}function Oe(Ue,me){var ze=Ue[m]={},Pe=s.parentNode,_e=me instanceof Le;if(Pe&&(!i||i.direction==="drillDown")){var Me=0,St=0,Re=n.background[Pe.getRawIndex()];!i&&Re&&Re.oldShape&&(Me=Re.oldShape.width,St=Re.oldShape.height),_e?(ze.oldX=0,ze.oldY=St):ze.oldShape={x:Me,y:St,width:0,height:0}}ze.fadein=!_e}}function z_e(r,e){return r*N_e+e}var qv=R,G_e=Ae,b_=-1,Nr=function(){function r(e){var t=e.mappingMethod,i=e.type,n=this.option=Ee(e);this.type=i,this.mappingMethod=t,this._normalizeData=W_e[t];var a=r.visualHandlers[i];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[t],t==="piecewise"?(HT(n),H_e(n)):t==="category"?n.categories?$_e(n):HT(n,!0):(fi(t!=="linear"||n.dataExtent),HT(n))}return r.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},r.prototype.getNormalizer=function(){return ge(this._normalizeData,this)},r.listVisualTypes=function(){return rt(r.visualHandlers)},r.isValidType=function(e){return r.visualHandlers.hasOwnProperty(e)},r.eachVisual=function(e,t,i){Ae(e)?R(e,t,i):t.call(i,e)},r.mapVisual=function(e,t,i){var n,a=ie(e)?[]:Ae(e)?{}:(n=!0,null);return r.eachVisual(e,function(s,o){var l=t.call(i,s,o);n?a=l:a[o]=l}),a},r.retrieveVisuals=function(e){var t={},i;return e&&qv(r.visualHandlers,function(n,a){e.hasOwnProperty(a)&&(t[a]=e[a],i=!0)}),i?t:null},r.prepareVisualTypes=function(e){if(ie(e))e=e.slice();else if(G_e(e)){var t=[];qv(e,function(i,n){t.push(n)}),e=t}else return[];return e.sort(function(i,n){return n==="color"&&i!=="color"&&i.indexOf("color")===0?1:-1}),e},r.dependsOn=function(e,t){return t==="color"?!!(e&&e.indexOf(t)===0):e===t},r.findPieceIndex=function(e,t,i){for(var n,a=1/0,s=0,o=t.length;s<o;s++){var l=t[s].value;if(l!=null){if(l===e||de(l)&&l===e+"")return s;i&&d(l,s)}}for(var s=0,o=t.length;s<o;s++){var u=t[s],c=u.interval,h=u.close;if(c){if(c[0]===-1/0){if(oy(h[1],e,c[1]))return s}else if(c[1]===1/0){if(oy(h[0],c[0],e))return s}else if(oy(h[0],c[0],e)&&oy(h[1],e,c[1]))return s;i&&d(c[0],s),i&&d(c[1],s)}}if(i)return e===1/0?t.length-1:e===-1/0?0:n;function d(f,p){var v=Math.abs(f-e);v<a&&(a=v,n=p)}},r.visualHandlers={color:{applyVisual:Kd("color"),getColorMapper:function(){var e=this.option;return ge(e.mappingMethod==="category"?function(t,i){return!i&&(t=this._normalizeData(t)),wp.call(this,t)}:function(t,i,n){var a=!!n;return!i&&(t=this._normalizeData(t)),n=Wp(t,e.parsedVisual,n),a?n:wa(n,"rgba")},this)},_normalizedToVisual:{linear:function(e){return wa(Wp(e,this.option.parsedVisual),"rgba")},category:wp,piecewise:function(e,t){var i=rC.call(this,t);return i==null&&(i=wa(Wp(e,this.option.parsedVisual),"rgba")),i},fixed:uu}},colorHue:sy(function(e,t){return Hh(e,t)}),colorSaturation:sy(function(e,t){return Hh(e,null,t)}),colorLightness:sy(function(e,t){return Hh(e,null,null,t)}),colorAlpha:sy(function(e,t){return Dv(e,t)}),decal:{applyVisual:Kd("decal"),_normalizedToVisual:{linear:null,category:wp,piecewise:null,fixed:null}},opacity:{applyVisual:Kd("opacity"),_normalizedToVisual:tC([0,1])},liftZ:{applyVisual:Kd("liftZ"),_normalizedToVisual:{linear:uu,category:uu,piecewise:uu,fixed:uu}},symbol:{applyVisual:function(e,t,i){var n=this.mapValueToVisual(e);i("symbol",n)},_normalizedToVisual:{linear:iB,category:wp,piecewise:function(e,t){var i=rC.call(this,t);return i==null&&(i=iB.call(this,e)),i},fixed:uu}},symbolSize:{applyVisual:Kd("symbolSize"),_normalizedToVisual:tC([0,1])}},r}();function H_e(r){var e=r.pieceList;r.hasSpecialVisual=!1,R(e,function(t,i){t.originIndex=i,t.visual!=null&&(r.hasSpecialVisual=!0)})}function $_e(r){var e=r.categories,t=r.categoryMap={},i=r.visual;if(qv(e,function(s,o){t[s]=o}),!ie(i)){var n=[];Ae(i)?qv(i,function(s,o){var l=t[o];n[l??b_]=s}):n[b_]=i,i=Qq(r,n)}for(var a=e.length-1;a>=0;a--)i[a]==null&&(delete t[e[a]],e.pop())}function HT(r,e){var t=r.visual,i=[];Ae(t)?qv(t,function(a){i.push(a)}):t!=null&&i.push(t);var n={color:1,symbol:1};!e&&i.length===1&&!n.hasOwnProperty(r.type)&&(i[1]=i[0]),Qq(r,i)}function sy(r){return{applyVisual:function(e,t,i){var n=this.mapValueToVisual(e);i("color",r(t("color"),n))},_normalizedToVisual:tC([0,1])}}function iB(r){var e=this.option.visual;return e[Math.round(yt(r,[0,1],[0,e.length-1],!0))]||{}}function Kd(r){return function(e,t,i){i(r,this.mapValueToVisual(e))}}function wp(r){var e=this.option.visual;return e[this.option.loop&&r!==b_?r%e.length:r]}function uu(){return this.option.visual[0]}function tC(r){return{linear:function(e){return yt(e,r,this.option.visual,!0)},category:wp,piecewise:function(e,t){var i=rC.call(this,t);return i==null&&(i=yt(e,r,this.option.visual,!0)),i},fixed:uu}}function rC(r){var e=this.option,t=e.pieceList;if(e.hasSpecialVisual){var i=Nr.findPieceIndex(r,t),n=t[i];if(n&&n.visual)return n.visual[this.type]}}function Qq(r,e){return r.visual=e,r.type==="color"&&(r.parsedVisual=ae(e,function(t){var i=Li(t);return i||[0,0,0,1]})),e}var W_e={linear:function(r){return yt(r,this.option.dataExtent,[0,1],!0)},piecewise:function(r){var e=this.option.pieceList,t=Nr.findPieceIndex(r,e,!0);if(t!=null)return yt(t,[0,e.length-1],[0,1],!0)},category:function(r){var e=this.option.categories?this.option.categoryMap[r]:r;return e??b_},fixed:tr};function oy(r,e,t){return r?e<=t:e<t}var q_e="itemStyle",Jq=lt();const j_e={seriesType:"treemap",reset:function(r){var e=r.getData().tree,t=e.root;t.isRemoved()||ej(t,{},r.getViewRoot().getAncestors(),r)}};function ej(r,e,t,i){var n=r.getModel(),a=r.getLayout(),s=r.hostTree.data;if(!(!a||a.invisible||!a.isInView)){var o=n.getModel(q_e),l=X_e(o,e,i),u=s.ensureUniqueItemVisual(r.dataIndex,"style"),c=o.get("borderColor"),h=o.get("borderColorSaturation"),d;h!=null&&(d=nB(l),c=Y_e(h,d)),u.stroke=c;var f=r.viewChildren;if(!f||!f.length)d=nB(l),u.fill=d;else{var p=K_e(r,n,a,o,l,f);R(f,function(v,g){if(v.depth>=t.length||v===t[v.depth]){var m=Z_e(n,l,v,g,p,i);ej(v,m,t,i)}})}}}function X_e(r,e,t){var i=Q({},e),n=t.designatedVisualItemStyle;return R(["color","colorAlpha","colorSaturation"],function(a){n[a]=e[a];var s=r.get(a);n[a]=null,s!=null&&(i[a]=s)}),i}function nB(r){var e=$T(r,"color");if(e){var t=$T(r,"colorAlpha"),i=$T(r,"colorSaturation");return i&&(e=Hh(e,null,null,i)),t&&(e=Dv(e,t)),e}}function Y_e(r,e){return e!=null?Hh(e,null,null,r):null}function $T(r,e){var t=r[e];if(t!=null&&t!=="none")return t}function K_e(r,e,t,i,n,a){if(!(!a||!a.length)){var s=WT(e,"color")||n.color!=null&&n.color!=="none"&&(WT(e,"colorAlpha")||WT(e,"colorSaturation"));if(s){var o=e.get("visualMin"),l=e.get("visualMax"),u=t.dataExtent.slice();o!=null&&o<u[0]&&(u[0]=o),l!=null&&l>u[1]&&(u[1]=l);var c=e.get("colorMappingBy"),h={type:s.name,dataExtent:u,visual:s.range};h.type==="color"&&(c==="index"||c==="id")?(h.mappingMethod="category",h.loop=!0):h.mappingMethod="linear";var d=new Nr(h);return Jq(d).drColorMappingBy=c,d}}}function WT(r,e){var t=r.get(e);return ie(t)&&t.length?{name:e,range:t}:null}function Z_e(r,e,t,i,n,a){var s=Q({},e);if(n){var o=n.type,l=o==="color"&&Jq(n).drColorMappingBy,u=l==="index"?i:l==="id"?a.mapIdToIndex(t.getId()):t.getValue(r.get("visualDimension"));s[o]=n.mapValueToVisual(u)}return s}var jv=Math.max,S_=Math.min,aB=Rr,HE=R,tj=["itemStyle","borderWidth"],Q_e=["itemStyle","gapWidth"],J_e=["upperLabel","show"],e1e=["upperLabel","height"];const t1e={seriesType:"treemap",reset:function(r,e,t,i){var n=t.getWidth(),a=t.getHeight(),s=r.option,o=br(r.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),l=s.size||[],u=ce(aB(o.width,l[0]),n),c=ce(aB(o.height,l[1]),a),h=i&&i.type,d=["treemapZoomToNode","treemapRootToNode"],f=Wv(i,d,r),p=h==="treemapRender"||h==="treemapMove"?i.rootRect:null,v=r.getViewRoot(),g=Yq(v);if(h!=="treemapMove"){var m=h==="treemapZoomToNode"?o1e(r,f,v,u,c):p?[p.width,p.height]:[u,c],y=s.sort;y&&y!=="asc"&&y!=="desc"&&(y="desc");var _={squareRatio:s.squareRatio,sort:y,leafDepth:s.leafDepth};v.hostTree.clearLayouts();var b={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};v.setLayout(b),rj(v,_,!1,0),b=v.getLayout(),HE(g,function(x,C){var D=(g[C+1]||v).getValue();x.setLayout(Q({dataExtent:[D,D],borderWidth:0,upperHeight:0},b))})}var T=r.getData().tree.root;T.setLayout(l1e(o,p,f),!0),r.setLayoutInfo(o),ij(T,new We(-o.x,-o.y,n,a),g,v,0)}};function rj(r,e,t,i){var n,a;if(!r.isRemoved()){var s=r.getLayout();n=s.width,a=s.height;var o=r.getModel(),l=o.get(tj),u=o.get(Q_e)/2,c=nj(o),h=Math.max(l,c),d=l-u,f=h-u;r.setLayout({borderWidth:l,upperHeight:h,upperLabelHeight:c},!0),n=jv(n-2*d,0),a=jv(a-d-f,0);var p=n*a,v=r1e(r,o,p,e,t,i);if(v.length){var g={x:d,y:f,width:n,height:a},m=S_(n,a),y=1/0,_=[];_.area=0;for(var b=0,T=v.length;b<T;){var x=v[b];_.push(x),_.area+=x.getLayout().area;var C=s1e(_,m,e.squareRatio);C<=y?(b++,y=C):(_.area-=_.pop().getLayout().area,sB(_,m,g,u,!1),m=S_(g.width,g.height),_.length=_.area=0,y=1/0)}if(_.length&&sB(_,m,g,u,!0),!t){var D=o.get("childrenVisibleMin");D!=null&&p<D&&(t=!0)}for(var b=0,T=v.length;b<T;b++)rj(v[b],e,t,i+1)}}}function r1e(r,e,t,i,n,a){var s=r.children||[],o=i.sort;o!=="asc"&&o!=="desc"&&(o=null);var l=i.leafDepth!=null&&i.leafDepth<=a;if(n&&!l)return r.viewChildren=[];s=_t(s,function(f){return!f.isRemoved()}),n1e(s,o);var u=a1e(e,s,o);if(u.sum===0)return r.viewChildren=[];if(u.sum=i1e(e,t,u.sum,o,s),u.sum===0)return r.viewChildren=[];for(var c=0,h=s.length;c<h;c++){var d=s[c].getValue()/u.sum*t;s[c].setLayout({area:d})}return l&&(s.length&&r.setLayout({isLeafRoot:!0},!0),s.length=0),r.viewChildren=s,r.setLayout({dataExtent:u.dataExtent},!0),s}function i1e(r,e,t,i,n){if(!i)return t;for(var a=r.get("visibleMin"),s=n.length,o=s,l=s-1;l>=0;l--){var u=n[i==="asc"?s-l-1:l].getValue();u/t*e<a&&(o=l,t-=u)}return i==="asc"?n.splice(0,s-o):n.splice(o,s-o),t}function n1e(r,e){return e&&r.sort(function(t,i){var n=e==="asc"?t.getValue()-i.getValue():i.getValue()-t.getValue();return n===0?e==="asc"?t.dataIndex-i.dataIndex:i.dataIndex-t.dataIndex:n}),r}function a1e(r,e,t){for(var i=0,n=0,a=e.length;n<a;n++)i+=e[n].getValue();var s=r.get("visualDimension"),o;return!e||!e.length?o=[NaN,NaN]:s==="value"&&t?(o=[e[e.length-1].getValue(),e[0].getValue()],t==="asc"&&o.reverse()):(o=[1/0,-1/0],HE(e,function(l){var u=l.getValue(s);u<o[0]&&(o[0]=u),u>o[1]&&(o[1]=u)})),{sum:i,dataExtent:o}}function s1e(r,e,t){for(var i=0,n=1/0,a=0,s=void 0,o=r.length;a<o;a++)s=r[a].getLayout().area,s&&(s<n&&(n=s),s>i&&(i=s));var l=r.area*r.area,u=e*e*t;return l?jv(u*i/l,l/(u*n)):1/0}function sB(r,e,t,i,n){var a=e===t.width?0:1,s=1-a,o=["x","y"],l=["width","height"],u=t[o[a]],c=e?r.area/e:0;(n||c>t[l[s]])&&(c=t[l[s]]);for(var h=0,d=r.length;h<d;h++){var f=r[h],p={},v=c?f.getLayout().area/c:0,g=p[l[s]]=jv(c-2*i,0),m=t[o[a]]+t[l[a]]-u,y=h===d-1||m<v?m:v,_=p[l[a]]=jv(y-2*i,0);p[o[s]]=t[o[s]]+S_(i,g/2),p[o[a]]=u+S_(i,_/2),u+=y,f.setLayout(p,!0)}t[o[s]]+=c,t[l[s]]-=c}function o1e(r,e,t,i,n){var a=(e||{}).node,s=[i,n];if(!a||a===t)return s;for(var o,l=i*n,u=l*r.option.zoomToNodeRatio;o=a.parentNode;){for(var c=0,h=o.children,d=0,f=h.length;d<f;d++)c+=h[d].getValue();var p=a.getValue();if(p===0)return s;u*=c/p;var v=o.getModel(),g=v.get(tj),m=Math.max(g,nj(v));u+=4*g*g+(3*g+m)*Math.pow(u,.5),u>u2&&(u=u2),a=o}u<l&&(u=l);var y=Math.pow(u/l,.5);return[i*y,n*y]}function l1e(r,e,t){if(e)return{x:e.x,y:e.y};var i={x:0,y:0};if(!t)return i;var n=t.node,a=n.getLayout();if(!a)return i;for(var s=[a.width/2,a.height/2],o=n;o;){var l=o.getLayout();s[0]+=l.x,s[1]+=l.y,o=o.parentNode}return{x:r.width/2-s[0],y:r.height/2-s[1]}}function ij(r,e,t,i,n){var a=r.getLayout(),s=t[n],o=s&&s===r;if(!(s&&!o||n===t.length&&r!==i)){r.setLayout({isInView:!0,invisible:!o&&!e.intersect(a),isAboveViewRoot:o},!0);var l=new We(e.x-a.x,e.y-a.y,e.width,e.height);HE(r.viewChildren||[],function(u){ij(u,l,t,i,n+1)})}}function nj(r){return r.get(J_e)?r.get(e1e):0}function u1e(r){r.registerSeriesModel(E_e),r.registerChartView(U_e),r.registerVisual(j_e),r.registerLayout(t1e),D_e(r)}function c1e(r){var e=r.findComponents({mainType:"legend"});!e||!e.length||r.eachSeriesByType("graph",function(t){var i=t.getCategoriesData(),n=t.getGraph(),a=n.data,s=i.mapArray(i.getName);a.filterSelf(function(o){var l=a.getItemModel(o),u=l.getShallow("category");if(u!=null){ut(u)&&(u=s[u]);for(var c=0;c<e.length;c++)if(!e[c].isSelected(u))return!1}return!0})})}function h1e(r){var e={};r.eachSeriesByType("graph",function(t){var i=t.getCategoriesData(),n=t.getData(),a={};i.each(function(s){var o=i.getName(s);a["ec-"+o]=s;var l=i.getItemModel(s),u=l.getModel("itemStyle").getItemStyle();u.fill||(u.fill=t.getColorFromPalette(o,e)),i.setItemVisual(s,"style",u);for(var c=["symbol","symbolSize","symbolKeepAspect"],h=0;h<c.length;h++){var d=l.getShallow(c[h],!0);d!=null&&i.setItemVisual(s,c[h],d)}}),i.count()&&n.each(function(s){var o=n.getItemModel(s),l=o.getShallow("category");if(l!=null){de(l)&&(l=a["ec-"+l]);var u=i.getItemVisual(l,"style"),c=n.ensureUniqueItemVisual(s,"style");Q(c,u);for(var h=["symbol","symbolSize","symbolKeepAspect"],d=0;d<h.length;d++)n.setItemVisual(s,h[d],i.getItemVisual(l,h[d]))}})})}function ly(r){return r instanceof Array||(r=[r,r]),r}function f1e(r){r.eachSeriesByType("graph",function(e){var t=e.getGraph(),i=e.getEdgeData(),n=ly(e.get("edgeSymbol")),a=ly(e.get("edgeSymbolSize"));i.setVisual("fromSymbol",n&&n[0]),i.setVisual("toSymbol",n&&n[1]),i.setVisual("fromSymbolSize",a&&a[0]),i.setVisual("toSymbolSize",a&&a[1]),i.setVisual("style",e.getModel("lineStyle").getLineStyle()),i.each(function(s){var o=i.getItemModel(s),l=t.getEdgeByIndex(s),u=ly(o.getShallow("symbol",!0)),c=ly(o.getShallow("symbolSize",!0)),h=o.getModel("lineStyle").getLineStyle(),d=i.ensureUniqueItemVisual(s,"style");switch(Q(d,h),d.stroke){case"source":{var f=l.node1.getVisual("style");d.stroke=f&&f.fill;break}case"target":{var f=l.node2.getVisual("style");d.stroke=f&&f.fill;break}}u[0]&&l.setVisual("fromSymbol",u[0]),u[1]&&l.setVisual("toSymbol",u[1]),c[0]&&l.setVisual("fromSymbolSize",c[0]),c[1]&&l.setVisual("toSymbolSize",c[1])})})}var iC="-->",rb=function(r){return r.get("autoCurveness")||null},aj=function(r,e){var t=rb(r),i=20,n=[];if(ut(t))i=t;else if(ie(t)){r.__curvenessList=t;return}e>i&&(i=e);var a=i%2?i+2:i+3;n=[];for(var s=0;s<a;s++)n.push((s%2?s+1:s)/10*(s%2?-1:1));r.__curvenessList=n},Xv=function(r,e,t){var i=[r.id,r.dataIndex].join("."),n=[e.id,e.dataIndex].join(".");return[t.uid,i,n].join(iC)},sj=function(r){var e=r.split(iC);return[e[0],e[2],e[1]].join(iC)},d1e=function(r,e){var t=Xv(r.node1,r.node2,e);return e.__edgeMap[t]},p1e=function(r,e){var t=nC(Xv(r.node1,r.node2,e),e),i=nC(Xv(r.node2,r.node1,e),e);return t+i},nC=function(r,e){var t=e.__edgeMap;return t[r]?t[r].length:0};function v1e(r){rb(r)&&(r.__curvenessList=[],r.__edgeMap={},aj(r))}function g1e(r,e,t,i){if(rb(t)){var n=Xv(r,e,t),a=t.__edgeMap,s=a[sj(n)];a[n]&&!s?a[n].isForward=!0:s&&a[n]&&(s.isForward=!0,a[n].isForward=!1),a[n]=a[n]||[],a[n].push(i)}}function $E(r,e,t,i){var n=rb(e),a=ie(n);if(!n)return null;var s=d1e(r,e);if(!s)return null;for(var o=-1,l=0;l<s.length;l++)if(s[l]===t){o=l;break}var u=p1e(r,e);aj(e,u),r.lineStyle=r.lineStyle||{};var c=Xv(r.node1,r.node2,e),h=e.__curvenessList,d=a||u%2?0:1;if(s.isForward)return h[d+o];var f=sj(c),p=nC(f,e),v=h[o+p+d];return i?a?n&&n[0]===0?(p+d)%2?v:-v:((p%2?0:1)+d)%2?v:-v:(p+d)%2?v:-v:h[o+p+d]}function oj(r){var e=r.coordinateSystem;if(!(e&&e.type!=="view")){var t=r.getGraph();t.eachNode(function(i){var n=i.getModel();i.setLayout([+n.get("x"),+n.get("y")])}),WE(t,r)}}function WE(r,e){r.eachEdge(function(t,i){var n=Ta(t.getModel().get(["lineStyle","curveness"]),-$E(t,e,i,!0),0),a=ss(t.node1.getLayout()),s=ss(t.node2.getLayout()),o=[a,s];+n&&o.push([(a[0]+s[0])/2-(a[1]-s[1])*n,(a[1]+s[1])/2-(s[0]-a[0])*n]),t.setLayout(o)})}function m1e(r,e){r.eachSeriesByType("graph",function(t){var i=t.get("layout"),n=t.coordinateSystem;if(n&&n.type!=="view"){var a=t.getData(),s=[];R(n.dimensions,function(d){s=s.concat(a.mapDimensionsAll(d))});for(var o=0;o<a.count();o++){for(var l=[],u=!1,c=0;c<s.length;c++){var h=a.get(s[c],o);isNaN(h)||(u=!0),l.push(h)}u?a.setItemLayout(o,n.dataToPoint(l)):a.setItemLayout(o,[NaN,NaN])}WE(a.graph,t)}else(!i||i==="none")&&oj(t)})}function Cp(r){var e=r.coordinateSystem;if(e.type!=="view")return 1;var t=r.option.nodeScaleRatio,i=e.scaleX,n=e.getZoom(),a=(n-1)*t+1;return a/i}function Ap(r){var e=r.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),+e}var oB=Math.PI,qT=[];function qE(r,e,t,i){var n=r.coordinateSystem;if(!(n&&n.type!=="view")){var a=n.getBoundingRect(),s=r.getData(),o=s.graph,l=a.width/2+a.x,u=a.height/2+a.y,c=Math.min(a.width,a.height)/2,h=s.count();if(s.setLayout({cx:l,cy:u}),!!h){if(t){var d=n.pointToData(i),f=d[0],p=d[1],v=[f-l,p-u];vc(v,v),Gp(v,v,c),t.setLayout([l+v[0],u+v[1]],!0);var g=r.get(["circular","rotateLabel"]);lj(t,g,l,u)}y1e[e](r,o,s,c,l,u,h),o.eachEdge(function(m,y){var _=Ta(m.getModel().get(["lineStyle","curveness"]),$E(m,r,y),0),b=ss(m.node1.getLayout()),T=ss(m.node2.getLayout()),x,C=(b[0]+T[0])/2,D=(b[1]+T[1])/2;+_&&(_*=3,x=[l*_+C*(1-_),u*_+D*(1-_)]),m.setLayout([b,T,x])})}}}var y1e={value:function(r,e,t,i,n,a,s){var o=0,l=t.getSum("value"),u=Math.PI*2/(l||s);e.eachNode(function(c){var h=c.getValue("value"),d=u*(l?h:1)/2;o+=d,c.setLayout([i*Math.cos(o)+n,i*Math.sin(o)+a]),o+=d})},symbolSize:function(r,e,t,i,n,a,s){var o=0;qT.length=s;var l=Cp(r);e.eachNode(function(h){var d=Ap(h);isNaN(d)&&(d=2),d<0&&(d=0),d*=l;var f=Math.asin(d/2/i);isNaN(f)&&(f=oB/2),qT[h.dataIndex]=f,o+=f*2});var u=(2*oB-o)/s/2,c=0;e.eachNode(function(h){var d=u+qT[h.dataIndex];c+=d,(!h.getLayout()||!h.getLayout().fixed)&&h.setLayout([i*Math.cos(c)+n,i*Math.sin(c)+a]),c+=d})}};function lj(r,e,t,i){var n=r.getGraphicEl();if(n){var a=r.getModel(),s=a.get(["label","rotate"])||0,o=n.getSymbolPath();if(e){var l=r.getLayout(),u=Math.atan2(l[1]-i,l[0]-t);u<0&&(u=Math.PI*2+u);var c=l[0]<t;c&&(u=u-Math.PI);var h=c?"left":"right";o.setTextConfig({rotation:-u,position:h,origin:"center"});var d=o.ensureState("emphasis");Q(d.textConfig||(d.textConfig={}),{position:h})}else o.setTextConfig({rotation:s*=Math.PI/180})}}function _1e(r){r.eachSeriesByType("graph",function(e){e.get("layout")==="circular"&&qE(e,"symbolSize")})}var th=F0;function b1e(r,e,t){for(var i=r,n=e,a=t.rect,s=a.width,o=a.height,l=[a.x+s/2,a.y+o/2],u=t.gravity==null?.1:t.gravity,c=0;c<i.length;c++){var h=i[c];h.p||(h.p=pl(s*(Math.random()-.5)+l[0],o*(Math.random()-.5)+l[1])),h.pp=ss(h.p),h.edges=null}var d=t.friction==null?.6:t.friction,f=d,p,v;return{warmUp:function(){f=d*.8},setFixed:function(g){i[g].fixed=!0},setUnfixed:function(g){i[g].fixed=!1},beforeStep:function(g){p=g},afterStep:function(g){v=g},step:function(g){p&&p(i,n);for(var m=[],y=i.length,_=0;_<n.length;_++){var b=n[_];if(!b.ignoreForceLayout){var T=b.n1,x=b.n2;Uo(m,x.p,T.p);var C=wv(m)-b.d,D=x.w/(T.w+x.w);isNaN(D)&&(D=0),vc(m,m),!T.fixed&&th(T.p,T.p,m,D*C*f),!x.fixed&&th(x.p,x.p,m,-(1-D)*C*f)}}for(var _=0;_<y;_++){var I=i[_];I.fixed||(Uo(m,l,I.p),th(I.p,I.p,m,u*f))}for(var _=0;_<y;_++)for(var T=i[_],M=_+1;M<y;M++){var x=i[M];Uo(m,x.p,T.p);var C=wv(m);C===0&&(g9(m,Math.random()-.5,Math.random()-.5),C=1);var L=(T.rep+x.rep)/C/C;!T.fixed&&th(T.pp,T.pp,m,L),!x.fixed&&th(x.pp,x.pp,m,-L)}for(var N=[],_=0;_<y;_++){var I=i[_];I.fixed||(Uo(N,I.p,I.pp),th(I.p,I.p,N,f),ni(I.pp,I.p))}f=f*.992;var O=f<.01;v&&v(i,n,O),g&&g(O)}}}function S1e(r){r.eachSeriesByType("graph",function(e){var t=e.coordinateSystem;if(!(t&&t.type!=="view"))if(e.get("layout")==="force"){var i=e.preservedPoints||{},n=e.getGraph(),a=n.data,s=n.edgeData,o=e.getModel("force"),l=o.get("initLayout");e.preservedPoints?a.each(function(_){var b=a.getId(_);a.setItemLayout(_,i[b]||[NaN,NaN])}):!l||l==="none"?oj(e):l==="circular"&&qE(e,"value");var u=a.getDataExtent("value"),c=s.getDataExtent("value"),h=o.get("repulsion"),d=o.get("edgeLength"),f=ie(h)?h:[h,h],p=ie(d)?d:[d,d];p=[p[1],p[0]];var v=a.mapArray("value",function(_,b){var T=a.getItemLayout(b),x=yt(_,u,f);return isNaN(x)&&(x=(f[0]+f[1])/2),{w:x,rep:x,fixed:a.getItemModel(b).get("fixed"),p:!T||isNaN(T[0])||isNaN(T[1])?null:T}}),g=s.mapArray("value",function(_,b){var T=n.getEdgeByIndex(b),x=yt(_,c,p);isNaN(x)&&(x=(p[0]+p[1])/2);var C=T.getModel(),D=Ta(T.getModel().get(["lineStyle","curveness"]),-$E(T,e,b,!0),0);return{n1:v[T.node1.dataIndex],n2:v[T.node2.dataIndex],d:x,curveness:D,ignoreForceLayout:C.get("ignoreForceLayout")}}),m=t.getBoundingRect(),y=b1e(v,g,{rect:m,gravity:o.get("gravity"),friction:o.get("friction")});y.beforeStep(function(_,b){for(var T=0,x=_.length;T<x;T++)_[T].fixed&&ni(_[T].p,n.getNodeByIndex(T).getLayout())}),y.afterStep(function(_,b,T){for(var x=0,C=_.length;x<C;x++)_[x].fixed||n.getNodeByIndex(x).setLayout(_[x].p),i[a.getId(x)]=_[x].p;for(var x=0,C=b.length;x<C;x++){var D=b[x],I=n.getEdgeByIndex(x),M=D.n1.p,L=D.n2.p,N=I.getLayout();N=N?N.slice():[],N[0]=N[0]||[],N[1]=N[1]||[],ni(N[0],M),ni(N[1],L),+D.curveness&&(N[2]=[(M[0]+L[0])/2-(M[1]-L[1])*D.curveness,(M[1]+L[1])/2-(L[0]-M[0])*D.curveness]),I.setLayout(N)}}),e.forceLayout=y,e.preservedPoints=i,y.step()}else e.forceLayout=null})}function T1e(r,e,t){var i=Q(r.getBoxLayoutParams(),{aspect:t});return br(i,{width:e.getWidth(),height:e.getHeight()})}function x1e(r,e){var t=[];return r.eachSeriesByType("graph",function(i){var n=i.get("coordinateSystem");if(!n||n==="view"){var a=i.getData(),s=a.mapArray(function(g){var m=a.getItemModel(g);return[+m.get("x"),+m.get("y")]}),o=[],l=[];P1(s,o,l),l[0]-o[0]===0&&(l[0]+=1,o[0]-=1),l[1]-o[1]===0&&(l[1]+=1,o[1]-=1);var u=(l[0]-o[0])/(l[1]-o[1]),c=T1e(i,e,u);isNaN(u)&&(o=[c.x,c.y],l=[c.x+c.width,c.y+c.height]);var h=l[0]-o[0],d=l[1]-o[1],f=c.width,p=c.height,v=i.coordinateSystem=new Rg;v.zoomLimit=i.get("scaleLimit"),v.setBoundingRect(o[0],o[1],h,d),v.setViewRect(c.x,c.y,f,p),v.setCenter(i.get("center"),e),v.setZoom(i.get("zoom")),t.push(v)}}),t}var lB=Ar.prototype,jT=zf.prototype,uj=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return r}();(function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e})(uj);function XT(r){return isNaN(+r.cpx1)||isNaN(+r.cpy1)}var w1e=function(r){j(e,r);function e(t){var i=r.call(this,t)||this;return i.type="ec-line",i}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new uj},e.prototype.buildPath=function(t,i){XT(i)?lB.buildPath.call(this,t,i):jT.buildPath.call(this,t,i)},e.prototype.pointAt=function(t){return XT(this.shape)?lB.pointAt.call(this,t):jT.pointAt.call(this,t)},e.prototype.tangentAt=function(t){var i=this.shape,n=XT(i)?[i.x2-i.x1,i.y2-i.y1]:jT.tangentAt.call(this,t);return vc(n,n)},e}(Je),YT=["fromSymbol","toSymbol"];function uB(r){return"_"+r+"Type"}function cB(r,e,t){var i=e.getItemVisual(t,r);if(!i||i==="none")return i;var n=e.getItemVisual(t,r+"Size"),a=e.getItemVisual(t,r+"Rotate"),s=e.getItemVisual(t,r+"Offset"),o=e.getItemVisual(t,r+"KeepAspect"),l=Jf(n),u=_c(s||0,l);return i+l+u+(a||"")+(o||"")}function hB(r,e,t){var i=e.getItemVisual(t,r);if(!(!i||i==="none")){var n=e.getItemVisual(t,r+"Size"),a=e.getItemVisual(t,r+"Rotate"),s=e.getItemVisual(t,r+"Offset"),o=e.getItemVisual(t,r+"KeepAspect"),l=Jf(n),u=_c(s||0,l),c=cr(i,-l[0]/2+u[0],-l[1]/2+u[1],l[0],l[1],null,o);return c.__specifiedRotation=a==null||isNaN(a)?void 0:+a*Math.PI/180||0,c.name=r,c}}function C1e(r){var e=new w1e({name:"line",subPixelOptimize:!0});return aC(e.shape,r),e}function aC(r,e){r.x1=e[0][0],r.y1=e[0][1],r.x2=e[1][0],r.y2=e[1][1],r.percent=1;var t=e[2];t?(r.cpx1=t[0],r.cpy1=t[1]):(r.cpx1=NaN,r.cpy1=NaN)}var jE=function(r){j(e,r);function e(t,i,n){var a=r.call(this)||this;return a._createLine(t,i,n),a}return e.prototype._createLine=function(t,i,n){var a=t.hostModel,s=t.getItemLayout(i),o=C1e(s);o.shape.percent=0,Bt(o,{shape:{percent:1}},a,i),this.add(o),R(YT,function(l){var u=hB(l,t,i);this.add(u),this[uB(l)]=cB(l,t,i)},this),this._updateCommonStl(t,i,n)},e.prototype.updateData=function(t,i,n){var a=t.hostModel,s=this.childOfName("line"),o=t.getItemLayout(i),l={shape:{}};aC(l.shape,o),ct(s,l,a,i),R(YT,function(u){var c=cB(u,t,i),h=uB(u);if(this[h]!==c){this.remove(this.childOfName(u));var d=hB(u,t,i);this.add(d)}this[h]=c},this),this._updateCommonStl(t,i,n)},e.prototype.getLinePath=function(){return this.childAt(0)},e.prototype._updateCommonStl=function(t,i,n){var a=t.hostModel,s=this.childOfName("line"),o=n&&n.emphasisLineStyle,l=n&&n.blurLineStyle,u=n&&n.selectLineStyle,c=n&&n.labelStatesModels,h=n&&n.emphasisDisabled,d=n&&n.focus,f=n&&n.blurScope;if(!n||t.hasItemOption){var p=t.getItemModel(i),v=p.getModel("emphasis");o=v.getModel("lineStyle").getLineStyle(),l=p.getModel(["blur","lineStyle"]).getLineStyle(),u=p.getModel(["select","lineStyle"]).getLineStyle(),h=v.get("disabled"),d=v.get("focus"),f=v.get("blurScope"),c=Br(p)}var g=t.getItemVisual(i,"style"),m=g.stroke;s.useStyle(g),s.style.fill=null,s.style.strokeNoScale=!0,s.ensureState("emphasis").style=o,s.ensureState("blur").style=l,s.ensureState("select").style=u,R(YT,function(x){var C=this.childOfName(x);if(C){C.setColor(m),C.style.opacity=g.opacity;for(var D=0;D<Oi.length;D++){var I=Oi[D],M=s.getState(I);if(M){var L=M.style||{},N=C.ensureState(I),O=N.style||(N.style={});L.stroke!=null&&(O[C.__isEmptyBrush?"stroke":"fill"]=L.stroke),L.opacity!=null&&(O.opacity=L.opacity)}}C.markRedraw()}},this);var y=a.getRawValue(i);ti(this,c,{labelDataIndex:i,labelFetcher:{getFormattedLabel:function(x,C){return a.getFormattedLabel(x,C,t.dataType)}},inheritColor:m||"#000",defaultOpacity:g.opacity,defaultText:(y==null?t.getName(i):isFinite(y)?Yt(y):y)+""});var _=this.getTextContent();if(_){var b=c.normal;_.__align=_.style.align,_.__verticalAlign=_.style.verticalAlign,_.__position=b.get("position")||"middle";var T=b.get("distance");ie(T)||(T=[T,T]),_.__labelDistance=T}this.setTextConfig({position:null,local:!0,inside:!1}),Kt(this,d,f,h)},e.prototype.highlight=function(){Js(this)},e.prototype.downplay=function(){eo(this)},e.prototype.updateLayout=function(t,i){this.setLinePoints(t.getItemLayout(i))},e.prototype.setLinePoints=function(t){var i=this.childOfName("line");aC(i.shape,t),i.dirty()},e.prototype.beforeUpdate=function(){var t=this,i=t.childOfName("fromSymbol"),n=t.childOfName("toSymbol"),a=t.getTextContent();if(!i&&!n&&(!a||a.ignore))return;for(var s=1,o=this.parent;o;)o.scaleX&&(s/=o.scaleX),o=o.parent;var l=t.childOfName("line");if(!this.__dirty&&!l.__dirty)return;var u=l.shape.percent,c=l.pointAt(0),h=l.pointAt(u),d=Uo([],h,c);vc(d,d);function f(M,L){var N=M.__specifiedRotation;if(N==null){var O=l.tangentAt(L);M.attr("rotation",(L===1?-1:1)*Math.PI/2-Math.atan2(O[1],O[0]))}else M.attr("rotation",N)}if(i&&(i.setPosition(c),f(i,0),i.scaleX=i.scaleY=s*u,i.markRedraw()),n&&(n.setPosition(h),f(n,1),n.scaleX=n.scaleY=s*u,n.markRedraw()),a&&!a.ignore){a.x=a.y=0,a.originX=a.originY=0;var p=void 0,v=void 0,g=a.__labelDistance,m=g[0]*s,y=g[1]*s,_=u/2,b=l.tangentAt(_),T=[b[1],-b[0]],x=l.pointAt(_);T[1]>0&&(T[0]=-T[0],T[1]=-T[1]);var C=b[0]<0?-1:1;if(a.__position!=="start"&&a.__position!=="end"){var D=-Math.atan2(b[1],b[0]);h[0]<c[0]&&(D=Math.PI+D),a.rotation=D}var I=void 0;switch(a.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":I=-y,v="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":I=y,v="top";break;default:I=0,v="middle"}switch(a.__position){case"end":a.x=d[0]*m+h[0],a.y=d[1]*y+h[1],p=d[0]>.8?"left":d[0]<-.8?"right":"center",v=d[1]>.8?"top":d[1]<-.8?"bottom":"middle";break;case"start":a.x=-d[0]*m+c[0],a.y=-d[1]*y+c[1],p=d[0]>.8?"right":d[0]<-.8?"left":"center",v=d[1]>.8?"bottom":d[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":a.x=m*C+c[0],a.y=c[1]+I,p=b[0]<0?"right":"left",a.originX=-m*C,a.originY=-I;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":a.x=x[0],a.y=x[1]+I,p="center",a.originY=-I;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":a.x=-m*C+h[0],a.y=h[1]+I,p=b[0]>=0?"right":"left",a.originX=m*C,a.originY=-I;break}a.scaleX=a.scaleY=s,a.setStyle({verticalAlign:a.__verticalAlign||v,align:a.__align||p})}},e}(Le),XE=function(){function r(e){this.group=new Le,this._LineCtor=e||jE}return r.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var i=this,n=i.group,a=i._lineData;i._lineData=e,a||n.removeAll();var s=fB(e);e.diff(a).add(function(o){t._doAdd(e,o,s)}).update(function(o,l){t._doUpdate(a,e,l,o,s)}).remove(function(o){n.remove(a.getItemGraphicEl(o))}).execute()},r.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(t,i){t.updateLayout(e,i)},this)},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=fB(e),this._lineData=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t){this._progressiveEls=[];function i(o){!o.isGroup&&!A1e(o)&&(o.incremental=!0,o.ensureState("emphasis").hoverLayer=!0)}for(var n=e.start;n<e.end;n++){var a=t.getItemLayout(n);if(KT(a)){var s=new this._LineCtor(t,n,this._seriesScope);s.traverse(i),this.group.add(s),t.setItemGraphicEl(n,s),this._progressiveEls.push(s)}}},r.prototype.remove=function(){this.group.removeAll()},r.prototype.eachRendered=function(e){gl(this._progressiveEls||this.group,e)},r.prototype._doAdd=function(e,t,i){var n=e.getItemLayout(t);if(KT(n)){var a=new this._LineCtor(e,t,i);e.setItemGraphicEl(t,a),this.group.add(a)}},r.prototype._doUpdate=function(e,t,i,n,a){var s=e.getItemGraphicEl(i);if(!KT(t.getItemLayout(n))){this.group.remove(s);return}s?s.updateData(t,n,a):s=new this._LineCtor(t,n,a),t.setItemGraphicEl(n,s),this.group.add(s)},r}();function A1e(r){return r.animators&&r.animators.length>0}function fB(r){var e=r.hostModel,t=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:t.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:t.get("disabled"),blurScope:t.get("blurScope"),focus:t.get("focus"),labelStatesModels:Br(e)}}function dB(r){return isNaN(r[0])||isNaN(r[1])}function KT(r){return r&&!dB(r[0])&&!dB(r[1])}var ZT=[],QT=[],JT=[],rh=zr,ex=Xo,pB=Math.abs;function vB(r,e,t){for(var i=r[0],n=r[1],a=r[2],s=1/0,o,l=t*t,u=.1,c=.1;c<=.9;c+=.1){ZT[0]=rh(i[0],n[0],a[0],c),ZT[1]=rh(i[1],n[1],a[1],c);var h=pB(ex(ZT,e)-l);h<s&&(s=h,o=c)}for(var d=0;d<32;d++){var f=o+u;QT[0]=rh(i[0],n[0],a[0],o),QT[1]=rh(i[1],n[1],a[1],o),JT[0]=rh(i[0],n[0],a[0],f),JT[1]=rh(i[1],n[1],a[1],f);var h=ex(QT,e)-l;if(pB(h)<.01)break;var p=ex(JT,e)-l;u/=2,h<0?p>=0?o=o+u:o=o-u:p>=0?o=o-u:o=o+u}return o}function tx(r,e){var t=[],i=Cv,n=[[],[],[]],a=[[],[]],s=[];e/=2,r.eachEdge(function(o,l){var u=o.getLayout(),c=o.getVisual("fromSymbol"),h=o.getVisual("toSymbol");u.__original||(u.__original=[ss(u[0]),ss(u[1])],u[2]&&u.__original.push(ss(u[2])));var d=u.__original;if(u[2]!=null){if(ni(n[0],d[0]),ni(n[1],d[2]),ni(n[2],d[1]),c&&c!=="none"){var f=Ap(o.node1),p=vB(n,d[0],f*e);i(n[0][0],n[1][0],n[2][0],p,t),n[0][0]=t[3],n[1][0]=t[4],i(n[0][1],n[1][1],n[2][1],p,t),n[0][1]=t[3],n[1][1]=t[4]}if(h&&h!=="none"){var f=Ap(o.node2),p=vB(n,d[1],f*e);i(n[0][0],n[1][0],n[2][0],p,t),n[1][0]=t[1],n[2][0]=t[2],i(n[0][1],n[1][1],n[2][1],p,t),n[1][1]=t[1],n[2][1]=t[2]}ni(u[0],n[0]),ni(u[1],n[2]),ni(u[2],n[1])}else{if(ni(a[0],d[0]),ni(a[1],d[1]),Uo(s,a[1],a[0]),vc(s,s),c&&c!=="none"){var f=Ap(o.node1);F0(a[0],a[0],s,f*e)}if(h&&h!=="none"){var f=Ap(o.node2);F0(a[1],a[1],s,-f*e)}ni(u[0],a[0]),ni(u[1],a[1])}})}function gB(r){return r.type==="view"}var D1e=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,i){var n=new Eg,a=new XE,s=this.group;this._controller=new kg(i.getZr()),this._controllerHost={target:s},s.add(n.group),s.add(a.group),this._symbolDraw=n,this._lineDraw=a,this._firstRender=!0},e.prototype.render=function(t,i,n){var a=this,s=t.coordinateSystem;this._model=t;var o=this._symbolDraw,l=this._lineDraw,u=this.group;if(gB(s)){var c={x:s.x,y:s.y,scaleX:s.scaleX,scaleY:s.scaleY};this._firstRender?u.attr(c):ct(u,c,t)}tx(t.getGraph(),Cp(t));var h=t.getData();o.updateData(h);var d=t.getEdgeData();l.updateData(d),this._updateNodeAndLinkScale(),this._updateController(t,i,n),clearTimeout(this._layoutTimeout);var f=t.forceLayout,p=t.get(["force","layoutAnimation"]);f&&this._startForceLayoutIteration(f,p);var v=t.get("layout");h.graph.eachNode(function(_){var b=_.dataIndex,T=_.getGraphicEl(),x=_.getModel();if(T){T.off("drag").off("dragend");var C=x.get("draggable");C&&T.on("drag",function(I){switch(v){case"force":f.warmUp(),!a._layouting&&a._startForceLayoutIteration(f,p),f.setFixed(b),h.setItemLayout(b,[T.x,T.y]);break;case"circular":h.setItemLayout(b,[T.x,T.y]),_.setLayout({fixed:!0},!0),qE(t,"symbolSize",_,[I.offsetX,I.offsetY]),a.updateLayout(t);break;case"none":default:h.setItemLayout(b,[T.x,T.y]),WE(t.getGraph(),t),a.updateLayout(t);break}}).on("dragend",function(){f&&f.setUnfixed(b)}),T.setDraggable(C,!!x.get("cursor"));var D=x.get(["emphasis","focus"]);D==="adjacency"&&(ke(T).focus=_.getAdjacentDataIndices())}}),h.graph.eachEdge(function(_){var b=_.getGraphicEl(),T=_.getModel().get(["emphasis","focus"]);b&&T==="adjacency"&&(ke(b).focus={edge:[_.dataIndex],node:[_.node1.dataIndex,_.node2.dataIndex]})});var g=t.get("layout")==="circular"&&t.get(["circular","rotateLabel"]),m=h.getLayout("cx"),y=h.getLayout("cy");h.graph.eachNode(function(_){lj(_,g,m,y)}),this._firstRender=!1},e.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(t,i){var n=this;(function a(){t.step(function(s){n.updateLayout(n._model),(n._layouting=!s)&&(i?n._layoutTimeout=setTimeout(a,16):a())})})()},e.prototype._updateController=function(t,i,n){var a=this,s=this._controller,o=this._controllerHost,l=this.group;if(s.setPointerChecker(function(u,c,h){var d=l.getBoundingRect();return d.applyTransform(l.transform),d.contain(c,h)&&!J1(u,n,t)}),!gB(t.coordinateSystem)){s.disable();return}s.enable(t.get("roam")),o.zoomLimit=t.get("scaleLimit"),o.zoom=t.coordinateSystem.getZoom(),s.off("pan").off("zoom").on("pan",function(u){NE(o,u.dx,u.dy),n.dispatchAction({seriesId:t.id,type:"graphRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){BE(o,u.scale,u.originX,u.originY),n.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),a._updateNodeAndLinkScale(),tx(t.getGraph(),Cp(t)),a._lineDraw.updateLayout(),n.updateLabelLayout()})},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,i=t.getData(),n=Cp(t);i.eachItemGraphicEl(function(a,s){a&&a.setSymbolScale(n)})},e.prototype.updateLayout=function(t){tx(t.getGraph(),Cp(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},e.prototype.remove=function(){clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},e.type="graph",e}(Tt);function ih(r){return"_EC_"+r}var E1e=function(){function r(e){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return r.prototype.isDirected=function(){return this._directed},r.prototype.addNode=function(e,t){e=e==null?""+t:""+e;var i=this._nodesMap;if(!i[ih(e)]){var n=new cu(e,t);return n.hostGraph=this,this.nodes.push(n),i[ih(e)]=n,n}},r.prototype.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},r.prototype.getNodeById=function(e){return this._nodesMap[ih(e)]},r.prototype.addEdge=function(e,t,i){var n=this._nodesMap,a=this._edgesMap;if(ut(e)&&(e=this.nodes[e]),ut(t)&&(t=this.nodes[t]),e instanceof cu||(e=n[ih(e)]),t instanceof cu||(t=n[ih(t)]),!(!e||!t)){var s=e.id+"-"+t.id,o=new cj(e,t,i);return o.hostGraph=this,this._directed&&(e.outEdges.push(o),t.inEdges.push(o)),e.edges.push(o),e!==t&&t.edges.push(o),this.edges.push(o),a[s]=o,o}},r.prototype.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},r.prototype.getEdge=function(e,t){e instanceof cu&&(e=e.id),t instanceof cu&&(t=t.id);var i=this._edgesMap;return this._directed?i[e+"-"+t]:i[e+"-"+t]||i[t+"-"+e]},r.prototype.eachNode=function(e,t){for(var i=this.nodes,n=i.length,a=0;a<n;a++)i[a].dataIndex>=0&&e.call(t,i[a],a)},r.prototype.eachEdge=function(e,t){for(var i=this.edges,n=i.length,a=0;a<n;a++)i[a].dataIndex>=0&&i[a].node1.dataIndex>=0&&i[a].node2.dataIndex>=0&&e.call(t,i[a],a)},r.prototype.breadthFirstTraverse=function(e,t,i,n){if(t instanceof cu||(t=this._nodesMap[ih(t)]),!!t){for(var a=i==="out"?"outEdges":i==="in"?"inEdges":"edges",s=0;s<this.nodes.length;s++)this.nodes[s].__visited=!1;if(!e.call(n,t,null))for(var o=[t];o.length;)for(var l=o.shift(),u=l[a],s=0;s<u.length;s++){var c=u[s],h=c.node1===l?c.node2:c.node1;if(!h.__visited){if(e.call(n,h,l))return;o.push(h),h.__visited=!0}}}},r.prototype.update=function(){for(var e=this.data,t=this.edgeData,i=this.nodes,n=this.edges,a=0,s=i.length;a<s;a++)i[a].dataIndex=-1;for(var a=0,s=e.count();a<s;a++)i[e.getRawIndex(a)].dataIndex=a;t.filterSelf(function(o){var l=n[t.getRawIndex(o)];return l.node1.dataIndex>=0&&l.node2.dataIndex>=0});for(var a=0,s=n.length;a<s;a++)n[a].dataIndex=-1;for(var a=0,s=t.count();a<s;a++)n[t.getRawIndex(a)].dataIndex=a},r.prototype.clone=function(){for(var e=new r(this._directed),t=this.nodes,i=this.edges,n=0;n<t.length;n++)e.addNode(t[n].id,t[n].dataIndex);for(var n=0;n<i.length;n++){var a=i[n];e.addEdge(a.node1.id,a.node2.id,a.dataIndex)}return e},r}(),cu=function(){function r(e,t){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=e??"",this.dataIndex=t??-1}return r.prototype.degree=function(){return this.edges.length},r.prototype.inDegree=function(){return this.inEdges.length},r.prototype.outDegree=function(){return this.outEdges.length},r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostGraph,i=t.data.getItemModel(this.dataIndex);return i.getModel(e)}},r.prototype.getAdjacentDataIndices=function(){for(var e={edge:[],node:[]},t=0;t<this.edges.length;t++){var i=this.edges[t];i.dataIndex<0||(e.edge.push(i.dataIndex),e.node.push(i.node1.dataIndex,i.node2.dataIndex))}return e},r.prototype.getTrajectoryDataIndices=function(){for(var e=be(),t=be(),i=0;i<this.edges.length;i++){var n=this.edges[i];if(!(n.dataIndex<0)){e.set(n.dataIndex,!0);for(var a=[n.node1],s=[n.node2],o=0;o<a.length;){var l=a[o];o++,t.set(l.dataIndex,!0);for(var u=0;u<l.inEdges.length;u++)e.set(l.inEdges[u].dataIndex,!0),a.push(l.inEdges[u].node1)}for(o=0;o<s.length;){var c=s[o];o++,t.set(c.dataIndex,!0);for(var u=0;u<c.outEdges.length;u++)e.set(c.outEdges[u].dataIndex,!0),s.push(c.outEdges[u].node2)}}}return{edge:e.keys(),node:t.keys()}},r}(),cj=function(){function r(e,t,i){this.dataIndex=-1,this.node1=e,this.node2=t,this.dataIndex=i??-1}return r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostGraph,i=t.edgeData.getItemModel(this.dataIndex);return i.getModel(e)}},r.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},r.prototype.getTrajectoryDataIndices=function(){var e=be(),t=be();e.set(this.dataIndex,!0);for(var i=[this.node1],n=[this.node2],a=0;a<i.length;){var s=i[a];a++,t.set(s.dataIndex,!0);for(var o=0;o<s.inEdges.length;o++)e.set(s.inEdges[o].dataIndex,!0),i.push(s.inEdges[o].node1)}for(a=0;a<n.length;){var l=n[a];a++,t.set(l.dataIndex,!0);for(var o=0;o<l.outEdges.length;o++)e.set(l.outEdges[o].dataIndex,!0),n.push(l.outEdges[o].node2)}return{edge:e.keys(),node:t.keys()}},r}();function hj(r,e){return{getValue:function(t){var i=this[r][e];return i.getStore().get(i.getDimensionIndex(t||"value"),this.dataIndex)},setVisual:function(t,i){this.dataIndex>=0&&this[r][e].setItemVisual(this.dataIndex,t,i)},getVisual:function(t){return this[r][e].getItemVisual(this.dataIndex,t)},setLayout:function(t,i){this.dataIndex>=0&&this[r][e].setItemLayout(this.dataIndex,t,i)},getLayout:function(){return this[r][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[r][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[r][e].getRawIndex(this.dataIndex)}}}ir(cu,hj("hostGraph","data"));ir(cj,hj("hostGraph","edgeData"));function fj(r,e,t,i,n){for(var a=new E1e(i),s=0;s<r.length;s++)a.addNode(Rr(r[s].id,r[s].name,s),s);for(var o=[],l=[],u=0,s=0;s<e.length;s++){var c=e[s],h=c.source,d=c.target;a.addEdge(h,d,u)&&(l.push(c),o.push(Rr(Cr(c.id,null),h+" > "+d)),u++)}var f=t.get("coordinateSystem"),p;if(f==="cartesian2d"||f==="polar")p=_s(r,t);else{var v=Kf.get(f),g=v?v.dimensions||[]:[];Xe(g,"value")<0&&g.concat(["value"]);var m=ed(r,{coordDimensions:g,encodeDefine:t.getEncode()}).dimensions;p=new hi(m,t),p.initData(r)}var y=new hi(["value"],t);return y.initData(l,o),n&&n(p,y),jq({mainData:p,struct:a,structAttr:"graph",datas:{node:p,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a}var I1e=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments);var i=this;function n(){return i._categoriesData}this.legendVisualProvider=new Lg(n,n),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(t){r.prototype.mergeDefaultAndTheme.apply(this,arguments),ac(t,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,i){var n=t.edges||t.links||[],a=t.data||t.nodes||[],s=this;if(a&&n){v1e(this);var o=fj(a,n,this,!0,l);return R(o.edges,function(u){g1e(u.node1,u.node2,this,u.dataIndex)},this),o.data}function l(u,c){u.wrapMethod("getItemModel",function(p){var v=s._categoriesModels,g=p.getShallow("category"),m=v[g];return m&&(m.parentModel=p.parentModel,p.parentModel=m),p});var h=ft.prototype.getModel;function d(p,v){var g=h.call(this,p,v);return g.resolveParentPath=f,g}c.wrapMethod("getItemModel",function(p){return p.resolveParentPath=f,p.getModel=d,p});function f(p){if(p&&(p[0]==="label"||p[1]==="label")){var v=p.slice();return p[0]==="label"?v[0]="edgeLabel":p[1]==="label"&&(v[1]="edgeLabel"),v}return p}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(t,i,n){if(n==="edge"){var a=this.getData(),s=this.getDataParams(t,n),o=a.graph.getEdgeByIndex(t),l=a.getName(o.node1.dataIndex),u=a.getName(o.node2.dataIndex),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),Fr("nameValue",{name:c.join(" > "),value:s.value,noValue:s.value==null})}var h=R$({series:this,dataIndex:t,multipleSeries:i});return h},e.prototype._updateCategoriesData=function(){var t=ae(this.option.categories||[],function(n){return n.value!=null?n:Q({value:0},n)}),i=new hi(["value"],this);i.initData(t),this._categoriesData=i,this._categoriesModels=i.mapArray(function(n){return i.getItemModel(n)})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return r.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(Ct),P1e={type:"graphRoam",event:"graphRoam",update:"none"};function M1e(r){r.registerChartView(D1e),r.registerSeriesModel(I1e),r.registerProcessor(c1e),r.registerVisual(h1e),r.registerVisual(f1e),r.registerLayout(m1e),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,_1e),r.registerLayout(S1e),r.registerCoordinateSystem("graphView",{dimensions:Rg.dimensions,create:x1e}),r.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},tr),r.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},tr),r.registerAction(P1e,function(e,t,i){t.eachComponent({mainType:"series",query:e},function(n){var a=n.coordinateSystem,s=UE(a,e,void 0,i);n.setCenter&&n.setCenter(s.center),n.setZoom&&n.setZoom(s.zoom)})})}var L1e=function(){function r(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return r}(),k1e=function(r){j(e,r);function e(t){var i=r.call(this,t)||this;return i.type="pointer",i}return e.prototype.getDefaultShape=function(){return new L1e},e.prototype.buildPath=function(t,i){var n=Math.cos,a=Math.sin,s=i.r,o=i.width,l=i.angle,u=i.x-n(l)*o*(o>=s/3?1:2),c=i.y-a(l)*o*(o>=s/3?1:2);l=i.angle-Math.PI/2,t.moveTo(u,c),t.lineTo(i.x+n(l)*o,i.y+a(l)*o),t.lineTo(i.x+n(i.angle)*s,i.y+a(i.angle)*s),t.lineTo(i.x-n(l)*o,i.y-a(l)*o),t.lineTo(u,c)},e}(Je);function R1e(r,e){var t=r.get("center"),i=e.getWidth(),n=e.getHeight(),a=Math.min(i,n),s=ce(t[0],e.getWidth()),o=ce(t[1],e.getHeight()),l=ce(r.get("radius"),a/2);return{cx:s,cy:o,r:l}}function uy(r,e){var t=r==null?"":r+"";return e&&(de(e)?t=e.replace("{value}",t):xe(e)&&(t=e(r))),t}var O1e=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,n){this.group.removeAll();var a=t.get(["axisLine","lineStyle","color"]),s=R1e(t,n);this._renderMain(t,i,n,a,s),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,i,n,a,s){var o=this.group,l=t.get("clockwise"),u=-t.get("startAngle")/180*Math.PI,c=-t.get("endAngle")/180*Math.PI,h=t.getModel("axisLine"),d=h.get("roundCap"),f=d?g_:di,p=h.get("show"),v=h.getModel("lineStyle"),g=v.get("width"),m=[u,c];ED(m,!l),u=m[0],c=m[1];for(var y=c-u,_=u,b=[],T=0;p&&T<a.length;T++){var x=Math.min(Math.max(a[T][0],0),1);c=u+y*x;var C=new f({shape:{startAngle:_,endAngle:c,cx:s.cx,cy:s.cy,clockwise:l,r0:s.r-g,r:s.r},silent:!0});C.setStyle({fill:a[T][1]}),C.setStyle(v.getLineStyle(["color","width"])),b.push(C),_=c}b.reverse(),R(b,function(I){return o.add(I)});var D=function(I){if(I<=0)return a[0][1];var M;for(M=0;M<a.length;M++)if(a[M][0]>=I&&(M===0?0:a[M-1][0])<I)return a[M][1];return a[M-1][1]};this._renderTicks(t,i,n,D,s,u,c,l,g),this._renderTitleAndDetail(t,i,n,D,s),this._renderAnchor(t,s),this._renderPointer(t,i,n,D,s,u,c,l,g)},e.prototype._renderTicks=function(t,i,n,a,s,o,l,u,c){for(var h=this.group,d=s.cx,f=s.cy,p=s.r,v=+t.get("min"),g=+t.get("max"),m=t.getModel("splitLine"),y=t.getModel("axisTick"),_=t.getModel("axisLabel"),b=t.get("splitNumber"),T=y.get("splitNumber"),x=ce(m.get("length"),p),C=ce(y.get("length"),p),D=o,I=(l-o)/b,M=I/T,L=m.getModel("lineStyle").getLineStyle(),N=y.getModel("lineStyle").getLineStyle(),O=m.get("distance"),B,F,U=0;U<=b;U++){if(B=Math.cos(D),F=Math.sin(D),m.get("show")){var $=O?O+c:c,q=new Ar({shape:{x1:B*(p-$)+d,y1:F*(p-$)+f,x2:B*(p-x-$)+d,y2:F*(p-x-$)+f},style:L,silent:!0});L.stroke==="auto"&&q.setStyle({stroke:a(U/b)}),h.add(q)}if(_.get("show")){var $=_.get("distance")+O,Z=uy(Yt(U/b*(g-v)+v),_.get("formatter")),te=a(U/b),J=B*(p-x-$)+d,oe=F*(p-x-$)+f,he=_.get("rotate"),ue=0;he==="radial"?(ue=-D+2*Math.PI,ue>Math.PI/2&&(ue+=Math.PI)):he==="tangential"?ue=-D-Math.PI/2:ut(he)&&(ue=he*Math.PI/180),ue===0?h.add(new nt({style:Mt(_,{text:Z,x:J,y:oe,verticalAlign:F<-.8?"top":F>.8?"bottom":"middle",align:B<-.4?"left":B>.4?"right":"center"},{inheritColor:te}),silent:!0})):h.add(new nt({style:Mt(_,{text:Z,x:J,y:oe,verticalAlign:"middle",align:"center"},{inheritColor:te}),silent:!0,originX:J,originY:oe,rotation:ue}))}if(y.get("show")&&U!==b){var $=y.get("distance");$=$?$+c:c;for(var Ie=0;Ie<=T;Ie++){B=Math.cos(D),F=Math.sin(D);var Oe=new Ar({shape:{x1:B*(p-$)+d,y1:F*(p-$)+f,x2:B*(p-C-$)+d,y2:F*(p-C-$)+f},silent:!0,style:N});N.stroke==="auto"&&Oe.setStyle({stroke:a((U+Ie/T)/b)}),h.add(Oe),D+=M}D-=M}else D+=I}},e.prototype._renderPointer=function(t,i,n,a,s,o,l,u,c){var h=this.group,d=this._data,f=this._progressEls,p=[],v=t.get(["pointer","show"]),g=t.getModel("progress"),m=g.get("show"),y=t.getData(),_=y.mapDimension("value"),b=+t.get("min"),T=+t.get("max"),x=[b,T],C=[o,l];function D(M,L){var N=y.getItemModel(M),O=N.getModel("pointer"),B=ce(O.get("width"),s.r),F=ce(O.get("length"),s.r),U=t.get(["pointer","icon"]),$=O.get("offsetCenter"),q=ce($[0],s.r),Z=ce($[1],s.r),te=O.get("keepAspect"),J;return U?J=cr(U,q-B/2,Z-F,B,F,null,te):J=new k1e({shape:{angle:-Math.PI/2,width:B,r:F,x:q,y:Z}}),J.rotation=-(L+Math.PI/2),J.x=s.cx,J.y=s.cy,J}function I(M,L){var N=g.get("roundCap"),O=N?g_:di,B=g.get("overlap"),F=B?g.get("width"):c/y.count(),U=B?s.r-F:s.r-(M+1)*F,$=B?s.r:s.r-M*F,q=new O({shape:{startAngle:o,endAngle:L,cx:s.cx,cy:s.cy,clockwise:u,r0:U,r:$}});return B&&(q.z2=T-y.get(_,M)%T),q}(m||v)&&(y.diff(d).add(function(M){var L=y.get(_,M);if(v){var N=D(M,o);Bt(N,{rotation:-((isNaN(+L)?C[0]:yt(L,x,C,!0))+Math.PI/2)},t),h.add(N),y.setItemGraphicEl(M,N)}if(m){var O=I(M,o),B=g.get("clip");Bt(O,{shape:{endAngle:yt(L,x,C,B)}},t),h.add(O),v2(t.seriesIndex,y.dataType,M,O),p[M]=O}}).update(function(M,L){var N=y.get(_,M);if(v){var O=d.getItemGraphicEl(L),B=O?O.rotation:o,F=D(M,B);F.rotation=B,ct(F,{rotation:-((isNaN(+N)?C[0]:yt(N,x,C,!0))+Math.PI/2)},t),h.add(F),y.setItemGraphicEl(M,F)}if(m){var U=f[L],$=U?U.shape.endAngle:o,q=I(M,$),Z=g.get("clip");ct(q,{shape:{endAngle:yt(N,x,C,Z)}},t),h.add(q),v2(t.seriesIndex,y.dataType,M,q),p[M]=q}}).execute(),y.each(function(M){var L=y.getItemModel(M),N=L.getModel("emphasis"),O=N.get("focus"),B=N.get("blurScope"),F=N.get("disabled");if(v){var U=y.getItemGraphicEl(M),$=y.getItemVisual(M,"style"),q=$.fill;if(U instanceof Ur){var Z=U.style;U.useStyle(Q({image:Z.image,x:Z.x,y:Z.y,width:Z.width,height:Z.height},$))}else U.useStyle($),U.type!=="pointer"&&U.setColor(q);U.setStyle(L.getModel(["pointer","itemStyle"]).getItemStyle()),U.style.fill==="auto"&&U.setStyle("fill",a(yt(y.get(_,M),x,[0,1],!0))),U.z2EmphasisLift=0,ei(U,L),Kt(U,O,B,F)}if(m){var te=p[M];te.useStyle(y.getItemVisual(M,"style")),te.setStyle(L.getModel(["progress","itemStyle"]).getItemStyle()),te.z2EmphasisLift=0,ei(te,L),Kt(te,O,B,F)}}),this._progressEls=p)},e.prototype._renderAnchor=function(t,i){var n=t.getModel("anchor"),a=n.get("show");if(a){var s=n.get("size"),o=n.get("icon"),l=n.get("offsetCenter"),u=n.get("keepAspect"),c=cr(o,i.cx-s/2+ce(l[0],i.r),i.cy-s/2+ce(l[1],i.r),s,s,null,u);c.z2=n.get("showAbove")?1:0,c.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(c)}},e.prototype._renderTitleAndDetail=function(t,i,n,a,s){var o=this,l=t.getData(),u=l.mapDimension("value"),c=+t.get("min"),h=+t.get("max"),d=new Le,f=[],p=[],v=t.isAnimationEnabled(),g=t.get(["pointer","showAbove"]);l.diff(this._data).add(function(m){f[m]=new nt({silent:!0}),p[m]=new nt({silent:!0})}).update(function(m,y){f[m]=o._titleEls[y],p[m]=o._detailEls[y]}).execute(),l.each(function(m){var y=l.getItemModel(m),_=l.get(u,m),b=new Le,T=a(yt(_,[c,h],[0,1],!0)),x=y.getModel("title");if(x.get("show")){var C=x.get("offsetCenter"),D=s.cx+ce(C[0],s.r),I=s.cy+ce(C[1],s.r),M=f[m];M.attr({z2:g?0:2,style:Mt(x,{x:D,y:I,text:l.getName(m),align:"center",verticalAlign:"middle"},{inheritColor:T})}),b.add(M)}var L=y.getModel("detail");if(L.get("show")){var N=L.get("offsetCenter"),O=s.cx+ce(N[0],s.r),B=s.cy+ce(N[1],s.r),F=ce(L.get("width"),s.r),U=ce(L.get("height"),s.r),$=t.get(["progress","show"])?l.getItemVisual(m,"style").fill:T,M=p[m],q=L.get("formatter");M.attr({z2:g?0:2,style:Mt(L,{x:O,y:B,text:uy(_,q),width:isNaN(F)?null:F,height:isNaN(U)?null:U,align:"center",verticalAlign:"middle"},{inheritColor:$})}),zH(M,{normal:L},_,function(te){return uy(te,q)}),v&&GH(M,m,l,t,{getFormattedLabel:function(te,J,oe,he,ue,Ie){return uy(Ie?Ie.interpolatedValue:_,q)}}),b.add(M)}d.add(b)}),this.group.add(d),this._titleEls=f,this._detailEls=p},e.type="gauge",e}(Tt),N1e=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="itemStyle",t}return e.prototype.getInitialData=function(t,i){return id(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(Ct);function B1e(r){r.registerChartView(O1e),r.registerSeriesModel(N1e)}var F1e=["itemStyle","opacity"],U1e=function(r){j(e,r);function e(t,i){var n=r.call(this)||this,a=n,s=new mi,o=new nt;return a.setTextContent(o),n.setTextGuideLine(s),n.updateData(t,i,!0),n}return e.prototype.updateData=function(t,i,n){var a=this,s=t.hostModel,o=t.getItemModel(i),l=t.getItemLayout(i),u=o.getModel("emphasis"),c=o.get(F1e);c=c??1,n||Ia(a),a.useStyle(t.getItemVisual(i,"style")),a.style.lineJoin="round",n?(a.setShape({points:l.points}),a.style.opacity=0,Bt(a,{style:{opacity:c}},s,i)):ct(a,{style:{opacity:c},shape:{points:l.points}},s,i),ei(a,o),this._updateLabel(t,i),Kt(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,i){var n=this,a=this.getTextGuideLine(),s=n.getTextContent(),o=t.hostModel,l=t.getItemModel(i),u=t.getItemLayout(i),c=u.label,h=t.getItemVisual(i,"style"),d=h.fill;ti(s,Br(l),{labelFetcher:t.hostModel,labelDataIndex:i,defaultOpacity:h.opacity,defaultText:t.getName(i)},{normal:{align:c.textAlign,verticalAlign:c.verticalAlign}}),n.setTextConfig({local:!0,inside:!!c.inside,insideStroke:d,outsideFill:d});var f=c.linePoints;a.setShape({points:f}),n.textGuideLineConfig={anchor:f?new $e(f[0][0],f[0][1]):null},ct(s,{style:{x:c.x,y:c.y}},o,i),s.attr({rotation:c.rotation,originX:c.x,originY:c.y,z2:10}),CE(n,AE(l),{stroke:d})},e}(pi),V1e=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreLabelLineUpdate=!0,t}return e.prototype.render=function(t,i,n){var a=t.getData(),s=this._data,o=this.group;a.diff(s).add(function(l){var u=new U1e(a,l);a.setItemGraphicEl(l,u),o.add(u)}).update(function(l,u){var c=s.getItemGraphicEl(u);c.updateData(a,l),o.add(c),a.setItemGraphicEl(l,c)}).remove(function(l){var u=s.getItemGraphicEl(l);kv(u,t,l)}).execute(),this._data=a},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(Tt),z1e=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new Lg(ge(this.getData,this),ge(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.getInitialData=function(t,i){return id(this,{coordDimensions:["value"],encodeDefaulter:Be(ZD,this)})},e.prototype._defaultLabelLine=function(t){ac(t,"labelLine",["show"]);var i=t.labelLine,n=t.emphasis.labelLine;i.show=i.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.prototype.getDataParams=function(t){var i=this.getData(),n=r.prototype.getDataParams.call(this,t),a=i.mapDimension("value"),s=i.getSum(a);return n.percent=s?+(i.get(a,t)/s*100).toFixed(2):0,n.$vars.push("percent"),n},e.type="series.funnel",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(Ct);function G1e(r,e){return br(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function H1e(r,e){for(var t=r.mapDimension("value"),i=r.mapArray(t,function(l){return l}),n=[],a=e==="ascending",s=0,o=r.count();s<o;s++)n[s]=s;return xe(e)?n.sort(e):e!=="none"&&n.sort(function(l,u){return a?i[l]-i[u]:i[u]-i[l]}),n}function $1e(r){var e=r.hostModel,t=e.get("orient");r.each(function(i){var n=r.getItemModel(i),a=n.getModel("label"),s=a.get("position"),o=n.getModel("labelLine"),l=r.getItemLayout(i),u=l.points,c=s==="inner"||s==="inside"||s==="center"||s==="insideLeft"||s==="insideRight",h,d,f,p;if(c)s==="insideLeft"?(d=(u[0][0]+u[3][0])/2+5,f=(u[0][1]+u[3][1])/2,h="left"):s==="insideRight"?(d=(u[1][0]+u[2][0])/2-5,f=(u[1][1]+u[2][1])/2,h="right"):(d=(u[0][0]+u[1][0]+u[2][0]+u[3][0])/4,f=(u[0][1]+u[1][1]+u[2][1]+u[3][1])/4,h="center"),p=[[d,f],[d,f]];else{var v=void 0,g=void 0,m=void 0,y=void 0,_=o.get("length");s==="left"?(v=(u[3][0]+u[0][0])/2,g=(u[3][1]+u[0][1])/2,m=v-_,d=m-5,h="right"):s==="right"?(v=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,m=v+_,d=m+5,h="left"):s==="top"?(v=(u[3][0]+u[0][0])/2,g=(u[3][1]+u[0][1])/2,y=g-_,f=y-5,h="center"):s==="bottom"?(v=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,y=g+_,f=y+5,h="center"):s==="rightTop"?(v=t==="horizontal"?u[3][0]:u[1][0],g=t==="horizontal"?u[3][1]:u[1][1],t==="horizontal"?(y=g-_,f=y-5,h="center"):(m=v+_,d=m+5,h="top")):s==="rightBottom"?(v=u[2][0],g=u[2][1],t==="horizontal"?(y=g+_,f=y+5,h="center"):(m=v+_,d=m+5,h="bottom")):s==="leftTop"?(v=u[0][0],g=t==="horizontal"?u[0][1]:u[1][1],t==="horizontal"?(y=g-_,f=y-5,h="center"):(m=v-_,d=m-5,h="right")):s==="leftBottom"?(v=t==="horizontal"?u[1][0]:u[3][0],g=t==="horizontal"?u[1][1]:u[2][1],t==="horizontal"?(y=g+_,f=y+5,h="center"):(m=v-_,d=m-5,h="right")):(v=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,t==="horizontal"?(y=g+_,f=y+5,h="center"):(m=v+_,d=m+5,h="left")),t==="horizontal"?(m=v,d=m):(y=g,f=y),p=[[v,g],[m,y]]}l.label={linePoints:p,x:d,y:f,verticalAlign:"middle",textAlign:h,inside:c}})}function W1e(r,e){r.eachSeriesByType("funnel",function(t){var i=t.getData(),n=i.mapDimension("value"),a=t.get("sort"),s=G1e(t,e),o=t.get("orient"),l=s.width,u=s.height,c=H1e(i,a),h=s.x,d=s.y,f=o==="horizontal"?[ce(t.get("minSize"),u),ce(t.get("maxSize"),u)]:[ce(t.get("minSize"),l),ce(t.get("maxSize"),l)],p=i.getDataExtent(n),v=t.get("min"),g=t.get("max");v==null&&(v=Math.min(p[0],0)),g==null&&(g=p[1]);var m=t.get("funnelAlign"),y=t.get("gap"),_=o==="horizontal"?l:u,b=(_-y*(i.count()-1))/i.count(),T=function(B,F){if(o==="horizontal"){var U=i.get(n,B)||0,$=yt(U,[v,g],f,!0),q=void 0;switch(m){case"top":q=d;break;case"center":q=d+(u-$)/2;break;case"bottom":q=d+(u-$);break}return[[F,q],[F,q+$]]}var Z=i.get(n,B)||0,te=yt(Z,[v,g],f,!0),J;switch(m){case"left":J=h;break;case"center":J=h+(l-te)/2;break;case"right":J=h+l-te;break}return[[J,F],[J+te,F]]};a==="ascending"&&(b=-b,y=-y,o==="horizontal"?h+=l:d+=u,c=c.reverse());for(var x=0;x<c.length;x++){var C=c[x],D=c[x+1],I=i.getItemModel(C);if(o==="horizontal"){var M=I.get(["itemStyle","width"]);M==null?M=b:(M=ce(M,l),a==="ascending"&&(M=-M));var L=T(C,h),N=T(D,h+M);h+=M+y,i.setItemLayout(C,{points:L.concat(N.slice().reverse())})}else{var O=I.get(["itemStyle","height"]);O==null?O=b:(O=ce(O,u),a==="ascending"&&(O=-O));var L=T(C,d),N=T(D,d+O);d+=O+y,i.setItemLayout(C,{points:L.concat(N.slice().reverse())})}}$1e(i)})}function q1e(r){r.registerChartView(V1e),r.registerSeriesModel(z1e),r.registerLayout(W1e),r.registerProcessor(Mg("funnel"))}var j1e=.3,X1e=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._dataGroup=new Le,t._initialized=!1,t}return e.prototype.init=function(){this.group.add(this._dataGroup)},e.prototype.render=function(t,i,n,a){this._progressiveEls=null;var s=this._dataGroup,o=t.getData(),l=this._data,u=t.coordinateSystem,c=u.dimensions,h=yB(t);o.diff(l).add(d).update(f).remove(p).execute();function d(g){var m=mB(o,s,g,c,u);rx(m,o,g,h)}function f(g,m){var y=l.getItemGraphicEl(m),_=dj(o,g,c,u);o.setItemGraphicEl(g,y),ct(y,{shape:{points:_}},t,g),Ia(y),rx(y,o,g,h)}function p(g){var m=l.getItemGraphicEl(g);s.remove(m)}if(!this._initialized){this._initialized=!0;var v=Y1e(u,t,function(){setTimeout(function(){s.removeClipPath()})});s.setClipPath(v)}this._data=o},e.prototype.incrementalPrepareRender=function(t,i,n){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},e.prototype.incrementalRender=function(t,i,n){for(var a=i.getData(),s=i.coordinateSystem,o=s.dimensions,l=yB(i),u=this._progressiveEls=[],c=t.start;c<t.end;c++){var h=mB(a,this._dataGroup,c,o,s);h.incremental=!0,rx(h,a,c,l),u.push(h)}},e.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},e.type="parallel",e}(Tt);function Y1e(r,e,t){var i=r.model,n=r.getRect(),a=new at({shape:{x:n.x,y:n.y,width:n.width,height:n.height}}),s=i.get("layout")==="horizontal"?"width":"height";return a.setShape(s,0),Bt(a,{shape:{width:n.width,height:n.height}},e,t),a}function dj(r,e,t,i){for(var n=[],a=0;a<t.length;a++){var s=t[a],o=r.get(r.mapDimension(s),e);K1e(o,i.getAxis(s).type)||n.push(i.dataToPoint(o,s))}return n}function mB(r,e,t,i,n){var a=dj(r,t,i,n),s=new mi({shape:{points:a},z2:10});return e.add(s),r.setItemGraphicEl(t,s),s}function yB(r){var e=r.get("smooth",!0);return e===!0&&(e=j1e),e=vs(e),gf(e)&&(e=0),{smooth:e}}function rx(r,e,t,i){r.useStyle(e.getItemVisual(t,"style")),r.style.fill=null,r.setShape("smooth",i.smooth);var n=e.getItemModel(t),a=n.getModel("emphasis");ei(r,n,"lineStyle"),Kt(r,a.get("focus"),a.get("blurScope"),a.get("disabled"))}function K1e(r,e){return e==="category"?r==null:r==null||isNaN(r)}var Z1e=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="lineStyle",t.visualDrawType="stroke",t}return e.prototype.getInitialData=function(t,i){return _s(null,this,{useEncodeDefaulter:ge(Q1e,null,this)})},e.prototype.getRawIndicesByActiveState=function(t){var i=this.coordinateSystem,n=this.getData(),a=[];return i.eachActiveState(n,function(s,o){t===s&&a.push(n.getRawIndex(o))}),a},e.type="series.parallel",e.dependencies=["parallel"],e.defaultOption={z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"},e}(Ct);function Q1e(r){var e=r.ecModel.getComponent("parallel",r.get("parallelIndex"));if(e){var t={};return R(e.dimensions,function(i){var n=J1e(i);t[i]=n}),t}}function J1e(r){return+r.replace("dim","")}var ebe=["lineStyle","opacity"],tbe={seriesType:"parallel",reset:function(r,e){var t=r.coordinateSystem,i={normal:r.get(["lineStyle","opacity"]),active:r.get("activeOpacity"),inactive:r.get("inactiveOpacity")};return{progress:function(n,a){t.eachActiveState(a,function(s,o){var l=i[s];if(s==="normal"&&a.hasItemOption){var u=a.getItemModel(o).get(ebe,!0);u!=null&&(l=u)}var c=a.ensureUniqueItemVisual(o,"style");c.opacity=l},n.start,n.end)}}}};function rbe(r){ibe(r),nbe(r)}function ibe(r){if(!r.parallel){var e=!1;R(r.series,function(t){t&&t.type==="parallel"&&(e=!0)}),e&&(r.parallel=[{}])}}function nbe(r){var e=wt(r.parallelAxis);R(e,function(t){if(Ae(t)){var i=t.parallelIndex||0,n=wt(r.parallel)[i];n&&n.parallelAxisDefault&&He(t,n.parallelAxisDefault,!1)}})}var abe=5,sbe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,n){this._model=t,this._api=n,this._handlers||(this._handlers={},R(obe,function(a,s){n.getZr().on(s,this._handlers[s]=ge(a,this))},this)),Qf(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},e.prototype.dispose=function(t,i){Bv(this,"_throttledDispatchExpand"),R(this._handlers,function(n,a){i.getZr().off(a,n)}),this._handlers=null},e.prototype._throttledDispatchExpand=function(t){this._dispatchExpand(t)},e.prototype._dispatchExpand=function(t){t&&this._api.dispatchAction(Q({type:"parallelAxisExpand"},t))},e.type="parallel",e}(Nt),obe={mousedown:function(r){ix(this,"click")&&(this._mouseDownPoint=[r.offsetX,r.offsetY])},mouseup:function(r){var e=this._mouseDownPoint;if(ix(this,"click")&&e){var t=[r.offsetX,r.offsetY],i=Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2);if(i>abe)return;var n=this._model.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]);n.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:n.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(r){if(!(this._mouseDownPoint||!ix(this,"mousemove"))){var e=this._model,t=e.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]),i=t.behavior;i==="jump"&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand(i==="none"?null:{axisExpandWindow:t.axisExpandWindow,animation:i==="jump"?null:{duration:0}})}}};function ix(r,e){var t=r._model;return t.get("axisExpandable")&&t.get("axisExpandTriggerOn")===e}var lbe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){r.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){var i=this.option;t&&He(i,t,!0),this._initDimensions()},e.prototype.contains=function(t,i){var n=t.get("parallelIndex");return n!=null&&i.getComponent("parallel",n)===this},e.prototype.setAxisExpand=function(t){R(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(i){t.hasOwnProperty(i)&&(this.option[i]=t[i])},this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],i=this.parallelAxisIndex=[],n=_t(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(a){return(a.get("parallelIndex")||0)===this.componentIndex},this);R(n,function(a){t.push("dim"+a.get("dim")),i.push(a.componentIndex)})},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e}(Qe),ube=function(r){j(e,r);function e(t,i,n,a,s){var o=r.call(this,t,i,n)||this;return o.type=a||"value",o.axisIndex=s,o}return e.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},e}(aa);function Tc(r,e,t,i,n,a){r=r||0;var s=t[1]-t[0];if(n!=null&&(n=nh(n,[0,s])),a!=null&&(a=Math.max(a,n??0)),i==="all"){var o=Math.abs(e[1]-e[0]);o=nh(o,[0,s]),n=a=nh(o,[n,a]),i=0}e[0]=nh(e[0],t),e[1]=nh(e[1],t);var l=nx(e,i);e[i]+=r;var u=n||0,c=t.slice();l.sign<0?c[0]+=u:c[1]-=u,e[i]=nh(e[i],c);var h;return h=nx(e,i),n!=null&&(h.sign!==l.sign||h.span<n)&&(e[1-i]=e[i]+l.sign*n),h=nx(e,i),a!=null&&h.span>a&&(e[1-i]=e[i]+h.sign*a),e}function nx(r,e){var t=r[e]-r[1-e];return{span:Math.abs(t),sign:t>0?-1:t<0?1:e?-1:1}}function nh(r,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,r))}var ax=R,pj=Math.min,vj=Math.max,_B=Math.floor,cbe=Math.ceil,bB=Yt,hbe=Math.PI,fbe=function(){function r(e,t,i){this.type="parallel",this._axesMap=be(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,t,i)}return r.prototype._init=function(e,t,i){var n=e.dimensions,a=e.parallelAxisIndex;ax(n,function(s,o){var l=a[o],u=t.getComponent("parallelAxis",l),c=this._axesMap.set(s,new ube(s,Ag(u),[0,0],u.get("type"),l)),h=c.type==="category";c.onBand=h&&u.get("boundaryGap"),c.inverse=u.get("inverse"),u.axis=c,c.model=u,c.coordinateSystem=u.coordinateSystem=this},this)},r.prototype.update=function(e,t){this._updateAxesFromSeries(this._model,e)},r.prototype.containPoint=function(e){var t=this._makeLayoutInfo(),i=t.axisBase,n=t.layoutBase,a=t.pixelDimIndex,s=e[1-a],o=e[a];return s>=i&&s<=i+t.axisLength&&o>=n&&o<=n+t.layoutLength},r.prototype.getModel=function(){return this._model},r.prototype._updateAxesFromSeries=function(e,t){t.eachSeries(function(i){if(e.contains(i,t)){var n=i.getData();ax(this.dimensions,function(a){var s=this._axesMap.get(a);s.scale.unionExtentFromData(n,n.mapDimension(a)),cc(s.scale,s.model)},this)}},this)},r.prototype.resize=function(e,t){this._rect=br(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),this._layoutAxes()},r.prototype.getRect=function(){return this._rect},r.prototype._makeLayoutInfo=function(){var e=this._model,t=this._rect,i=["x","y"],n=["width","height"],a=e.get("layout"),s=a==="horizontal"?0:1,o=t[n[s]],l=[0,o],u=this.dimensions.length,c=cy(e.get("axisExpandWidth"),l),h=cy(e.get("axisExpandCount")||0,[0,u]),d=e.get("axisExpandable")&&u>3&&u>h&&h>1&&c>0&&o>0,f=e.get("axisExpandWindow"),p;if(f)p=cy(f[1]-f[0],l),f[1]=f[0]+p;else{p=cy(c*(h-1),l);var v=e.get("axisExpandCenter")||_B(u/2);f=[c*v-p/2],f[1]=f[0]+p}var g=(o-p)/(u-h);g<3&&(g=0);var m=[_B(bB(f[0]/c,1))+1,cbe(bB(f[1]/c,1))-1],y=g/c*f[0];return{layout:a,pixelDimIndex:s,layoutBase:t[i[s]],layoutLength:o,axisBase:t[i[1-s]],axisLength:t[n[1-s]],axisExpandable:d,axisExpandWidth:c,axisCollapseWidth:g,axisExpandWindow:f,axisCount:u,winInnerIndices:m,axisExpandWindow0Pos:y}},r.prototype._layoutAxes=function(){var e=this._rect,t=this._axesMap,i=this.dimensions,n=this._makeLayoutInfo(),a=n.layout;t.each(function(s){var o=[0,n.axisLength],l=s.inverse?1:0;s.setExtent(o[l],o[1-l])}),ax(i,function(s,o){var l=(n.axisExpandable?pbe:dbe)(o,n),u={horizontal:{x:l.position,y:n.axisLength},vertical:{x:0,y:l.position}},c={horizontal:hbe/2,vertical:0},h=[u[a].x+e.x,u[a].y+e.y],d=c[a],f=Ji();vl(f,f,d),Da(f,f,h),this._axesLayout[s]={position:h,rotation:d,transform:f,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},r.prototype.getAxis=function(e){return this._axesMap.get(e)},r.prototype.dataToPoint=function(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)},r.prototype.eachActiveState=function(e,t,i,n){i==null&&(i=0),n==null&&(n=e.count());var a=this._axesMap,s=this.dimensions,o=[],l=[];R(s,function(g){o.push(e.mapDimension(g)),l.push(a.get(g).model)});for(var u=this.hasAxisBrushed(),c=i;c<n;c++){var h=void 0;if(!u)h="normal";else{h="active";for(var d=e.getValues(o,c),f=0,p=s.length;f<p;f++){var v=l[f].getActiveState(d[f]);if(v==="inactive"){h="inactive";break}}}t(h,c)}},r.prototype.hasAxisBrushed=function(){for(var e=this.dimensions,t=this._axesMap,i=!1,n=0,a=e.length;n<a;n++)t.get(e[n]).model.getActiveState()!=="normal"&&(i=!0);return i},r.prototype.axisCoordToPoint=function(e,t){var i=this._axesLayout[t];return Ca([e,0],i.transform)},r.prototype.getAxisLayout=function(e){return Ee(this._axesLayout[e])},r.prototype.getSlidedAxisExpandWindow=function(e){var t=this._makeLayoutInfo(),i=t.pixelDimIndex,n=t.axisExpandWindow.slice(),a=n[1]-n[0],s=[0,t.axisExpandWidth*(t.axisCount-1)];if(!this.containPoint(e))return{behavior:"none",axisExpandWindow:n};var o=e[i]-t.layoutBase-t.axisExpandWindow0Pos,l,u="slide",c=t.axisCollapseWidth,h=this._model.get("axisExpandSlideTriggerArea"),d=h[0]!=null;if(c)d&&c&&o<a*h[0]?(u="jump",l=o-a*h[2]):d&&c&&o>a*(1-h[0])?(u="jump",l=o-a*(1-h[2])):(l=o-a*h[1])>=0&&(l=o-a*(1-h[1]))<=0&&(l=0),l*=t.axisExpandWidth/c,l?Tc(l,n,s,"all"):u="none";else{var f=n[1]-n[0],p=s[1]*o/f;n=[vj(0,p-f/2)],n[1]=pj(s[1],n[0]+f),n[0]=n[1]-f}return{axisExpandWindow:n,behavior:u}},r}();function cy(r,e){return pj(vj(r,e[0]),e[1])}function dbe(r,e){var t=e.layoutLength/(e.axisCount-1);return{position:t*r,axisNameAvailableWidth:t,axisLabelShow:!0}}function pbe(r,e){var t=e.layoutLength,i=e.axisExpandWidth,n=e.axisCount,a=e.axisCollapseWidth,s=e.winInnerIndices,o,l=a,u=!1,c;return r<s[0]?(o=r*a,c=a):r<=s[1]?(o=e.axisExpandWindow0Pos+r*i-e.axisExpandWindow[0],l=i,u=!0):(o=t-(n-1-r)*a,c=a),{position:o,axisNameAvailableWidth:l,axisLabelShow:u,nameTruncateMaxWidth:c}}function vbe(r,e){var t=[];return r.eachComponent("parallel",function(i,n){var a=new fbe(i,r,e);a.name="parallel_"+n,a.resize(i,e),i.coordinateSystem=a,a.model=i,t.push(a)}),r.eachSeries(function(i){if(i.get("coordinateSystem")==="parallel"){var n=i.getReferringComponents("parallel",_r).models[0];i.coordinateSystem=n.coordinateSystem}}),t}var gbe={create:vbe},sC=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.activeIntervals=[],t}return e.prototype.getAreaSelectStyle=function(){return oc([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},e.prototype.setActiveIntervals=function(t){var i=this.activeIntervals=Ee(t);if(i)for(var n=i.length-1;n>=0;n--)mn(i[n])},e.prototype.getActiveState=function(t){var i=this.activeIntervals;if(!i.length)return"normal";if(t==null||isNaN(+t))return"inactive";if(i.length===1){var n=i[0];if(n[0]<=t&&t<=n[1])return"active"}else for(var a=0,s=i.length;a<s;a++)if(i[a][0]<=t&&t<=i[a][1])return"active";return"inactive"},e}(Qe);ir(sC,rd);var hc=!0,Yv=Math.min,wf=Math.max,mbe=Math.pow,ybe=1e4,_be=6,bbe=6,SB="globalPan",Sbe={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},Tbe={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},TB={brushStyle:{lineWidth:2,stroke:"rgba(210,219,238,0.3)",fill:"#D2DBEE"},transformable:!0,brushMode:"single",removeOnClick:!1},xbe=0,YE=function(r){j(e,r);function e(t){var i=r.call(this)||this;return i._track=[],i._covers=[],i._handlers={},i._zr=t,i.group=new Le,i._uid="brushController_"+xbe++,R(Pbe,function(n,a){this._handlers[a]=ge(n,this)},i),i}return e.prototype.enableBrush=function(t){return this._brushType&&this._doDisableBrush(),t.brushType&&this._doEnableBrush(t),this},e.prototype._doEnableBrush=function(t){var i=this._zr;this._enableGlobalPan||d0e(i,SB,this._uid),R(this._handlers,function(n,a){i.on(a,n)}),this._brushType=t.brushType,this._brushOption=He(Ee(TB),t,!0)},e.prototype._doDisableBrush=function(){var t=this._zr;p0e(t,SB,this._uid),R(this._handlers,function(i,n){t.off(n,i)}),this._brushType=this._brushOption=null},e.prototype.setPanels=function(t){if(t&&t.length){var i=this._panels={};R(t,function(n){i[n.panelId]=Ee(n)})}else this._panels=null;return this},e.prototype.mount=function(t){t=t||{},this._enableGlobalPan=t.enableGlobalPan;var i=this.group;return this._zr.add(i),i.attr({x:t.x||0,y:t.y||0,rotation:t.rotation||0,scaleX:t.scaleX||1,scaleY:t.scaleY||1}),this._transform=i.getLocalTransform(),this},e.prototype.updateCovers=function(t){t=ae(t,function(d){return He(Ee(TB),d,!0)});var i="\0-brush-index-",n=this._covers,a=this._covers=[],s=this,o=this._creatingCover;return new to(n,t,u,l).add(c).update(c).remove(h).execute(),this;function l(d,f){return(d.id!=null?d.id:i+f)+"-"+d.brushType}function u(d,f){return l(d.__brushOption,f)}function c(d,f){var p=t[d];if(f!=null&&n[f]===o)a[d]=n[f];else{var v=a[d]=f!=null?(n[f].__brushOption=p,n[f]):mj(s,gj(s,p));KE(s,v)}}function h(d){n[d]!==o&&s.group.remove(n[d])}},e.prototype.unmount=function(){return this.enableBrush(!1),oC(this),this._zr.remove(this.group),this},e.prototype.dispose=function(){this.unmount(),this.off()},e}(ta);function gj(r,e){var t=ib[e.brushType].createCover(r,e);return t.__brushOption=e,_j(t,e),r.group.add(t),t}function mj(r,e){var t=ZE(e);return t.endCreating&&(t.endCreating(r,e),_j(e,e.__brushOption)),e}function yj(r,e){var t=e.__brushOption;ZE(e).updateCoverShape(r,e,t.range,t)}function _j(r,e){var t=e.z;t==null&&(t=ybe),r.traverse(function(i){i.z=t,i.z2=t})}function KE(r,e){ZE(e).updateCommon(r,e),yj(r,e)}function ZE(r){return ib[r.__brushOption.brushType]}function QE(r,e,t){var i=r._panels;if(!i)return hc;var n,a=r._transform;return R(i,function(s){s.isTargetByCursor(e,t,a)&&(n=s)}),n}function bj(r,e){var t=r._panels;if(!t)return hc;var i=e.__brushOption.panelId;return i!=null?t[i]:hc}function oC(r){var e=r._covers,t=e.length;return R(e,function(i){r.group.remove(i)},r),e.length=0,!!t}function fc(r,e){var t=ae(r._covers,function(i){var n=i.__brushOption,a=Ee(n.range);return{brushType:n.brushType,panelId:n.panelId,range:a}});r.trigger("brush",{areas:t,isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function wbe(r){var e=r._track;if(!e.length)return!1;var t=e[e.length-1],i=e[0],n=t[0]-i[0],a=t[1]-i[1],s=mbe(n*n+a*a,.5);return s>_be}function Sj(r){var e=r.length-1;return e<0&&(e=0),[r[0],r[e]]}function Tj(r,e,t,i){var n=new Le;return n.add(new at({name:"main",style:JE(t),silent:!0,draggable:!0,cursor:"move",drift:Be(xB,r,e,n,["n","s","w","e"]),ondragend:Be(fc,e,{isEnd:!0})})),R(i,function(a){n.add(new at({name:a.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:Be(xB,r,e,n,a),ondragend:Be(fc,e,{isEnd:!0})}))}),n}function xj(r,e,t,i){var n=i.brushStyle.lineWidth||0,a=wf(n,bbe),s=t[0][0],o=t[1][0],l=s-n/2,u=o-n/2,c=t[0][1],h=t[1][1],d=c-a+n/2,f=h-a+n/2,p=c-s,v=h-o,g=p+n,m=v+n;As(r,e,"main",s,o,p,v),i.transformable&&(As(r,e,"w",l,u,a,m),As(r,e,"e",d,u,a,m),As(r,e,"n",l,u,g,a),As(r,e,"s",l,f,g,a),As(r,e,"nw",l,u,a,a),As(r,e,"ne",d,u,a,a),As(r,e,"sw",l,f,a,a),As(r,e,"se",d,f,a,a))}function lC(r,e){var t=e.__brushOption,i=t.transformable,n=e.childAt(0);n.useStyle(JE(t)),n.attr({silent:!i,cursor:i?"move":"default"}),R([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(a){var s=e.childOfName(a.join("")),o=a.length===1?uC(r,a[0]):Abe(r,a);s&&s.attr({silent:!i,invisible:!i,cursor:i?Tbe[o]+"-resize":null})})}function As(r,e,t,i,n,a,s){var o=e.childOfName(t);o&&o.setShape(Ebe(eI(r,e,[[i,n],[i+a,n+s]])))}function JE(r){return Ce({strokeNoScale:!0},r.brushStyle)}function wj(r,e,t,i){var n=[Yv(r,t),Yv(e,i)],a=[wf(r,t),wf(e,i)];return[[n[0],a[0]],[n[1],a[1]]]}function Cbe(r){return Zo(r.group)}function uC(r,e){var t={w:"left",e:"right",n:"top",s:"bottom"},i={left:"w",right:"e",top:"n",bottom:"s"},n=O1(t[e],Cbe(r));return i[n]}function Abe(r,e){var t=[uC(r,e[0]),uC(r,e[1])];return(t[0]==="e"||t[0]==="w")&&t.reverse(),t.join("")}function xB(r,e,t,i,n,a){var s=t.__brushOption,o=r.toRectRange(s.range),l=Cj(e,n,a);R(i,function(u){var c=Sbe[u];o[c[0]][c[1]]+=l[c[0]]}),s.range=r.fromRectRange(wj(o[0][0],o[1][0],o[0][1],o[1][1])),KE(e,t),fc(e,{isEnd:!1})}function Dbe(r,e,t,i){var n=e.__brushOption.range,a=Cj(r,t,i);R(n,function(s){s[0]+=a[0],s[1]+=a[1]}),KE(r,e),fc(r,{isEnd:!1})}function Cj(r,e,t){var i=r.group,n=i.transformCoordToLocal(e,t),a=i.transformCoordToLocal(0,0);return[n[0]-a[0],n[1]-a[1]]}function eI(r,e,t){var i=bj(r,e);return i&&i!==hc?i.clipPath(t,r._transform):Ee(t)}function Ebe(r){var e=Yv(r[0][0],r[1][0]),t=Yv(r[0][1],r[1][1]),i=wf(r[0][0],r[1][0]),n=wf(r[0][1],r[1][1]);return{x:e,y:t,width:i-e,height:n-t}}function Ibe(r,e,t){if(!(!r._brushType||Mbe(r,e.offsetX,e.offsetY))){var i=r._zr,n=r._covers,a=QE(r,e,t);if(!r._dragging)for(var s=0;s<n.length;s++){var o=n[s].__brushOption;if(a&&(a===hc||o.panelId===a.panelId)&&ib[o.brushType].contain(n[s],t[0],t[1]))return}a&&i.setCursorStyle("crosshair")}}function cC(r){var e=r.event;e.preventDefault&&e.preventDefault()}function hC(r,e,t){return r.childOfName("main").contain(e,t)}function Aj(r,e,t,i){var n=r._creatingCover,a=r._creatingPanel,s=r._brushOption,o;if(r._track.push(t.slice()),wbe(r)||n){if(a&&!n){s.brushMode==="single"&&oC(r);var l=Ee(s);l.brushType=wB(l.brushType,a),l.panelId=a===hc?null:a.panelId,n=r._creatingCover=gj(r,l),r._covers.push(n)}if(n){var u=ib[wB(r._brushType,a)],c=n.__brushOption;c.range=u.getCreatingRange(eI(r,n,r._track)),i&&(mj(r,n),u.updateCommon(r,n)),yj(r,n),o={isEnd:i}}}else i&&s.brushMode==="single"&&s.removeOnClick&&QE(r,e,t)&&oC(r)&&(o={isEnd:i,removeOnClick:!0});return o}function wB(r,e){return r==="auto"?e.defaultBrushType:r}var Pbe={mousedown:function(r){if(this._dragging)CB(this,r);else if(!r.target||!r.target.draggable){cC(r);var e=this.group.transformCoordToLocal(r.offsetX,r.offsetY);this._creatingCover=null;var t=this._creatingPanel=QE(this,r,e);t&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(r){var e=r.offsetX,t=r.offsetY,i=this.group.transformCoordToLocal(e,t);if(Ibe(this,r,i),this._dragging){cC(r);var n=Aj(this,r,i,!1);n&&fc(this,n)}},mouseup:function(r){CB(this,r)}};function CB(r,e){if(r._dragging){cC(e);var t=e.offsetX,i=e.offsetY,n=r.group.transformCoordToLocal(t,i),a=Aj(r,e,n,!0);r._dragging=!1,r._track=[],r._creatingCover=null,a&&fc(r,a)}}function Mbe(r,e,t){var i=r._zr;return e<0||e>i.getWidth()||t<0||t>i.getHeight()}var ib={lineX:AB(0),lineY:AB(1),rect:{createCover:function(r,e){function t(i){return i}return Tj({toRectRange:t,fromRectRange:t},r,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(r){var e=Sj(r);return wj(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(r,e,t,i){xj(r,e,t,i)},updateCommon:lC,contain:hC},polygon:{createCover:function(r,e){var t=new Le;return t.add(new mi({name:"main",style:JE(e),silent:!0})),t},getCreatingRange:function(r){return r},endCreating:function(r,e){e.remove(e.childAt(0)),e.add(new pi({name:"main",draggable:!0,drift:Be(Dbe,r,e),ondragend:Be(fc,r,{isEnd:!0})}))},updateCoverShape:function(r,e,t,i){e.childAt(0).setShape({points:eI(r,e,t)})},updateCommon:lC,contain:hC}};function AB(r){return{createCover:function(e,t){return Tj({toRectRange:function(i){var n=[i,[0,100]];return r&&n.reverse(),n},fromRectRange:function(i){return i[r]}},e,t,[[["w"],["e"]],[["n"],["s"]]][r])},getCreatingRange:function(e){var t=Sj(e),i=Yv(t[0][r],t[1][r]),n=wf(t[0][r],t[1][r]);return[i,n]},updateCoverShape:function(e,t,i,n){var a,s=bj(e,t);if(s!==hc&&s.getLinearBrushOtherExtent)a=s.getLinearBrushOtherExtent(r);else{var o=e._zr;a=[0,[o.getWidth(),o.getHeight()][1-r]]}var l=[i,a];r&&l.reverse(),xj(e,t,l,n)},updateCommon:lC,contain:hC}}function Dj(r){return r=tI(r),function(e){return UD(e,r)}}function Ej(r,e){return r=tI(r),function(t){var i=e??t,n=i?r.width:r.height,a=i?r.x:r.y;return[a,a+(n||0)]}}function Ij(r,e,t){var i=tI(r);return function(n,a){return i.contain(a[0],a[1])&&!J1(n,e,t)}}function tI(r){return We.create(r)}var Lbe=["axisLine","axisTickLabel","axisName"],kbe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,i){r.prototype.init.apply(this,arguments),(this._brushController=new YE(i.getZr())).on("brush",ge(this._onBrush,this))},e.prototype.render=function(t,i,n,a){if(!Rbe(t,i,a)){this.axisModel=t,this.api=n,this.group.removeAll();var s=this._axisGroup;if(this._axisGroup=new Le,this.group.add(this._axisGroup),!!t.get("show")){var o=Nbe(t,i),l=o.coordinateSystem,u=t.getAreaSelectStyle(),c=u.width,h=t.axis.dim,d=l.getAxisLayout(h),f=Q({strokeContainThreshold:c},d),p=new ki(t,f);R(Lbe,p.add,p),this._axisGroup.add(p.getGroup()),this._refreshBrushController(f,u,t,o,c,n),xg(s,this._axisGroup,t)}}},e.prototype._refreshBrushController=function(t,i,n,a,s,o){var l=n.axis.getExtent(),u=l[1]-l[0],c=Math.min(30,Math.abs(u)*.1),h=We.create({x:l[0],y:-s/2,width:u,height:s});h.x-=c,h.width+=2*c,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,x:t.position[0],y:t.position[1]}).setPanels([{panelId:"pl",clipPath:Dj(h),isTargetByCursor:Ij(h,o,a),getLinearBrushOtherExtent:Ej(h,0)}]).enableBrush({brushType:"lineX",brushStyle:i,removeOnClick:!0}).updateCovers(Obe(n))},e.prototype._onBrush=function(t){var i=t.areas,n=this.axisModel,a=n.axis,s=ae(i,function(o){return[a.coordToData(o.range[0],!0),a.coordToData(o.range[1],!0)]});(!n.option.realtime===t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:n.id,intervals:s})},e.prototype.dispose=function(){this._brushController.dispose()},e.type="parallelAxis",e}(Nt);function Rbe(r,e,t){return t&&t.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:t})[0]===r}function Obe(r){var e=r.axis;return ae(r.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],!0),e.dataToCoord(t[1],!0)]}})}function Nbe(r,e){return e.getComponent("parallel",r.get("parallelIndex"))}var Bbe={type:"axisAreaSelect",event:"axisAreaSelected"};function Fbe(r){r.registerAction(Bbe,function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},function(i){i.axis.model.setActiveIntervals(e.intervals)})}),r.registerAction("parallelAxisExpand",function(e,t){t.eachComponent({mainType:"parallel",query:e},function(i){i.setAxisExpand(e)})})}var Ube={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function Pj(r){r.registerComponentView(sbe),r.registerComponentModel(lbe),r.registerCoordinateSystem("parallel",gbe),r.registerPreprocessor(rbe),r.registerComponentModel(sC),r.registerComponentView(kbe),xf(r,"parallel",sC,Ube),Fbe(r)}function Vbe(r){Ye(Pj),r.registerChartView(X1e),r.registerSeriesModel(Z1e),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,tbe)}var zbe=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return r}(),Gbe=function(r){j(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new zbe},e.prototype.buildPath=function(t,i){var n=i.extent;t.moveTo(i.x1,i.y1),t.bezierCurveTo(i.cpx1,i.cpy1,i.cpx2,i.cpy2,i.x2,i.y2),i.orient==="vertical"?(t.lineTo(i.x2+n,i.y2),t.bezierCurveTo(i.cpx2+n,i.cpy2,i.cpx1+n,i.cpy1,i.x1+n,i.y1)):(t.lineTo(i.x2,i.y2+n),t.bezierCurveTo(i.cpx2,i.cpy2+n,i.cpx1,i.cpy1+n,i.x1,i.y1+n)),t.closePath()},e.prototype.highlight=function(){Js(this)},e.prototype.downplay=function(){eo(this)},e}(Je),Hbe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._focusAdjacencyDisabled=!1,t}return e.prototype.render=function(t,i,n){var a=this,s=t.getGraph(),o=this.group,l=t.layoutInfo,u=l.width,c=l.height,h=t.getData(),d=t.getData("edge"),f=t.get("orient");this._model=t,o.removeAll(),o.x=l.x,o.y=l.y,s.eachEdge(function(p){var v=new Gbe,g=ke(v);g.dataIndex=p.dataIndex,g.seriesIndex=t.seriesIndex,g.dataType="edge";var m=p.getModel(),y=m.getModel("lineStyle"),_=y.get("curveness"),b=p.node1.getLayout(),T=p.node1.getModel(),x=T.get("localX"),C=T.get("localY"),D=p.node2.getLayout(),I=p.node2.getModel(),M=I.get("localX"),L=I.get("localY"),N=p.getLayout(),O,B,F,U,$,q,Z,te;v.shape.extent=Math.max(1,N.dy),v.shape.orient=f,f==="vertical"?(O=(x!=null?x*u:b.x)+N.sy,B=(C!=null?C*c:b.y)+b.dy,F=(M!=null?M*u:D.x)+N.ty,U=L!=null?L*c:D.y,$=O,q=B*(1-_)+U*_,Z=F,te=B*_+U*(1-_)):(O=(x!=null?x*u:b.x)+b.dx,B=(C!=null?C*c:b.y)+N.sy,F=M!=null?M*u:D.x,U=(L!=null?L*c:D.y)+N.ty,$=O*(1-_)+F*_,q=B,Z=O*_+F*(1-_),te=U),v.setShape({x1:O,y1:B,x2:F,y2:U,cpx1:$,cpy1:q,cpx2:Z,cpy2:te}),v.useStyle(y.getItemStyle()),DB(v.style,f,p);var J=""+m.get("value"),oe=Br(m,"edgeLabel");ti(v,oe,{labelFetcher:{getFormattedLabel:function(Ie,Oe,Ue,me,ze,Pe){return t.getFormattedLabel(Ie,Oe,"edge",me,Ta(ze,oe.normal&&oe.normal.get("formatter"),J),Pe)}},labelDataIndex:p.dataIndex,defaultText:J}),v.setTextConfig({position:"inside"});var he=m.getModel("emphasis");ei(v,m,"lineStyle",function(Ie){var Oe=Ie.getItemStyle();return DB(Oe,f,p),Oe}),o.add(v),d.setItemGraphicEl(p.dataIndex,v);var ue=he.get("focus");Kt(v,ue==="adjacency"?p.getAdjacentDataIndices():ue==="trajectory"?p.getTrajectoryDataIndices():ue,he.get("blurScope"),he.get("disabled"))}),s.eachNode(function(p){var v=p.getLayout(),g=p.getModel(),m=g.get("localX"),y=g.get("localY"),_=g.getModel("emphasis"),b=g.get(["itemStyle","borderRadius"])||0,T=new at({shape:{x:m!=null?m*u:v.x,y:y!=null?y*c:v.y,width:v.dx,height:v.dy,r:b},style:g.getModel("itemStyle").getItemStyle(),z2:10});ti(T,Br(g),{labelFetcher:{getFormattedLabel:function(C,D){return t.getFormattedLabel(C,D,"node")}},labelDataIndex:p.dataIndex,defaultText:p.id}),T.disableLabelAnimation=!0,T.setStyle("fill",p.getVisual("color")),T.setStyle("decal",p.getVisual("style").decal),ei(T,g),o.add(T),h.setItemGraphicEl(p.dataIndex,T),ke(T).dataType="node";var x=_.get("focus");Kt(T,x==="adjacency"?p.getAdjacentDataIndices():x==="trajectory"?p.getTrajectoryDataIndices():x,_.get("blurScope"),_.get("disabled"))}),h.eachItemGraphicEl(function(p,v){var g=h.getItemModel(v);g.get("draggable")&&(p.drift=function(m,y){a._focusAdjacencyDisabled=!0,this.shape.x+=m,this.shape.y+=y,this.dirty(),n.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:h.getRawIndex(v),localX:this.shape.x/u,localY:this.shape.y/c})},p.ondragend=function(){a._focusAdjacencyDisabled=!1},p.draggable=!0,p.cursor="move")}),!this._data&&t.isAnimationEnabled()&&o.setClipPath($be(o.getBoundingRect(),t,function(){o.removeClipPath()})),this._data=t.getData()},e.prototype.dispose=function(){},e.type="sankey",e}(Tt);function DB(r,e,t){switch(r.fill){case"source":r.fill=t.node1.getVisual("color"),r.decal=t.node1.getVisual("style").decal;break;case"target":r.fill=t.node2.getVisual("color"),r.decal=t.node2.getVisual("style").decal;break;case"gradient":var i=t.node1.getVisual("color"),n=t.node2.getVisual("color");de(i)&&de(n)&&(r.fill=new Gf(0,0,+(e==="horizontal"),+(e==="vertical"),[{color:i,offset:0},{color:n,offset:1}]))}}function $be(r,e,t){var i=new at({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return Bt(i,{shape:{width:r.width+20}},e,t),i}var Wbe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,i){var n=t.edges||t.links,a=t.data||t.nodes,s=t.levels;this.levelModels=[];for(var o=this.levelModels,l=0;l<s.length;l++)s[l].depth!=null&&s[l].depth>=0&&(o[s[l].depth]=new ft(s[l],this,i));if(a&&n){var u=fj(a,n,this,!0,c);return u.data}function c(h,d){h.wrapMethod("getItemModel",function(f,p){var v=f.parentModel,g=v.getData().getItemLayout(p);if(g){var m=g.depth,y=v.levelModels[m];y&&(f.parentModel=y)}return f}),d.wrapMethod("getItemModel",function(f,p){var v=f.parentModel,g=v.getGraph().getEdgeByIndex(p),m=g.node1.getLayout();if(m){var y=m.depth,_=v.levelModels[y];_&&(f.parentModel=_)}return f})}},e.prototype.setNodePosition=function(t,i){var n=this.option.data||this.option.nodes,a=n[t];a.localX=i[0],a.localY=i[1]},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,i,n){function a(f){return isNaN(f)||f==null}if(n==="edge"){var s=this.getDataParams(t,n),o=s.data,l=s.value,u=o.source+" -- "+o.target;return Fr("nameValue",{name:u,value:l,noValue:a(l)})}else{var c=this.getGraph().getNodeByIndex(t),h=c.getLayout().value,d=this.getDataParams(t,n).data.name;return Fr("nameValue",{name:d!=null?d+"":null,value:h,noValue:a(h)})}},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(t,i){var n=r.prototype.getDataParams.call(this,t,i);if(n.value==null&&i==="node"){var a=this.getGraph().getNodeByIndex(t),s=a.getLayout().value;n.value=s}return n},e.type="series.sankey",e.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},e}(Ct);function qbe(r,e){r.eachSeriesByType("sankey",function(t){var i=t.get("nodeWidth"),n=t.get("nodeGap"),a=jbe(t,e);t.layoutInfo=a;var s=a.width,o=a.height,l=t.getGraph(),u=l.nodes,c=l.edges;Ybe(u);var h=_t(u,function(v){return v.getLayout().value===0}),d=h.length!==0?0:t.get("layoutIterations"),f=t.get("orient"),p=t.get("nodeAlign");Xbe(u,c,i,n,s,o,d,f,p)})}function jbe(r,e){return br(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function Xbe(r,e,t,i,n,a,s,o,l){Kbe(r,e,t,n,a,o,l),eSe(r,e,a,n,i,s,o),uSe(r,o)}function Ybe(r){R(r,function(e){var t=el(e.outEdges,T_),i=el(e.inEdges,T_),n=e.getValue()||0,a=Math.max(t,i,n);e.setLayout({value:a},!0)})}function Kbe(r,e,t,i,n,a,s){for(var o=[],l=[],u=[],c=[],h=0,d=0;d<e.length;d++)o[d]=1;for(var d=0;d<r.length;d++)l[d]=r[d].inEdges.length,l[d]===0&&u.push(r[d]);for(var f=-1;u.length;){for(var p=0;p<u.length;p++){var v=u[p],g=v.hostGraph.data.getRawDataItem(v.dataIndex),m=g.depth!=null&&g.depth>=0;m&&g.depth>f&&(f=g.depth),v.setLayout({depth:m?g.depth:h},!0),a==="vertical"?v.setLayout({dy:t},!0):v.setLayout({dx:t},!0);for(var y=0;y<v.outEdges.length;y++){var _=v.outEdges[y],b=e.indexOf(_);o[b]=0;var T=_.node2,x=r.indexOf(T);--l[x]===0&&c.indexOf(T)<0&&c.push(T)}}++h,u=c,c=[]}for(var d=0;d<o.length;d++)if(o[d]===1)throw new Error("Sankey is a DAG, the original data has cycle!");var C=f>h-1?f:h-1;s&&s!=="left"&&Zbe(r,s,a,C);var D=a==="vertical"?(n-t)/C:(i-t)/C;Jbe(r,D,a)}function Mj(r){var e=r.hostGraph.data.getRawDataItem(r.dataIndex);return e.depth!=null&&e.depth>=0}function Zbe(r,e,t,i){if(e==="right"){for(var n=[],a=r,s=0;a.length;){for(var o=0;o<a.length;o++){var l=a[o];l.setLayout({skNodeHeight:s},!0);for(var u=0;u<l.inEdges.length;u++){var c=l.inEdges[u];n.indexOf(c.node1)<0&&n.push(c.node1)}}a=n,n=[],++s}R(r,function(h){Mj(h)||h.setLayout({depth:Math.max(0,i-h.getLayout().skNodeHeight)},!0)})}else e==="justify"&&Qbe(r,i)}function Qbe(r,e){R(r,function(t){!Mj(t)&&!t.outEdges.length&&t.setLayout({depth:e},!0)})}function Jbe(r,e,t){R(r,function(i){var n=i.getLayout().depth*e;t==="vertical"?i.setLayout({y:n},!0):i.setLayout({x:n},!0)})}function eSe(r,e,t,i,n,a,s){var o=tSe(r,s);rSe(o,e,t,i,n,s),sx(o,n,t,i,s);for(var l=1;a>0;a--)l*=.99,iSe(o,l,s),sx(o,n,t,i,s),lSe(o,l,s),sx(o,n,t,i,s)}function tSe(r,e){var t=[],i=e==="vertical"?"y":"x",n=h2(r,function(a){return a.getLayout()[i]});return n.keys.sort(function(a,s){return a-s}),R(n.keys,function(a){t.push(n.buckets.get(a))}),t}function rSe(r,e,t,i,n,a){var s=1/0;R(r,function(o){var l=o.length,u=0;R(o,function(h){u+=h.getLayout().value});var c=a==="vertical"?(i-(l-1)*n)/u:(t-(l-1)*n)/u;c<s&&(s=c)}),R(r,function(o){R(o,function(l,u){var c=l.getLayout().value*s;a==="vertical"?(l.setLayout({x:u},!0),l.setLayout({dx:c},!0)):(l.setLayout({y:u},!0),l.setLayout({dy:c},!0))})}),R(e,function(o){var l=+o.getValue()*s;o.setLayout({dy:l},!0)})}function sx(r,e,t,i,n){var a=n==="vertical"?"x":"y";R(r,function(s){s.sort(function(v,g){return v.getLayout()[a]-g.getLayout()[a]});for(var o,l,u,c=0,h=s.length,d=n==="vertical"?"dx":"dy",f=0;f<h;f++)l=s[f],u=c-l.getLayout()[a],u>0&&(o=l.getLayout()[a]+u,n==="vertical"?l.setLayout({x:o},!0):l.setLayout({y:o},!0)),c=l.getLayout()[a]+l.getLayout()[d]+e;var p=n==="vertical"?i:t;if(u=c-e-p,u>0){o=l.getLayout()[a]-u,n==="vertical"?l.setLayout({x:o},!0):l.setLayout({y:o},!0),c=o;for(var f=h-2;f>=0;--f)l=s[f],u=l.getLayout()[a]+l.getLayout()[d]+e-c,u>0&&(o=l.getLayout()[a]-u,n==="vertical"?l.setLayout({x:o},!0):l.setLayout({y:o},!0)),c=l.getLayout()[a]}})}function iSe(r,e,t){R(r.slice().reverse(),function(i){R(i,function(n){if(n.outEdges.length){var a=el(n.outEdges,nSe,t)/el(n.outEdges,T_);if(isNaN(a)){var s=n.outEdges.length;a=s?el(n.outEdges,aSe,t)/s:0}if(t==="vertical"){var o=n.getLayout().x+(a-ul(n,t))*e;n.setLayout({x:o},!0)}else{var l=n.getLayout().y+(a-ul(n,t))*e;n.setLayout({y:l},!0)}}})})}function nSe(r,e){return ul(r.node2,e)*r.getValue()}function aSe(r,e){return ul(r.node2,e)}function sSe(r,e){return ul(r.node1,e)*r.getValue()}function oSe(r,e){return ul(r.node1,e)}function ul(r,e){return e==="vertical"?r.getLayout().x+r.getLayout().dx/2:r.getLayout().y+r.getLayout().dy/2}function T_(r){return r.getValue()}function el(r,e,t){for(var i=0,n=r.length,a=-1;++a<n;){var s=+e(r[a],t);isNaN(s)||(i+=s)}return i}function lSe(r,e,t){R(r,function(i){R(i,function(n){if(n.inEdges.length){var a=el(n.inEdges,sSe,t)/el(n.inEdges,T_);if(isNaN(a)){var s=n.inEdges.length;a=s?el(n.inEdges,oSe,t)/s:0}if(t==="vertical"){var o=n.getLayout().x+(a-ul(n,t))*e;n.setLayout({x:o},!0)}else{var l=n.getLayout().y+(a-ul(n,t))*e;n.setLayout({y:l},!0)}}})})}function uSe(r,e){var t=e==="vertical"?"x":"y";R(r,function(i){i.outEdges.sort(function(n,a){return n.node2.getLayout()[t]-a.node2.getLayout()[t]}),i.inEdges.sort(function(n,a){return n.node1.getLayout()[t]-a.node1.getLayout()[t]})}),R(r,function(i){var n=0,a=0;R(i.outEdges,function(s){s.setLayout({sy:n},!0),n+=s.getLayout().dy}),R(i.inEdges,function(s){s.setLayout({ty:a},!0),a+=s.getLayout().dy})})}function cSe(r){r.eachSeriesByType("sankey",function(e){var t=e.getGraph(),i=t.nodes,n=t.edges;if(i.length){var a=1/0,s=-1/0;R(i,function(o){var l=o.getLayout().value;l<a&&(a=l),l>s&&(s=l)}),R(i,function(o){var l=new Nr({type:"color",mappingMethod:"linear",dataExtent:[a,s],visual:e.get("color")}),u=l.mapValueToVisual(o.getLayout().value),c=o.getModel().get(["itemStyle","color"]);c!=null?(o.setVisual("color",c),o.setVisual("style",{fill:c})):(o.setVisual("color",u),o.setVisual("style",{fill:u}))})}n.length&&R(n,function(o){var l=o.getModel().get("lineStyle");o.setVisual("style",l)})})}function hSe(r){r.registerChartView(Hbe),r.registerSeriesModel(Wbe),r.registerLayout(qbe),r.registerVisual(cSe),r.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(i){i.setNodePosition(e.dataIndex,[e.localX,e.localY])})})}var Lj=function(){function r(){}return r.prototype.getInitialData=function(e,t){var i,n=t.getComponent("xAxis",this.get("xAxisIndex")),a=t.getComponent("yAxis",this.get("yAxisIndex")),s=n.get("type"),o=a.get("type"),l;s==="category"?(e.layout="horizontal",i=n.getOrdinalMeta(),l=!0):o==="category"?(e.layout="vertical",i=a.getOrdinalMeta(),l=!0):e.layout=e.layout||"horizontal";var u=["x","y"],c=e.layout==="horizontal"?0:1,h=this._baseAxisDim=u[c],d=u[1-c],f=[n,a],p=f[c].get("type"),v=f[1-c].get("type"),g=e.data;if(g&&l){var m=[];R(g,function(b,T){var x;ie(b)?(x=b.slice(),b.unshift(T)):ie(b.value)?(x=Q({},b),x.value=x.value.slice(),b.value.unshift(T)):x=b,m.push(x)}),e.data=m}var y=this.defaultValueDimensions,_=[{name:h,type:h_(p),ordinalMeta:i,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:d,type:h_(v),dimsDef:y.slice()}];return id(this,{coordDimensions:_,dimensionsCount:y.length+1,encodeDefaulter:Be(o$,_,this)})},r.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},r}(),kj=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],t.visualDrawType="stroke",t}return e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},e}(Ct);ir(kj,Lj,!0);var fSe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,n){var a=t.getData(),s=this.group,o=this._data;this._data||s.removeAll();var l=t.get("layout")==="horizontal"?1:0;a.diff(o).add(function(u){if(a.hasValue(u)){var c=a.getItemLayout(u),h=EB(c,a,u,l,!0);a.setItemGraphicEl(u,h),s.add(h)}}).update(function(u,c){var h=o.getItemGraphicEl(c);if(!a.hasValue(u)){s.remove(h);return}var d=a.getItemLayout(u);h?(Ia(h),Rj(d,h,a,u)):h=EB(d,a,u,l),s.add(h),a.setItemGraphicEl(u,h)}).remove(function(u){var c=o.getItemGraphicEl(u);c&&s.remove(c)}).execute(),this._data=a},e.prototype.remove=function(t){var i=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl(function(a){a&&i.remove(a)})},e.type="boxplot",e}(Tt),dSe=function(){function r(){}return r}(),pSe=function(r){j(e,r);function e(t){var i=r.call(this,t)||this;return i.type="boxplotBoxPath",i}return e.prototype.getDefaultShape=function(){return new dSe},e.prototype.buildPath=function(t,i){var n=i.points,a=0;for(t.moveTo(n[a][0],n[a][1]),a++;a<4;a++)t.lineTo(n[a][0],n[a][1]);for(t.closePath();a<n.length;a++)t.moveTo(n[a][0],n[a][1]),a++,t.lineTo(n[a][0],n[a][1])},e}(Je);function EB(r,e,t,i,n){var a=r.ends,s=new pSe({shape:{points:n?vSe(a,i,r):a}});return Rj(r,s,e,t,n),s}function Rj(r,e,t,i,n){var a=t.hostModel,s=mc[n?"initProps":"updateProps"];s(e,{shape:{points:r.ends}},a,i),e.useStyle(t.getItemVisual(i,"style")),e.style.strokeNoScale=!0,e.z2=100;var o=t.getItemModel(i),l=o.getModel("emphasis");ei(e,o),Kt(e,l.get("focus"),l.get("blurScope"),l.get("disabled"))}function vSe(r,e,t){return ae(r,function(i){return i=i.slice(),i[e]=t.initBaseline,i})}var rv=R;function gSe(r){var e=mSe(r);rv(e,function(t){var i=t.seriesModels;i.length&&(ySe(t),rv(i,function(n,a){_Se(n,t.boxOffsetList[a],t.boxWidthList[a])}))})}function mSe(r){var e=[],t=[];return r.eachSeriesByType("boxplot",function(i){var n=i.getBaseAxis(),a=Xe(t,n);a<0&&(a=t.length,t[a]=n,e[a]={axis:n,seriesModels:[]}),e[a].seriesModels.push(i)}),e}function ySe(r){var e=r.axis,t=r.seriesModels,i=t.length,n=r.boxWidthList=[],a=r.boxOffsetList=[],s=[],o;if(e.type==="category")o=e.getBandWidth();else{var l=0;rv(t,function(p){l=Math.max(l,p.getData().count())});var u=e.getExtent();o=Math.abs(u[1]-u[0])/l}rv(t,function(p){var v=p.get("boxWidth");ie(v)||(v=[v,v]),s.push([ce(v[0],o)||0,ce(v[1],o)||0])});var c=o*.8-2,h=c/i*.3,d=(c-h*(i-1))/i,f=d/2-c/2;rv(t,function(p,v){a.push(f),f+=h+d,n.push(Math.min(Math.max(d,s[v][0]),s[v][1]))})}function _Se(r,e,t){var i=r.coordinateSystem,n=r.getData(),a=t/2,s=r.get("layout")==="horizontal"?0:1,o=1-s,l=["x","y"],u=n.mapDimension(l[s]),c=n.mapDimensionsAll(l[o]);if(u==null||c.length<5)return;for(var h=0;h<n.count();h++){var d=n.get(u,h),f=_(d,c[2],h),p=_(d,c[0],h),v=_(d,c[1],h),g=_(d,c[3],h),m=_(d,c[4],h),y=[];b(y,v,!1),b(y,g,!0),y.push(p,v,m,g),T(y,p),T(y,m),T(y,f),n.setItemLayout(h,{initBaseline:f[o],ends:y})}function _(x,C,D){var I=n.get(C,D),M=[];M[s]=x,M[o]=I;var L;return isNaN(x)||isNaN(I)?L=[NaN,NaN]:(L=i.dataToPoint(M),L[s]+=e),L}function b(x,C,D){var I=C.slice(),M=C.slice();I[s]+=a,M[s]-=a,D?x.push(I,M):x.push(M,I)}function T(x,C){var D=C.slice(),I=C.slice();D[s]-=a,I[s]+=a,x.push(D,I)}}function bSe(r,e){e=e||{};for(var t=[],i=[],n=e.boundIQR,a=n==="none"||n===0,s=0;s<r.length;s++){var o=mn(r[s].slice()),l=By(o,.25),u=By(o,.5),c=By(o,.75),h=o[0],d=o[o.length-1],f=(n??1.5)*(c-l),p=a?h:Math.max(h,l-f),v=a?d:Math.min(d,c+f),g=e.itemNameFormatter,m=xe(g)?g({value:s}):de(g)?g.replace("{value}",s+""):s+"";t.push([m,p,l,u,c,v]);for(var y=0;y<o.length;y++){var _=o[y];if(_<p||_>v){var b=[m,_];i.push(b)}}}return{boxData:t,outliers:i}}var SSe={type:"echarts:boxplot",transform:function(e){var t=e.upstream;if(t.sourceFormat!==vi){var i="";gt(i)}var n=bSe(t.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:n.boxData},{data:n.outliers}]}};function TSe(r){r.registerSeriesModel(kj),r.registerChartView(fSe),r.registerLayout(gSe),r.registerTransform(SSe)}var xSe=["color","borderColor"],wSe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,n){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,i,n){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,i,n,a){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,i):this._incrementalRenderNormal(t,i)},e.prototype.eachRendered=function(t){gl(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var i=t.pipelineContext.large;(this._isLargeDraw==null||i!==this._isLargeDraw)&&(this._isLargeDraw=i,this._clear())},e.prototype._renderNormal=function(t){var i=t.getData(),n=this._data,a=this.group,s=i.getLayout("isSimpleBox"),o=t.get("clip",!0),l=t.coordinateSystem,u=l.getArea&&l.getArea();this._data||a.removeAll(),i.diff(n).add(function(c){if(i.hasValue(c)){var h=i.getItemLayout(c);if(o&&IB(u,h))return;var d=ox(h,c,!0);Bt(d,{shape:{points:h.ends}},t,c),lx(d,i,c,s),a.add(d),i.setItemGraphicEl(c,d)}}).update(function(c,h){var d=n.getItemGraphicEl(h);if(!i.hasValue(c)){a.remove(d);return}var f=i.getItemLayout(c);if(o&&IB(u,f)){a.remove(d);return}d?(ct(d,{shape:{points:f.ends}},t,c),Ia(d)):d=ox(f),lx(d,i,c,s),a.add(d),i.setItemGraphicEl(c,d)}).remove(function(c){var h=n.getItemGraphicEl(c);h&&a.remove(h)}).execute(),this._data=i},e.prototype._renderLarge=function(t){this._clear(),PB(t,this.group);var i=t.get("clip",!0)?Ig(t.coordinateSystem,!1,t):null;i?this.group.setClipPath(i):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,i){for(var n=i.getData(),a=n.getLayout("isSimpleBox"),s;(s=t.next())!=null;){var o=n.getItemLayout(s),l=ox(o);lx(l,n,s,a),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(t,i){PB(i,this.group,this._progressiveEls,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(Tt),CSe=function(){function r(){}return r}(),ASe=function(r){j(e,r);function e(t){var i=r.call(this,t)||this;return i.type="normalCandlestickBox",i}return e.prototype.getDefaultShape=function(){return new CSe},e.prototype.buildPath=function(t,i){var n=i.points;this.__simpleBox?(t.moveTo(n[4][0],n[4][1]),t.lineTo(n[6][0],n[6][1])):(t.moveTo(n[0][0],n[0][1]),t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]),t.lineTo(n[3][0],n[3][1]),t.closePath(),t.moveTo(n[4][0],n[4][1]),t.lineTo(n[5][0],n[5][1]),t.moveTo(n[6][0],n[6][1]),t.lineTo(n[7][0],n[7][1]))},e}(Je);function ox(r,e,t){var i=r.ends;return new ASe({shape:{points:t?DSe(i,r):i},z2:100})}function IB(r,e){for(var t=!0,i=0;i<e.ends.length;i++)if(r.contain(e.ends[i][0],e.ends[i][1])){t=!1;break}return t}function lx(r,e,t,i){var n=e.getItemModel(t);r.useStyle(e.getItemVisual(t,"style")),r.style.strokeNoScale=!0,r.__simpleBox=i,ei(r,n)}function DSe(r,e){return ae(r,function(t){return t=t.slice(),t[1]=e.initBaseline,t})}var ESe=function(){function r(){}return r}(),ux=function(r){j(e,r);function e(t){var i=r.call(this,t)||this;return i.type="largeCandlestickBox",i}return e.prototype.getDefaultShape=function(){return new ESe},e.prototype.buildPath=function(t,i){for(var n=i.points,a=0;a<n.length;)if(this.__sign===n[a++]){var s=n[a++];t.moveTo(s,n[a++]),t.lineTo(s,n[a++])}else a+=3},e}(Je);function PB(r,e,t,i){var n=r.getData(),a=n.getLayout("largePoints"),s=new ux({shape:{points:a},__sign:1,ignoreCoarsePointer:!0});e.add(s);var o=new ux({shape:{points:a},__sign:-1,ignoreCoarsePointer:!0});e.add(o);var l=new ux({shape:{points:a},__sign:0,ignoreCoarsePointer:!0});e.add(l),cx(1,s,r),cx(-1,o,r),cx(0,l,r),i&&(s.incremental=!0,o.incremental=!0),t&&t.push(s,o)}function cx(r,e,t,i){var n=t.get(["itemStyle",r>0?"borderColor":"borderColor0"])||t.get(["itemStyle",r>0?"color":"color0"]);r===0&&(n=t.get(["itemStyle","borderColorDoji"]));var a=t.getModel("itemStyle").getItemStyle(xSe);e.useStyle(a),e.style.fill=null,e.style.stroke=n}var Oj=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],t}return e.prototype.getShadowDim=function(){return"open"},e.prototype.brushSelector=function(t,i,n){var a=i.getItemLayout(t);return a&&n.rect(a.brushRect)},e.type="series.candlestick",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},e}(Ct);ir(Oj,Lj,!0);function ISe(r){!r||!ie(r.series)||R(r.series,function(e){Ae(e)&&e.type==="k"&&(e.type="candlestick")})}var PSe=["itemStyle","borderColor"],MSe=["itemStyle","borderColor0"],LSe=["itemStyle","borderColorDoji"],kSe=["itemStyle","color"],RSe=["itemStyle","color0"],OSe={seriesType:"candlestick",plan:Zf(),performRawSeries:!0,reset:function(r,e){function t(a,s){return s.get(a>0?kSe:RSe)}function i(a,s){return s.get(a===0?LSe:a>0?PSe:MSe)}if(!e.isSeriesFiltered(r)){var n=r.pipelineContext.large;return!n&&{progress:function(a,s){for(var o;(o=a.next())!=null;){var l=s.getItemModel(o),u=s.getItemLayout(o).sign,c=l.getItemStyle();c.fill=t(u,l),c.stroke=i(u,l)||c.fill;var h=s.ensureUniqueItemVisual(o,"style");Q(h,c)}}}}}},NSe={seriesType:"candlestick",plan:Zf(),reset:function(r){var e=r.coordinateSystem,t=r.getData(),i=BSe(r,t),n=0,a=1,s=["x","y"],o=t.getDimensionIndex(t.mapDimension(s[n])),l=ae(t.mapDimensionsAll(s[a]),t.getDimensionIndex,t),u=l[0],c=l[1],h=l[2],d=l[3];if(t.setLayout({candleWidth:i,isSimpleBox:i<=1.3}),o<0||l.length<4)return;return{progress:r.pipelineContext.large?p:f};function f(v,g){for(var m,y=g.getStore();(m=v.next())!=null;){var _=y.get(o,m),b=y.get(u,m),T=y.get(c,m),x=y.get(h,m),C=y.get(d,m),D=Math.min(b,T),I=Math.max(b,T),M=$(D,_),L=$(I,_),N=$(x,_),O=$(C,_),B=[];q(B,L,0),q(B,M,1),B.push(te(O),te(L),te(N),te(M));var F=g.getItemModel(m),U=!!F.get(["itemStyle","borderColorDoji"]);g.setItemLayout(m,{sign:MB(y,m,b,T,c,U),initBaseline:b>T?L[a]:M[a],ends:B,brushRect:Z(x,C,_)})}function $(J,oe){var he=[];return he[n]=oe,he[a]=J,isNaN(oe)||isNaN(J)?[NaN,NaN]:e.dataToPoint(he)}function q(J,oe,he){var ue=oe.slice(),Ie=oe.slice();ue[n]=Vy(ue[n]+i/2,1,!1),Ie[n]=Vy(Ie[n]-i/2,1,!0),he?J.push(ue,Ie):J.push(Ie,ue)}function Z(J,oe,he){var ue=$(J,he),Ie=$(oe,he);return ue[n]-=i/2,Ie[n]-=i/2,{x:ue[0],y:ue[1],width:i,height:Ie[1]-ue[1]}}function te(J){return J[n]=Vy(J[n],1),J}}function p(v,g){for(var m=ts(v.count*4),y=0,_,b=[],T=[],x,C=g.getStore(),D=!!r.get(["itemStyle","borderColorDoji"]);(x=v.next())!=null;){var I=C.get(o,x),M=C.get(u,x),L=C.get(c,x),N=C.get(h,x),O=C.get(d,x);if(isNaN(I)||isNaN(N)||isNaN(O)){m[y++]=NaN,y+=3;continue}m[y++]=MB(C,x,M,L,c,D),b[n]=I,b[a]=N,_=e.dataToPoint(b,null,T),m[y++]=_?_[0]:NaN,m[y++]=_?_[1]:NaN,b[a]=O,_=e.dataToPoint(b,null,T),m[y++]=_?_[1]:NaN}g.setLayout("largePoints",m)}}};function MB(r,e,t,i,n,a){var s;return t>i?s=-1:t<i?s=1:s=a?0:e>0?r.get(n,e-1)<=i?1:-1:1,s}function BSe(r,e){var t=r.getBaseAxis(),i,n=t.type==="category"?t.getBandWidth():(i=t.getExtent(),Math.abs(i[1]-i[0])/e.count()),a=ce(Fe(r.get("barMaxWidth"),n),n),s=ce(Fe(r.get("barMinWidth"),1),n),o=r.get("barWidth");return o!=null?ce(o,n):Math.max(Math.min(n/2,a),s)}function FSe(r){r.registerChartView(wSe),r.registerSeriesModel(Oj),r.registerPreprocessor(ISe),r.registerVisual(OSe),r.registerLayout(NSe)}function LB(r,e){var t=e.rippleEffectColor||e.color;r.eachChild(function(i){i.attr({z:e.z,zlevel:e.zlevel,style:{stroke:e.brushType==="stroke"?t:null,fill:e.brushType==="fill"?t:null}})})}var USe=function(r){j(e,r);function e(t,i){var n=r.call(this)||this,a=new Dg(t,i),s=new Le;return n.add(a),n.add(s),n.updateData(t,i),n}return e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var i=t.symbolType,n=t.color,a=t.rippleNumber,s=this.childAt(1),o=0;o<a;o++){var l=cr(i,-1,-1,2,2,n);l.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var u=-o/a*t.period+t.effectOffset;l.animate("",!0).when(t.period,{scaleX:t.rippleScale/2,scaleY:t.rippleScale/2}).delay(u).start(),l.animateStyle(!0).when(t.period,{opacity:0}).delay(u).start(),s.add(l)}LB(s,t)},e.prototype.updateEffectAnimation=function(t){for(var i=this._effectCfg,n=this.childAt(1),a=["symbolType","period","rippleScale","rippleNumber"],s=0;s<a.length;s++){var o=a[s];if(i[o]!==t[o]){this.stopEffectAnimation(),this.startEffectAnimation(t);return}}LB(n,t)},e.prototype.highlight=function(){Js(this)},e.prototype.downplay=function(){eo(this)},e.prototype.getSymbolType=function(){var t=this.childAt(0);return t&&t.getSymbolType()},e.prototype.updateData=function(t,i){var n=this,a=t.hostModel;this.childAt(0).updateData(t,i);var s=this.childAt(1),o=t.getItemModel(i),l=t.getItemVisual(i,"symbol"),u=Jf(t.getItemVisual(i,"symbolSize")),c=t.getItemVisual(i,"style"),h=c&&c.fill,d=o.getModel("emphasis");s.setScale(u),s.traverse(function(g){g.setStyle("fill",h)});var f=_c(t.getItemVisual(i,"symbolOffset"),u);f&&(s.x=f[0],s.y=f[1]);var p=t.getItemVisual(i,"symbolRotate");s.rotation=(p||0)*Math.PI/180||0;var v={};v.showEffectOn=a.get("showEffectOn"),v.rippleScale=o.get(["rippleEffect","scale"]),v.brushType=o.get(["rippleEffect","brushType"]),v.period=o.get(["rippleEffect","period"])*1e3,v.effectOffset=i/t.count(),v.z=a.getShallow("z")||0,v.zlevel=a.getShallow("zlevel")||0,v.symbolType=l,v.color=h,v.rippleEffectColor=o.get(["rippleEffect","color"]),v.rippleNumber=o.get(["rippleEffect","number"]),v.showEffectOn==="render"?(this._effectCfg?this.updateEffectAnimation(v):this.startEffectAnimation(v),this._effectCfg=v):(this._effectCfg=null,this.stopEffectAnimation(),this.onHoverStateChange=function(g){g==="emphasis"?v.showEffectOn!=="render"&&n.startEffectAnimation(v):g==="normal"&&v.showEffectOn!=="render"&&n.stopEffectAnimation()}),this._effectCfg=v,Kt(this,d.get("focus"),d.get("blurScope"),d.get("disabled"))},e.prototype.fadeOut=function(t){t&&t()},e}(Le),VSe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this._symbolDraw=new Eg(USe)},e.prototype.render=function(t,i,n){var a=t.getData(),s=this._symbolDraw;s.updateData(a,{clipShape:this._getClipShape(t)}),this.group.add(s.group)},e.prototype._getClipShape=function(t){var i=t.coordinateSystem,n=i&&i.getArea&&i.getArea();return t.get("clip",!0)?n:null},e.prototype.updateTransform=function(t,i,n){var a=t.getData();this.group.dirty();var s=Pg("").reset(t,i,n);s.progress&&s.progress({start:0,end:a.count(),count:a.count()},a),this._symbolDraw.updateLayout()},e.prototype._updateGroupTransform=function(t){var i=t.coordinateSystem;i&&i.getRoamTransform&&(this.group.transform=_9(i.getRoamTransform()),this.group.decomposeTransform())},e.prototype.remove=function(t,i){this._symbolDraw&&this._symbolDraw.remove(!0)},e.type="effectScatter",e}(Tt),zSe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t,i){return _s(null,this,{useEncodeDefaulter:!0})},e.prototype.brushSelector=function(t,i,n){return n.point(i.getItemLayout(t))},e.type="series.effectScatter",e.dependencies=["grid","polar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",clip:!0,rippleEffect:{period:4,scale:2.5,brushType:"fill",number:3},universalTransition:{divideShape:"clone"},symbolSize:10},e}(Ct);function GSe(r){r.registerChartView(VSe),r.registerSeriesModel(zSe),r.registerLayout(Pg("effectScatter"))}var Nj=function(r){j(e,r);function e(t,i,n){var a=r.call(this)||this;return a.add(a.createLine(t,i,n)),a._updateEffectSymbol(t,i),a}return e.prototype.createLine=function(t,i,n){return new jE(t,i,n)},e.prototype._updateEffectSymbol=function(t,i){var n=t.getItemModel(i),a=n.getModel("effect"),s=a.get("symbolSize"),o=a.get("symbol");ie(s)||(s=[s,s]);var l=t.getItemVisual(i,"style"),u=a.get("color")||l&&l.stroke,c=this.childAt(1);this._symbolType!==o&&(this.remove(c),c=cr(o,-.5,-.5,1,1,u),c.z2=100,c.culling=!0,this.add(c)),c&&(c.setStyle("shadowColor",u),c.setStyle(a.getItemStyle(["color"])),c.scaleX=s[0],c.scaleY=s[1],c.setColor(u),this._symbolType=o,this._symbolScale=s,this._updateEffectAnimation(t,a,i))},e.prototype._updateEffectAnimation=function(t,i,n){var a=this.childAt(1);if(a){var s=t.getItemLayout(n),o=i.get("period")*1e3,l=i.get("loop"),u=i.get("roundTrip"),c=i.get("constantSpeed"),h=Rr(i.get("delay"),function(f){return f/t.count()*o/3});if(a.ignore=!0,this._updateAnimationPoints(a,s),c>0&&(o=this._getLineLength(a)/c*1e3),o!==this._period||l!==this._loop||u!==this._roundTrip){a.stopAnimation();var d=void 0;xe(h)?d=h(n):d=h,a.__t>0&&(d=-o*a.__t),this._animateSymbol(a,o,d,l,u)}this._period=o,this._loop=l,this._roundTrip=u}},e.prototype._animateSymbol=function(t,i,n,a,s){if(i>0){t.__t=0;var o=this,l=t.animate("",a).when(s?i*2:i,{__t:s?2:1}).delay(n).during(function(){o._updateSymbolPosition(t)});a||l.done(function(){o.remove(t)}),l.start()}},e.prototype._getLineLength=function(t){return Bs(t.__p1,t.__cp1)+Bs(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,i){t.__p1=i[0],t.__p2=i[1],t.__cp1=i[2]||[(i[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2]},e.prototype.updateData=function(t,i,n){this.childAt(0).updateData(t,i,n),this._updateEffectSymbol(t,i)},e.prototype._updateSymbolPosition=function(t){var i=t.__p1,n=t.__p2,a=t.__cp1,s=t.__t<1?t.__t:2-t.__t,o=[t.x,t.y],l=o.slice(),u=zr,c=Yw;o[0]=u(i[0],a[0],n[0],s),o[1]=u(i[1],a[1],n[1],s);var h=t.__t<1?c(i[0],a[0],n[0],s):c(n[0],a[0],i[0],1-s),d=t.__t<1?c(i[1],a[1],n[1],s):c(n[1],a[1],i[1],1-s);t.rotation=-Math.atan2(d,h)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(t.__lastT!==void 0&&t.__lastT<t.__t?(t.scaleY=Bs(l,o)*1.05,s===1&&(o[0]=l[0]+(o[0]-l[0])/2,o[1]=l[1]+(o[1]-l[1])/2)):t.__lastT===1?t.scaleY=2*Bs(i,o):t.scaleY=this._symbolScale[1]),t.__lastT=t.__t,t.ignore=!1,t.x=o[0],t.y=o[1]},e.prototype.updateLayout=function(t,i){this.childAt(0).updateLayout(t,i);var n=t.getItemModel(i).getModel("effect");this._updateEffectAnimation(t,n,i)},e}(Le),Bj=function(r){j(e,r);function e(t,i,n){var a=r.call(this)||this;return a._createPolyline(t,i,n),a}return e.prototype._createPolyline=function(t,i,n){var a=t.getItemLayout(i),s=new mi({shape:{points:a}});this.add(s),this._updateCommonStl(t,i,n)},e.prototype.updateData=function(t,i,n){var a=t.hostModel,s=this.childAt(0),o={shape:{points:t.getItemLayout(i)}};ct(s,o,a,i),this._updateCommonStl(t,i,n)},e.prototype._updateCommonStl=function(t,i,n){var a=this.childAt(0),s=t.getItemModel(i),o=n&&n.emphasisLineStyle,l=n&&n.focus,u=n&&n.blurScope,c=n&&n.emphasisDisabled;if(!n||t.hasItemOption){var h=s.getModel("emphasis");o=h.getModel("lineStyle").getLineStyle(),c=h.get("disabled"),l=h.get("focus"),u=h.get("blurScope")}a.useStyle(t.getItemVisual(i,"style")),a.style.fill=null,a.style.strokeNoScale=!0;var d=a.ensureState("emphasis");d.style=o,Kt(this,l,u,c)},e.prototype.updateLayout=function(t,i){var n=this.childAt(0);n.setShape("points",t.getItemLayout(i))},e}(Le),HSe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t._lastFrame=0,t._lastFramePercent=0,t}return e.prototype.createLine=function(t,i,n){return new Bj(t,i,n)},e.prototype._updateAnimationPoints=function(t,i){this._points=i;for(var n=[0],a=0,s=1;s<i.length;s++){var o=i[s-1],l=i[s];a+=Bs(o,l),n.push(a)}if(a===0){this._length=0;return}for(var s=0;s<n.length;s++)n[s]/=a;this._offsets=n,this._length=a},e.prototype._getLineLength=function(){return this._length},e.prototype._updateSymbolPosition=function(t){var i=t.__t<1?t.__t:2-t.__t,n=this._points,a=this._offsets,s=n.length;if(a){var o=this._lastFrame,l;if(i<this._lastFramePercent){var u=Math.min(o+1,s-1);for(l=u;l>=0&&!(a[l]<=i);l--);l=Math.min(l,s-2)}else{for(l=o;l<s&&!(a[l]>i);l++);l=Math.min(l-1,s-2)}var c=(i-a[l])/(a[l+1]-a[l]),h=n[l],d=n[l+1];t.x=h[0]*(1-c)+c*d[0],t.y=h[1]*(1-c)+c*d[1];var f=t.__t<1?d[0]-h[0]:h[0]-d[0],p=t.__t<1?d[1]-h[1]:h[1]-d[1];t.rotation=-Math.atan2(p,f)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=i,t.ignore=!1}},e}(Nj),$Se=function(){function r(){this.polyline=!1,this.curveness=0,this.segs=[]}return r}(),WSe=function(r){j(e,r);function e(t){var i=r.call(this,t)||this;return i._off=0,i.hoverDataIdx=-1,i}return e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new $Se},e.prototype.buildPath=function(t,i){var n=i.segs,a=i.curveness,s;if(i.polyline)for(s=this._off;s<n.length;){var o=n[s++];if(o>0){t.moveTo(n[s++],n[s++]);for(var l=1;l<o;l++)t.lineTo(n[s++],n[s++])}}else for(s=this._off;s<n.length;){var u=n[s++],c=n[s++],h=n[s++],d=n[s++];if(t.moveTo(u,c),a>0){var f=(u+h)/2-(c-d)*a,p=(c+d)/2-(h-u)*a;t.quadraticCurveTo(f,p,h,d)}else t.lineTo(h,d)}this.incremental&&(this._off=s,this.notClear=!0)},e.prototype.findDataIndex=function(t,i){var n=this.shape,a=n.segs,s=n.curveness,o=this.style.lineWidth;if(n.polyline)for(var l=0,u=0;u<a.length;){var c=a[u++];if(c>0)for(var h=a[u++],d=a[u++],f=1;f<c;f++){var p=a[u++],v=a[u++];if(ko(h,d,p,v,o,t,i))return l}l++}else for(var l=0,u=0;u<a.length;){var h=a[u++],d=a[u++],p=a[u++],v=a[u++];if(s>0){var g=(h+p)/2-(d-v)*s,m=(d+v)/2-(p-h)*s;if(cH(h,d,g,m,p,v,o,t,i))return l}else if(ko(h,d,p,v,o,t,i))return l;l++}return-1},e.prototype.contain=function(t,i){var n=this.transformCoordToLocal(t,i),a=this.getBoundingRect();if(t=n[0],i=n[1],a.contain(t,i)){var s=this.hoverDataIdx=this.findDataIndex(t,i);return s>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var i=this.shape,n=i.segs,a=1/0,s=1/0,o=-1/0,l=-1/0,u=0;u<n.length;){var c=n[u++],h=n[u++];a=Math.min(c,a),o=Math.max(c,o),s=Math.min(h,s),l=Math.max(h,l)}t=this._rect=new We(a,s,o,l)}return t},e}(Je),qSe=function(){function r(){this.group=new Le}return r.prototype.updateData=function(e){this._clear();var t=this._create();t.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(t,e)},r.prototype.incrementalPrepareUpdate=function(e){this.group.removeAll(),this._clear()},r.prototype.incrementalUpdate=function(e,t){var i=this._newAdded[0],n=t.getLayout("linesPoints"),a=i&&i.shape.segs;if(a&&a.length<2e4){var s=a.length,o=new Float32Array(s+n.length);o.set(a),o.set(n,s),i.setShape({segs:o})}else{this._newAdded=[];var l=this._create();l.incremental=!0,l.setShape({segs:n}),this._setCommon(l,t),l.__startIndex=e.start}},r.prototype.remove=function(){this._clear()},r.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},r.prototype._create=function(){var e=new WSe({cursor:"default",ignoreCoarsePointer:!0});return this._newAdded.push(e),this.group.add(e),e},r.prototype._setCommon=function(e,t,i){var n=t.hostModel;e.setShape({polyline:n.get("polyline"),curveness:n.get(["lineStyle","curveness"])}),e.useStyle(n.getModel("lineStyle").getLineStyle()),e.style.strokeNoScale=!0;var a=t.getVisual("style");a&&a.stroke&&e.setStyle("stroke",a.stroke),e.setStyle("fill",null);var s=ke(e);s.seriesIndex=n.seriesIndex,e.on("mousemove",function(o){s.dataIndex=null;var l=e.hoverDataIdx;l>0&&(s.dataIndex=l+e.__startIndex)})},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}(),Fj={seriesType:"lines",plan:Zf(),reset:function(r){var e=r.coordinateSystem;if(e){var t=r.get("polyline"),i=r.pipelineContext.large;return{progress:function(n,a){var s=[];if(i){var o=void 0,l=n.end-n.start;if(t){for(var u=0,c=n.start;c<n.end;c++)u+=r.getLineCoordsCount(c);o=new Float32Array(l+u*2)}else o=new Float32Array(l*4);for(var h=0,d=[],c=n.start;c<n.end;c++){var f=r.getLineCoords(c,s);t&&(o[h++]=f);for(var p=0;p<f;p++)d=e.dataToPoint(s[p],!1,d),o[h++]=d[0],o[h++]=d[1]}a.setLayout("linesPoints",o)}else for(var c=n.start;c<n.end;c++){var v=a.getItemModel(c),f=r.getLineCoords(c,s),g=[];if(t)for(var m=0;m<f;m++)g.push(e.dataToPoint(s[m]));else{g[0]=e.dataToPoint(s[0]),g[1]=e.dataToPoint(s[1]);var y=v.get(["lineStyle","curveness"]);+y&&(g[2]=[(g[0][0]+g[1][0])/2-(g[0][1]-g[1][1])*y,(g[0][1]+g[1][1])/2-(g[1][0]-g[0][0])*y])}a.setItemLayout(c,g)}}}}}},jSe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,n){var a=t.getData(),s=this._updateLineDraw(a,t),o=t.get("zlevel"),l=t.get(["effect","trailLength"]),u=n.getZr(),c=u.painter.getType()==="svg";c||u.painter.getLayer(o).clear(!0),this._lastZlevel!=null&&!c&&u.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(t)&&l>0&&(c||u.configLayer(o,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),s.updateData(a);var h=t.get("clip",!0)&&Ig(t.coordinateSystem,!1,t);h?this.group.setClipPath(h):this.group.removeClipPath(),this._lastZlevel=o,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,i,n){var a=t.getData(),s=this._updateLineDraw(a,t);s.incrementalPrepareUpdate(a),this._clearLayer(n),this._finished=!1},e.prototype.incrementalRender=function(t,i,n){this._lineDraw.incrementalUpdate(t,i.getData()),this._finished=t.end===i.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,i,n){var a=t.getData(),s=t.pipelineContext;if(!this._finished||s.large||s.progressiveRender)return{update:!0};var o=Fj.reset(t,i,n);o.progress&&o.progress({start:0,end:a.count(),count:a.count()},a),this._lineDraw.updateLayout(),this._clearLayer(n)},e.prototype._updateLineDraw=function(t,i){var n=this._lineDraw,a=this._showEffect(i),s=!!i.get("polyline"),o=i.pipelineContext,l=o.large;return(!n||a!==this._hasEffet||s!==this._isPolyline||l!==this._isLargeDraw)&&(n&&n.remove(),n=this._lineDraw=l?new qSe:new XE(s?a?HSe:Bj:a?Nj:jE),this._hasEffet=a,this._isPolyline=s,this._isLargeDraw=l),this.group.add(n.group),n},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var i=t.getZr(),n=i.painter.getType()==="svg";!n&&this._lastZlevel!=null&&i.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(t,i){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(i)},e.prototype.dispose=function(t,i){this.remove(t,i)},e.type="lines",e}(Tt),XSe=typeof Uint32Array>"u"?Array:Uint32Array,YSe=typeof Float64Array>"u"?Array:Float64Array;function kB(r){var e=r.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(r.data=ae(e,function(t){var i=[t[0].coord,t[1].coord],n={coords:i};return t[0].name&&(n.fromName=t[0].name),t[1].name&&(n.toName=t[1].name),y1([n,t[0],t[1]])}))}var KSe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="lineStyle",t.visualDrawType="stroke",t}return e.prototype.init=function(t){t.data=t.data||[],kB(t);var i=this._processFlatCoordsArray(t.data);this._flatCoords=i.flatCoords,this._flatCoordsOffset=i.flatCoordsOffset,i.flatCoords&&(t.data=new Float32Array(i.count)),r.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(t){if(kB(t),t.data){var i=this._processFlatCoordsArray(t.data);this._flatCoords=i.flatCoords,this._flatCoordsOffset=i.flatCoordsOffset,i.flatCoords&&(t.data=new Float32Array(i.count))}r.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(t){var i=this._processFlatCoordsArray(t.data);i.flatCoords&&(this._flatCoords?(this._flatCoords=xv(this._flatCoords,i.flatCoords),this._flatCoordsOffset=xv(this._flatCoordsOffset,i.flatCoordsOffset)):(this._flatCoords=i.flatCoords,this._flatCoordsOffset=i.flatCoordsOffset),t.data=new Float32Array(i.count)),this.getRawData().appendData(t.data)},e.prototype._getCoordsFromItemModel=function(t){var i=this.getData().getItemModel(t),n=i.option instanceof Array?i.option:i.getShallow("coords");return n},e.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[t*2+1]:this._getCoordsFromItemModel(t).length},e.prototype.getLineCoords=function(t,i){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[t*2],a=this._flatCoordsOffset[t*2+1],s=0;s<a;s++)i[s]=i[s]||[],i[s][0]=this._flatCoords[n+s*2],i[s][1]=this._flatCoords[n+s*2+1];return a}else{for(var o=this._getCoordsFromItemModel(t),s=0;s<o.length;s++)i[s]=i[s]||[],i[s][0]=o[s][0],i[s][1]=o[s][1];return o.length}},e.prototype._processFlatCoordsArray=function(t){var i=0;if(this._flatCoords&&(i=this._flatCoords.length),ut(t[0])){for(var n=t.length,a=new XSe(n),s=new YSe(n),o=0,l=0,u=0,c=0;c<n;){u++;var h=t[c++];a[l++]=o+i,a[l++]=h;for(var d=0;d<h;d++){var f=t[c++],p=t[c++];s[o++]=f,s[o++]=p}}return{flatCoordsOffset:new Uint32Array(a.buffer,0,l),flatCoords:s,count:u}}return{flatCoordsOffset:null,flatCoords:null,count:t.length}},e.prototype.getInitialData=function(t,i){var n=new hi(["value"],this);return n.hasItemOption=!1,n.initData(t.data,[],function(a,s,o,l){if(a instanceof Array)return NaN;n.hasItemOption=!0;var u=a.value;if(u!=null)return u instanceof Array?u[l]:u}),n},e.prototype.formatTooltip=function(t,i,n){var a=this.getData(),s=a.getItemModel(t),o=s.get("name");if(o)return o;var l=s.get("fromName"),u=s.get("toName"),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),Fr("nameValue",{name:c.join(" > ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return t??(this.option.large?1e4:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t??(this.option.large?2e4:this.get("progressiveThreshold"))},e.prototype.getZLevelKey=function(){var t=this.getModel("effect"),i=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&i>0?i+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e}(Ct);function hy(r){return r instanceof Array||(r=[r,r]),r}var ZSe={seriesType:"lines",reset:function(r){var e=hy(r.get("symbol")),t=hy(r.get("symbolSize")),i=r.getData();i.setVisual("fromSymbol",e&&e[0]),i.setVisual("toSymbol",e&&e[1]),i.setVisual("fromSymbolSize",t&&t[0]),i.setVisual("toSymbolSize",t&&t[1]);function n(a,s){var o=a.getItemModel(s),l=hy(o.getShallow("symbol",!0)),u=hy(o.getShallow("symbolSize",!0));l[0]&&a.setItemVisual(s,"fromSymbol",l[0]),l[1]&&a.setItemVisual(s,"toSymbol",l[1]),u[0]&&a.setItemVisual(s,"fromSymbolSize",u[0]),u[1]&&a.setItemVisual(s,"toSymbolSize",u[1])}return{dataEach:i.hasItemOption?n:null}}};function QSe(r){r.registerChartView(jSe),r.registerSeriesModel(KSe),r.registerLayout(Fj),r.registerVisual(ZSe)}var JSe=256,eTe=function(){function r(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=Aa.createCanvas();this.canvas=e}return r.prototype.update=function(e,t,i,n,a,s){var o=this._getBrush(),l=this._getGradient(a,"inRange"),u=this._getGradient(a,"outOfRange"),c=this.pointSize+this.blurSize,h=this.canvas,d=h.getContext("2d"),f=e.length;h.width=t,h.height=i;for(var p=0;p<f;++p){var v=e[p],g=v[0],m=v[1],y=v[2],_=n(y);d.globalAlpha=_,d.drawImage(o,g-c,m-c)}if(!h.width||!h.height)return h;for(var b=d.getImageData(0,0,h.width,h.height),T=b.data,x=0,C=T.length,D=this.minOpacity,I=this.maxOpacity,M=I-D;x<C;){var _=T[x+3]/256,L=Math.floor(_*(JSe-1))*4;if(_>0){var N=s(_)?l:u;_>0&&(_=_*M+D),T[x++]=N[L],T[x++]=N[L+1],T[x++]=N[L+2],T[x++]=N[L+3]*_*256}else x+=4}return d.putImageData(b,0,0),h},r.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=Aa.createCanvas()),t=this.pointSize+this.blurSize,i=t*2;e.width=i,e.height=i;var n=e.getContext("2d");return n.clearRect(0,0,i,i),n.shadowOffsetX=i,n.shadowBlur=this.blurSize,n.shadowColor="#000",n.beginPath(),n.arc(-t,t,this.pointSize,0,Math.PI*2,!0),n.closePath(),n.fill(),e},r.prototype._getGradient=function(e,t){for(var i=this._gradientPixels,n=i[t]||(i[t]=new Uint8ClampedArray(256*4)),a=[0,0,0,0],s=0,o=0;o<256;o++)e[t](o/255,!0,a),n[s++]=a[0],n[s++]=a[1],n[s++]=a[2],n[s++]=a[3];return n},r}();function tTe(r,e,t){var i=r[1]-r[0];e=ae(e,function(s){return{interval:[(s.interval[0]-r[0])/i,(s.interval[1]-r[0])/i]}});var n=e.length,a=0;return function(s){var o;for(o=a;o<n;o++){var l=e[o].interval;if(l[0]<=s&&s<=l[1]){a=o;break}}if(o===n)for(o=a-1;o>=0;o--){var l=e[o].interval;if(l[0]<=s&&s<=l[1]){a=o;break}}return o>=0&&o<n&&t[o]}}function rTe(r,e){var t=r[1]-r[0];return e=[(e[0]-r[0])/t,(e[1]-r[0])/t],function(i){return i>=e[0]&&i<=e[1]}}function RB(r){var e=r.dimensions;return e[0]==="lng"&&e[1]==="lat"}var iTe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,n){var a;i.eachComponent("visualMap",function(o){o.eachTargetSeries(function(l){l===t&&(a=o)})}),this._progressiveEls=null,this.group.removeAll();var s=t.coordinateSystem;s.type==="cartesian2d"||s.type==="calendar"?this._renderOnCartesianAndCalendar(t,n,0,t.getData().count()):RB(s)&&this._renderOnGeo(s,t,a,n)},e.prototype.incrementalPrepareRender=function(t,i,n){this.group.removeAll()},e.prototype.incrementalRender=function(t,i,n,a){var s=i.coordinateSystem;s&&(RB(s)?this.render(i,n,a):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(i,a,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){gl(this._progressiveEls||this.group,t)},e.prototype._renderOnCartesianAndCalendar=function(t,i,n,a,s){var o=t.coordinateSystem,l=bc(o,"cartesian2d"),u,c,h,d;if(l){var f=o.getAxis("x"),p=o.getAxis("y");u=f.getBandWidth()+.5,c=p.getBandWidth()+.5,h=f.scale.getExtent(),d=p.scale.getExtent()}for(var v=this.group,g=t.getData(),m=t.getModel(["emphasis","itemStyle"]).getItemStyle(),y=t.getModel(["blur","itemStyle"]).getItemStyle(),_=t.getModel(["select","itemStyle"]).getItemStyle(),b=t.get(["itemStyle","borderRadius"]),T=Br(t),x=t.getModel("emphasis"),C=x.get("focus"),D=x.get("blurScope"),I=x.get("disabled"),M=l?[g.mapDimension("x"),g.mapDimension("y"),g.mapDimension("value")]:[g.mapDimension("time"),g.mapDimension("value")],L=n;L<a;L++){var N=void 0,O=g.getItemVisual(L,"style");if(l){var B=g.get(M[0],L),F=g.get(M[1],L);if(isNaN(g.get(M[2],L))||isNaN(B)||isNaN(F)||B<h[0]||B>h[1]||F<d[0]||F>d[1])continue;var U=o.dataToPoint([B,F]);N=new at({shape:{x:U[0]-u/2,y:U[1]-c/2,width:u,height:c},style:O})}else{if(isNaN(g.get(M[1],L)))continue;N=new at({z2:1,shape:o.dataToRect([g.get(M[0],L)]).contentShape,style:O})}if(g.hasItemOption){var $=g.getItemModel(L),q=$.getModel("emphasis");m=q.getModel("itemStyle").getItemStyle(),y=$.getModel(["blur","itemStyle"]).getItemStyle(),_=$.getModel(["select","itemStyle"]).getItemStyle(),b=$.get(["itemStyle","borderRadius"]),C=q.get("focus"),D=q.get("blurScope"),I=q.get("disabled"),T=Br($)}N.shape.r=b;var Z=t.getRawValue(L),te="-";Z&&Z[2]!=null&&(te=Z[2]+""),ti(N,T,{labelFetcher:t,labelDataIndex:L,defaultOpacity:O.opacity,defaultText:te}),N.ensureState("emphasis").style=m,N.ensureState("blur").style=y,N.ensureState("select").style=_,Kt(N,C,D,I),N.incremental=s,s&&(N.states.emphasis.hoverLayer=!0),v.add(N),g.setItemGraphicEl(L,N),this._progressiveEls&&this._progressiveEls.push(N)}},e.prototype._renderOnGeo=function(t,i,n,a){var s=n.targetVisuals.inRange,o=n.targetVisuals.outOfRange,l=i.getData(),u=this._hmLayer||this._hmLayer||new eTe;u.blurSize=i.get("blurSize"),u.pointSize=i.get("pointSize"),u.minOpacity=i.get("minOpacity"),u.maxOpacity=i.get("maxOpacity");var c=t.getViewRect().clone(),h=t.getRoamTransform();c.applyTransform(h);var d=Math.max(c.x,0),f=Math.max(c.y,0),p=Math.min(c.width+c.x,a.getWidth()),v=Math.min(c.height+c.y,a.getHeight()),g=p-d,m=v-f,y=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],_=l.mapArray(y,function(C,D,I){var M=t.dataToPoint([C,D]);return M[0]-=d,M[1]-=f,M.push(I),M}),b=n.getExtent(),T=n.type==="visualMap.continuous"?rTe(b,n.option.range):tTe(b,n.getPieceList(),n.option.selected);u.update(_,g,m,s.color.getNormalizer(),{inRange:s.color.getColorMapper(),outOfRange:o.color.getColorMapper()},T);var x=new Ur({style:{width:g,height:m,x:d,y:f,image:u.canvas},silent:!0});this.group.add(x)},e.type="heatmap",e}(Tt),nTe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,i){return _s(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var t=Kf.get(this.get("coordinateSystem"));if(t&&t.dimensions)return t.dimensions[0]==="lng"&&t.dimensions[1]==="lat"},e.type="series.heatmap",e.dependencies=["grid","geo","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},e}(Ct);function aTe(r){r.registerChartView(iTe),r.registerSeriesModel(nTe)}var sTe=["itemStyle","borderWidth"],OB=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],hx=new ms,oTe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,n){var a=this.group,s=t.getData(),o=this._data,l=t.coordinateSystem,u=l.getBaseAxis(),c=u.isHorizontal(),h=l.master.getRect(),d={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:t,coordSys:l,coordSysExtent:[[h.x,h.x+h.width],[h.y,h.y+h.height]],isHorizontal:c,valueDim:OB[+c],categoryDim:OB[1-+c]};s.diff(o).add(function(p){if(s.hasValue(p)){var v=BB(s,p),g=NB(s,p,v,d),m=FB(s,d,g);s.setItemGraphicEl(p,m),a.add(m),VB(m,d,g)}}).update(function(p,v){var g=o.getItemGraphicEl(v);if(!s.hasValue(p)){a.remove(g);return}var m=BB(s,p),y=NB(s,p,m,d),_=$j(s,y);g&&_!==g.__pictorialShapeStr&&(a.remove(g),s.setItemGraphicEl(p,null),g=null),g?pTe(g,d,y):g=FB(s,d,y,!0),s.setItemGraphicEl(p,g),g.__pictorialSymbolMeta=y,a.add(g),VB(g,d,y)}).remove(function(p){var v=o.getItemGraphicEl(p);v&&UB(o,p,v.__pictorialSymbolMeta.animationModel,v)}).execute();var f=t.get("clip",!0)?Ig(t.coordinateSystem,!1,t):null;return f?a.setClipPath(f):a.removeClipPath(),this._data=s,this.group},e.prototype.remove=function(t,i){var n=this.group,a=this._data;t.get("animation")?a&&a.eachItemGraphicEl(function(s){UB(a,ke(s).dataIndex,t,s)}):n.removeAll()},e.type="pictorialBar",e}(Tt);function NB(r,e,t,i){var n=r.getItemLayout(e),a=t.get("symbolRepeat"),s=t.get("symbolClip"),o=t.get("symbolPosition")||"start",l=t.get("symbolRotate"),u=(l||0)*Math.PI/180||0,c=t.get("symbolPatternSize")||2,h=t.isAnimationEnabled(),d={dataIndex:e,layout:n,itemModel:t,symbolType:r.getItemVisual(e,"symbol")||"circle",style:r.getItemVisual(e,"style"),symbolClip:s,symbolRepeat:a,symbolRepeatDirection:t.get("symbolRepeatDirection"),symbolPatternSize:c,rotation:u,animationModel:h?t:null,hoverScale:h&&t.get(["emphasis","scale"]),z2:t.getShallow("z",!0)||0};lTe(t,a,n,i,d),uTe(r,e,n,a,s,d.boundingLength,d.pxSign,c,i,d),cTe(t,d.symbolScale,u,i,d);var f=d.symbolSize,p=_c(t.get("symbolOffset"),f);return hTe(t,f,n,a,s,p,o,d.valueLineWidth,d.boundingLength,d.repeatCutLength,i,d),d}function lTe(r,e,t,i,n){var a=i.valueDim,s=r.get("symbolBoundingData"),o=i.coordSys.getOtherAxis(i.coordSys.getBaseAxis()),l=o.toGlobalCoord(o.dataToCoord(0)),u=1-+(t[a.wh]<=0),c;if(ie(s)){var h=[fx(o,s[0])-l,fx(o,s[1])-l];h[1]<h[0]&&h.reverse(),c=h[u]}else s!=null?c=fx(o,s)-l:e?c=i.coordSysExtent[a.index][u]-l:c=t[a.wh];n.boundingLength=c,e&&(n.repeatCutLength=t[a.wh]),n.pxSign=c>0?1:-1}function fx(r,e){return r.toGlobalCoord(r.dataToCoord(r.scale.parse(e)))}function uTe(r,e,t,i,n,a,s,o,l,u){var c=l.valueDim,h=l.categoryDim,d=Math.abs(t[h.wh]),f=r.getItemVisual(e,"symbolSize"),p;ie(f)?p=f.slice():f==null?p=["100%","100%"]:p=[f,f],p[h.index]=ce(p[h.index],d),p[c.index]=ce(p[c.index],i?d:Math.abs(a)),u.symbolSize=p;var v=u.symbolScale=[p[0]/o,p[1]/o];v[c.index]*=(l.isHorizontal?-1:1)*s}function cTe(r,e,t,i,n){var a=r.get(sTe)||0;a&&(hx.attr({scaleX:e[0],scaleY:e[1],rotation:t}),hx.updateTransform(),a/=hx.getLineScale(),a*=e[i.valueDim.index]),n.valueLineWidth=a||0}function hTe(r,e,t,i,n,a,s,o,l,u,c,h){var d=c.categoryDim,f=c.valueDim,p=h.pxSign,v=Math.max(e[f.index]+o,0),g=v;if(i){var m=Math.abs(l),y=Rr(r.get("symbolMargin"),"15%")+"",_=!1;y.lastIndexOf("!")===y.length-1&&(_=!0,y=y.slice(0,y.length-1));var b=ce(y,e[f.index]),T=Math.max(v+b*2,0),x=_?0:b*2,C=xD(i),D=C?i:zB((m+x)/T),I=m-D*v;b=I/2/(_?D:Math.max(D-1,1)),T=v+b*2,x=_?0:b*2,!C&&i!=="fixed"&&(D=u?zB((Math.abs(u)+x)/T):0),g=D*T-x,h.repeatTimes=D,h.symbolMargin=b}var M=p*(g/2),L=h.pathPosition=[];L[d.index]=t[d.wh]/2,L[f.index]=s==="start"?M:s==="end"?l-M:l/2,a&&(L[0]+=a[0],L[1]+=a[1]);var N=h.bundlePosition=[];N[d.index]=t[d.xy],N[f.index]=t[f.xy];var O=h.barRectShape=Q({},t);O[f.wh]=p*Math.max(Math.abs(t[f.wh]),Math.abs(L[f.index]+M)),O[d.wh]=t[d.wh];var B=h.clipShape={};B[d.xy]=-t[d.xy],B[d.wh]=c.ecSize[d.wh],B[f.xy]=0,B[f.wh]=t[f.wh]}function Uj(r){var e=r.symbolPatternSize,t=cr(r.symbolType,-e/2,-e/2,e,e);return t.attr({culling:!0}),t.type!=="image"&&t.setStyle({strokeNoScale:!0}),t}function Vj(r,e,t,i){var n=r.__pictorialBundle,a=t.symbolSize,s=t.valueLineWidth,o=t.pathPosition,l=e.valueDim,u=t.repeatTimes||0,c=0,h=a[e.valueDim.index]+s+t.symbolMargin*2;for(rI(r,function(v){v.__pictorialAnimationIndex=c,v.__pictorialRepeatTimes=u,c<u?Xh(v,null,p(c),t,i):Xh(v,null,{scaleX:0,scaleY:0},t,i,function(){n.remove(v)}),c++});c<u;c++){var d=Uj(t);d.__pictorialAnimationIndex=c,d.__pictorialRepeatTimes=u,n.add(d);var f=p(c);Xh(d,{x:f.x,y:f.y,scaleX:0,scaleY:0},{scaleX:f.scaleX,scaleY:f.scaleY,rotation:f.rotation},t,i)}function p(v){var g=o.slice(),m=t.pxSign,y=v;return(t.symbolRepeatDirection==="start"?m>0:m<0)&&(y=u-1-v),g[l.index]=h*(y-u/2+.5)+o[l.index],{x:g[0],y:g[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation}}}function zj(r,e,t,i){var n=r.__pictorialBundle,a=r.__pictorialMainPath;a?Xh(a,null,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation},t,i):(a=r.__pictorialMainPath=Uj(t),n.add(a),Xh(a,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:0,scaleY:0,rotation:t.rotation},{scaleX:t.symbolScale[0],scaleY:t.symbolScale[1]},t,i))}function Gj(r,e,t){var i=Q({},e.barRectShape),n=r.__pictorialBarRect;n?Xh(n,null,{shape:i},e,t):(n=r.__pictorialBarRect=new at({z2:2,shape:i,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),n.disableMorphing=!0,r.add(n))}function Hj(r,e,t,i){if(t.symbolClip){var n=r.__pictorialClipPath,a=Q({},t.clipShape),s=e.valueDim,o=t.animationModel,l=t.dataIndex;if(n)ct(n,{shape:a},o,l);else{a[s.wh]=0,n=new at({shape:a}),r.__pictorialBundle.setClipPath(n),r.__pictorialClipPath=n;var u={};u[s.wh]=t.clipShape[s.wh],mc[i?"updateProps":"initProps"](n,{shape:u},o,l)}}}function BB(r,e){var t=r.getItemModel(e);return t.getAnimationDelayParams=fTe,t.isAnimationEnabled=dTe,t}function fTe(r){return{index:r.__pictorialAnimationIndex,count:r.__pictorialRepeatTimes}}function dTe(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function FB(r,e,t,i){var n=new Le,a=new Le;return n.add(a),n.__pictorialBundle=a,a.x=t.bundlePosition[0],a.y=t.bundlePosition[1],t.symbolRepeat?Vj(n,e,t):zj(n,e,t),Gj(n,t,i),Hj(n,e,t,i),n.__pictorialShapeStr=$j(r,t),n.__pictorialSymbolMeta=t,n}function pTe(r,e,t){var i=t.animationModel,n=t.dataIndex,a=r.__pictorialBundle;ct(a,{x:t.bundlePosition[0],y:t.bundlePosition[1]},i,n),t.symbolRepeat?Vj(r,e,t,!0):zj(r,e,t,!0),Gj(r,t,!0),Hj(r,e,t,!0)}function UB(r,e,t,i){var n=i.__pictorialBarRect;n&&n.removeTextContent();var a=[];rI(i,function(s){a.push(s)}),i.__pictorialMainPath&&a.push(i.__pictorialMainPath),i.__pictorialClipPath&&(t=null),R(a,function(s){ol(s,{scaleX:0,scaleY:0},t,e,function(){i.parent&&i.parent.remove(i)})}),r.setItemGraphicEl(e,null)}function $j(r,e){return[r.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function rI(r,e,t){R(r.__pictorialBundle.children(),function(i){i!==r.__pictorialBarRect&&e.call(t,i)})}function Xh(r,e,t,i,n,a){e&&r.attr(e),i.symbolClip&&!n?t&&r.attr(t):t&&mc[n?"updateProps":"initProps"](r,t,i.animationModel,i.dataIndex,a)}function VB(r,e,t){var i=t.dataIndex,n=t.itemModel,a=n.getModel("emphasis"),s=a.getModel("itemStyle").getItemStyle(),o=n.getModel(["blur","itemStyle"]).getItemStyle(),l=n.getModel(["select","itemStyle"]).getItemStyle(),u=n.getShallow("cursor"),c=a.get("focus"),h=a.get("blurScope"),d=a.get("scale");rI(r,function(v){if(v instanceof Ur){var g=v.style;v.useStyle(Q({image:g.image,x:g.x,y:g.y,width:g.width,height:g.height},t.style))}else v.useStyle(t.style);var m=v.ensureState("emphasis");m.style=s,d&&(m.scaleX=v.scaleX*1.1,m.scaleY=v.scaleY*1.1),v.ensureState("blur").style=o,v.ensureState("select").style=l,u&&(v.cursor=u),v.z2=t.z2});var f=e.valueDim.posDesc[+(t.boundingLength>0)],p=r.__pictorialBarRect;p.ignoreClip=!0,ti(p,Br(n),{labelFetcher:e.seriesModel,labelDataIndex:i,defaultText:Tf(e.seriesModel.getData(),i),inheritColor:t.style.fill,defaultOpacity:t.style.opacity,defaultOutsidePosition:f}),Kt(r,c,h,a.get("disabled"))}function zB(r){var e=Math.round(r);return Math.abs(r-e)<1e-4?e:Math.ceil(r)}var vTe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t.defaultSymbol="roundRect",t}return e.prototype.getInitialData=function(t){return t.stack=null,r.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=ml(Hv.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),e}(Hv);function gTe(r){r.registerChartView(oTe),r.registerSeriesModel(vTe),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,Be(DW,"pictorialBar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,EW("pictorialBar"))}var mTe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._layers=[],t}return e.prototype.render=function(t,i,n){var a=t.getData(),s=this,o=this.group,l=t.getLayerSeries(),u=a.getLayout("layoutInfo"),c=u.rect,h=u.boundaryGap;o.x=0,o.y=c.y+h[0];function d(g){return g.name}var f=new to(this._layersSeries||[],l,d,d),p=[];f.add(ge(v,this,"add")).update(ge(v,this,"update")).remove(ge(v,this,"remove")).execute();function v(g,m,y){var _=s._layers;if(g==="remove"){o.remove(_[m]);return}for(var b=[],T=[],x,C=l[m].indices,D=0;D<C.length;D++){var I=a.getItemLayout(C[D]),M=I.x,L=I.y0,N=I.y;b.push(M,L),T.push(M,L+N),x=a.getItemVisual(C[D],"style")}var O,B=a.getItemLayout(C[0]),F=t.getModel("label"),U=F.get("margin"),$=t.getModel("emphasis");if(g==="add"){var q=p[m]=new Le;O=new gq({shape:{points:b,stackedOnPoints:T,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),q.add(O),o.add(q),t.isAnimationEnabled()&&O.setClipPath(yTe(O.getBoundingRect(),t,function(){O.removeClipPath()}))}else{var q=_[y];O=q.childAt(0),o.add(q),p[m]=q,ct(O,{shape:{points:b,stackedOnPoints:T}},t),Ia(O)}ti(O,Br(t),{labelDataIndex:C[D-1],defaultText:a.getName(C[D-1]),inheritColor:x.fill},{normal:{verticalAlign:"middle"}}),O.setTextConfig({position:null,local:!0});var Z=O.getTextContent();Z&&(Z.x=B.x-U,Z.y=B.y0+B.y/2),O.useStyle(x),a.setItemGraphicEl(m,O),ei(O,t),Kt(O,$.get("focus"),$.get("blurScope"),$.get("disabled"))}this._layersSeries=l,this._layers=p},e.type="themeRiver",e}(Tt);function yTe(r,e,t){var i=new at({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return Bt(i,{shape:{x:r.x-50,width:r.width+100,height:r.height+20}},e,t),i}var dx=2,_Te=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new Lg(ge(this.getData,this),ge(this.getRawData,this))},e.prototype.fixData=function(t){var i=t.length,n={},a=h2(t,function(d){return n.hasOwnProperty(d[0]+"")||(n[d[0]+""]=-1),d[2]}),s=[];a.buckets.each(function(d,f){s.push({name:f,dataList:d})});for(var o=s.length,l=0;l<o;++l){for(var u=s[l].name,c=0;c<s[l].dataList.length;++c){var h=s[l].dataList[c][0]+"";n[h]=l}for(var h in n)n.hasOwnProperty(h)&&n[h]!==l&&(n[h]=l,t[i]=[h,0,u],i++)}return t},e.prototype.getInitialData=function(t,i){for(var n=this.getReferringComponents("singleAxis",_r).models[0],a=n.get("type"),s=_t(t.data,function(p){return p[2]!==void 0}),o=this.fixData(s||[]),l=[],u=this.nameMap=be(),c=0,h=0;h<o.length;++h)l.push(o[h][dx]),u.get(o[h][dx])||(u.set(o[h][dx],c),c++);var d=ed(o,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:h_(a)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}).dimensions,f=new hi(d,this);return f.initData(o),f},e.prototype.getLayerSeries=function(){for(var t=this.getData(),i=t.count(),n=[],a=0;a<i;++a)n[a]=a;var s=t.mapDimension("single"),o=h2(n,function(u){return t.get("name",u)}),l=[];return o.buckets.each(function(u,c){u.sort(function(h,d){return t.get(s,h)-t.get(s,d)}),l.push({name:c,indices:u})}),l},e.prototype.getAxisTooltipData=function(t,i,n){ie(t)||(t=t?[t]:[]);for(var a=this.getData(),s=this.getLayerSeries(),o=[],l=s.length,u,c=0;c<l;++c){for(var h=Number.MAX_VALUE,d=-1,f=s[c].indices.length,p=0;p<f;++p){var v=a.get(t[0],s[c].indices[p]),g=Math.abs(v-i);g<=h&&(u=v,h=g,d=s[c].indices[p])}o.push(d)}return{dataIndices:o,nestestValue:u}},e.prototype.formatTooltip=function(t,i,n){var a=this.getData(),s=a.getName(t),o=a.get(a.mapDimension("value"),t);return Fr("nameValue",{name:s,value:o})},e.type="series.themeRiver",e.dependencies=["singleAxis"],e.defaultOption={z:2,colorBy:"data",coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",fontSize:11},emphasis:{label:{show:!0}}},e}(Ct);function bTe(r,e){r.eachSeriesByType("themeRiver",function(t){var i=t.getData(),n=t.coordinateSystem,a={},s=n.getRect();a.rect=s;var o=t.get("boundaryGap"),l=n.getAxis();if(a.boundaryGap=o,l.orient==="horizontal"){o[0]=ce(o[0],s.height),o[1]=ce(o[1],s.height);var u=s.height-o[0]-o[1];GB(i,t,u)}else{o[0]=ce(o[0],s.width),o[1]=ce(o[1],s.width);var c=s.width-o[0]-o[1];GB(i,t,c)}i.setLayout("layoutInfo",a)})}function GB(r,e,t){if(r.count())for(var i=e.coordinateSystem,n=e.getLayerSeries(),a=r.mapDimension("single"),s=r.mapDimension("value"),o=ae(n,function(g){return ae(g.indices,function(m){var y=i.dataToPoint(r.get(a,m));return y[1]=r.get(s,m),y})}),l=STe(o),u=l.y0,c=t/l.max,h=n.length,d=n[0].indices.length,f,p=0;p<d;++p){f=u[p]*c,r.setItemLayout(n[0].indices[p],{layerIndex:0,x:o[0][p][0],y0:f,y:o[0][p][1]*c});for(var v=1;v<h;++v)f+=o[v-1][p][1]*c,r.setItemLayout(n[v].indices[p],{layerIndex:v,x:o[v][p][0],y0:f,y:o[v][p][1]*c})}}function STe(r){for(var e=r.length,t=r[0].length,i=[],n=[],a=0,s=0;s<t;++s){for(var o=0,l=0;l<e;++l)o+=r[l][s][1];o>a&&(a=o),i.push(o)}for(var u=0;u<t;++u)n[u]=(a-i[u])/2;a=0;for(var c=0;c<t;++c){var h=i[c]+n[c];h>a&&(a=h)}return{y0:n,max:a}}function TTe(r){r.registerChartView(mTe),r.registerSeriesModel(_Te),r.registerLayout(bTe),r.registerProcessor(Mg("themeRiver"))}var xTe=2,wTe=4,HB=function(r){j(e,r);function e(t,i,n,a){var s=r.call(this)||this;s.z2=xTe,s.textConfig={inside:!0},ke(s).seriesIndex=i.seriesIndex;var o=new nt({z2:wTe,silent:t.getModel().get(["label","silent"])});return s.setTextContent(o),s.updateData(!0,t,i,n,a),s}return e.prototype.updateData=function(t,i,n,a,s){this.node=i,i.piece=this,n=n||this._seriesModel,a=a||this._ecModel;var o=this;ke(o).dataIndex=i.dataIndex;var l=i.getModel(),u=l.getModel("emphasis"),c=i.getLayout(),h=Q({},c);h.label=null;var d=i.getVisual("style");d.lineJoin="bevel";var f=i.getVisual("decal");f&&(d.decal=Sf(f,s));var p=Pu(l.getModel("itemStyle"),h,!0);Q(h,p),R(Oi,function(y){var _=o.ensureState(y),b=l.getModel([y,"itemStyle"]);_.style=b.getItemStyle();var T=Pu(b,h);T&&(_.shape=T)}),t?(o.setShape(h),o.shape.r=c.r0,Bt(o,{shape:{r:c.r}},n,i.dataIndex)):(ct(o,{shape:h},n),Ia(o)),o.useStyle(d),this._updateLabel(n);var v=l.getShallow("cursor");v&&o.attr("cursor",v),this._seriesModel=n||this._seriesModel,this._ecModel=a||this._ecModel;var g=u.get("focus"),m=g==="ancestor"?i.getAncestorsIndices():g==="descendant"?i.getDescendantIndices():g;Kt(this,m,u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t){var i=this,n=this.node.getModel(),a=n.getModel("label"),s=this.node.getLayout(),o=s.endAngle-s.startAngle,l=(s.startAngle+s.endAngle)/2,u=Math.cos(l),c=Math.sin(l),h=this,d=h.getTextContent(),f=this.node.dataIndex,p=a.get("minAngle")/180*Math.PI,v=a.get("show")&&!(p!=null&&Math.abs(o)<p);d.ignore=!v,R(Mv,function(m){var y=m==="normal"?n.getModel("label"):n.getModel([m,"label"]),_=m==="normal",b=_?d:d.ensureState(m),T=t.getFormattedLabel(f,m);_&&(T=T||i.node.name),b.style=Mt(y,{},null,m!=="normal",!0),T&&(b.style.text=T);var x=y.get("show");x!=null&&!_&&(b.ignore=!x);var C=g(y,"position"),D=_?h:h.states[m],I=D.style.fill;D.textConfig={outsideFill:y.get("color")==="inherit"?I:null,inside:C!=="outside"};var M,L=g(y,"distance")||0,N=g(y,"align"),O=g(y,"rotate"),B=Math.PI*.5,F=Math.PI*1.5,U=yn(O==="tangential"?Math.PI/2-l:l),$=U>B&&!mf(U-B)&&U<F;C==="outside"?(M=s.r+L,N=$?"right":"left"):!N||N==="center"?(o===2*Math.PI&&s.r0===0?M=0:M=(s.r+s.r0)/2,N="center"):N==="left"?(M=s.r0+L,N=$?"right":"left"):N==="right"&&(M=s.r-L,N=$?"left":"right"),b.style.align=N,b.style.verticalAlign=g(y,"verticalAlign")||"middle",b.x=M*u+s.cx,b.y=M*c+s.cy;var q=0;O==="radial"?q=yn(-l)+($?Math.PI:0):O==="tangential"?q=yn(Math.PI/2-l)+($?Math.PI:0):ut(O)&&(q=O*Math.PI/180),b.rotation=yn(q)});function g(m,y){var _=m.get(y);return _??a.get(y)}d.dirtyStyle()},e}(di),fC="sunburstRootToNode",$B="sunburstHighlight",CTe="sunburstUnhighlight";function ATe(r){r.registerAction({type:fC,update:"updateView"},function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},i);function i(n,a){var s=Wv(e,[fC],n);if(s){var o=n.getViewRoot();o&&(e.direction=GE(o,s.node)?"rollUp":"drillDown"),n.resetViewRoot(s.node)}}}),r.registerAction({type:$B,update:"none"},function(e,t,i){e=Q({},e),t.eachComponent({mainType:"series",subType:"sunburst",query:e},n);function n(a){var s=Wv(e,[$B],a);s&&(e.dataIndex=s.node.dataIndex)}i.dispatchAction(Q(e,{type:"highlight"}))}),r.registerAction({type:CTe,update:"updateView"},function(e,t,i){e=Q({},e),i.dispatchAction(Q(e,{type:"downplay"}))})}var DTe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,n,a){var s=this;this.seriesModel=t,this.api=n,this.ecModel=i;var o=t.getData(),l=o.tree.root,u=t.getViewRoot(),c=this.group,h=t.get("renderLabelForZeroData"),d=[];u.eachNode(function(y){d.push(y)});var f=this._oldChildren||[];p(d,f),m(l,u),this._initEvents(),this._oldChildren=d;function p(y,_){if(y.length===0&&_.length===0)return;new to(_,y,b,b).add(T).update(T).remove(Be(T,null)).execute();function b(x){return x.getId()}function T(x,C){var D=x==null?null:y[x],I=C==null?null:_[C];v(D,I)}}function v(y,_){if(!h&&y&&!y.getValue()&&(y=null),y!==l&&_!==l){if(_&&_.piece)y?(_.piece.updateData(!1,y,t,i,n),o.setItemGraphicEl(y.dataIndex,_.piece)):g(_);else if(y){var b=new HB(y,t,i,n);c.add(b),o.setItemGraphicEl(y.dataIndex,b)}}}function g(y){y&&y.piece&&(c.remove(y.piece),y.piece=null)}function m(y,_){_.depth>0?(s.virtualPiece?s.virtualPiece.updateData(!1,y,t,i,n):(s.virtualPiece=new HB(y,t,i,n),c.add(s.virtualPiece)),_.piece.off("click"),s.virtualPiece.on("click",function(b){s._rootToNode(_.parentNode)})):s.virtualPiece&&(c.remove(s.virtualPiece),s.virtualPiece=null)}},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",function(i){var n=!1,a=t.seriesModel.getViewRoot();a.eachNode(function(s){if(!n&&s.piece&&s.piece===i.target){var o=s.getModel().get("nodeClick");if(o==="rootToNode")t._rootToNode(s);else if(o==="link"){var l=s.getModel(),u=l.get("link");if(u){var c=l.get("target",!0)||"_blank";t_(u,c)}}n=!0}})})},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:fC,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,i){var n=i.getData(),a=n.getItemLayout(0);if(a){var s=t[0]-a.cx,o=t[1]-a.cy,l=Math.sqrt(s*s+o*o);return l<=a.r&&l>=a.r0}},e.type="sunburst",e}(Tt),ETe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t,i){var n={name:t.name,children:t.data};Wj(n);var a=this._levelModels=ae(t.levels||[],function(l){return new ft(l,this,i)},this),s=zE.createTree(n,this,o);function o(l){l.wrapMethod("getItemModel",function(u,c){var h=s.getNodeByDataIndex(c),d=a[h.depth];return d&&(u.parentModel=d),u})}return s.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(t){var i=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return i.treePathInfo=tb(n,this),i},e.prototype.getLevelModel=function(t){return this._levelModels&&this._levelModels[t.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var i=this.getRawData().tree.root;(!t||t!==i&&!i.contains(t))&&(this._viewRoot=i)},e.prototype.enableAriaDecal=function(){Kq(this)},e.type="series.sunburst",e.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},e}(Ct);function Wj(r){var e=0;R(r.children,function(i){Wj(i);var n=i.value;ie(n)&&(n=n[0]),e+=n});var t=r.value;ie(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),ie(r.value)?r.value[0]=t:r.value=t}var WB=Math.PI/180;function ITe(r,e,t){e.eachSeriesByType(r,function(i){var n=i.get("center"),a=i.get("radius");ie(a)||(a=[0,a]),ie(n)||(n=[n,n]);var s=t.getWidth(),o=t.getHeight(),l=Math.min(s,o),u=ce(n[0],s),c=ce(n[1],o),h=ce(a[0],l/2),d=ce(a[1],l/2),f=-i.get("startAngle")*WB,p=i.get("minAngle")*WB,v=i.getData().tree.root,g=i.getViewRoot(),m=g.depth,y=i.get("sort");y!=null&&qj(g,y);var _=0;R(g.children,function(U){!isNaN(U.getValue())&&_++});var b=g.getValue(),T=Math.PI/(b||_)*2,x=g.depth>0,C=g.height-(x?-1:1),D=(d-h)/(C||1),I=i.get("clockwise"),M=i.get("stillShowZeroSum"),L=I?1:-1,N=function(U,$){if(U){var q=$;if(U!==v){var Z=U.getValue(),te=b===0&&M?T:Z*T;te<p&&(te=p),q=$+L*te;var J=U.depth-m-(x?-1:1),oe=h+D*J,he=h+D*(J+1),ue=i.getLevelModel(U);if(ue){var Ie=ue.get("r0",!0),Oe=ue.get("r",!0),Ue=ue.get("radius",!0);Ue!=null&&(Ie=Ue[0],Oe=Ue[1]),Ie!=null&&(oe=ce(Ie,l/2)),Oe!=null&&(he=ce(Oe,l/2))}U.setLayout({angle:te,startAngle:$,endAngle:q,clockwise:I,cx:u,cy:c,r0:oe,r:he})}if(U.children&&U.children.length){var me=0;R(U.children,function(ze){me+=N(ze,$+me)})}return q-$}};if(x){var O=h,B=h+D,F=Math.PI*2;v.setLayout({angle:F,startAngle:f,endAngle:f+F,clockwise:I,cx:u,cy:c,r0:O,r:B})}N(g,f)})}function qj(r,e){var t=r.children||[];r.children=PTe(t,e),t.length&&R(r.children,function(i){qj(i,e)})}function PTe(r,e){if(xe(e)){var t=ae(r,function(n,a){var s=n.getValue();return{params:{depth:n.depth,height:n.height,dataIndex:n.dataIndex,getValue:function(){return s}},index:a}});return t.sort(function(n,a){return e(n.params,a.params)}),ae(t,function(n){return r[n.index]})}else{var i=e==="asc";return r.sort(function(n,a){var s=(n.getValue()-a.getValue())*(i?1:-1);return s===0?(n.dataIndex-a.dataIndex)*(i?-1:1):s})}}function MTe(r){var e={};function t(i,n,a){for(var s=i;s&&s.depth>1;)s=s.parentNode;var o=n.getColorFromPalette(s.name||s.dataIndex+"",e);return i.depth>1&&de(o)&&(o=H0(o,(i.depth-1)/(a-1)*.5)),o}r.eachSeriesByType("sunburst",function(i){var n=i.getData(),a=n.tree;a.eachNode(function(s){var o=s.getModel(),l=o.getModel("itemStyle").getItemStyle();l.fill||(l.fill=t(s,i,a.root.height));var u=n.ensureUniqueItemVisual(s.dataIndex,"style");Q(u,l)})})}function LTe(r){r.registerChartView(DTe),r.registerSeriesModel(ETe),r.registerLayout(Be(ITe,"sunburst")),r.registerProcessor(Be(Mg,"sunburst")),r.registerVisual(MTe),ATe(r)}var qB={color:"fill",borderColor:"stroke"},kTe={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},$s=lt(),RTe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(t,i){return _s(null,this)},e.prototype.getDataParams=function(t,i,n){var a=r.prototype.getDataParams.call(this,t,i);return n&&(a.info=$s(n).info),a},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(Ct);function OTe(r,e){return e=e||[0,0],ae(["x","y"],function(t,i){var n=this.getAxis(t),a=e[i],s=r[i]/2;return n.type==="category"?n.getBandWidth():Math.abs(n.dataToCoord(a-s)-n.dataToCoord(a+s))},this)}function NTe(r){var e=r.master.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:ge(OTe,r)}}}function BTe(r,e){return e=e||[0,0],ae([0,1],function(t){var i=e[t],n=r[t]/2,a=[],s=[];return a[t]=i-n,s[t]=i+n,a[1-t]=s[1-t]=e[1-t],Math.abs(this.dataToPoint(a)[t]-this.dataToPoint(s)[t])},this)}function FTe(r){var e=r.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:r.getZoom()},api:{coord:function(t){return r.dataToPoint(t)},size:ge(BTe,r)}}}function UTe(r,e){var t=this.getAxis(),i=e instanceof Array?e[0]:e,n=(r instanceof Array?r[0]:r)/2;return t.type==="category"?t.getBandWidth():Math.abs(t.dataToCoord(i-n)-t.dataToCoord(i+n))}function VTe(r){var e=r.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:ge(UTe,r)}}}function zTe(r,e){return e=e||[0,0],ae(["Radius","Angle"],function(t,i){var n="get"+t+"Axis",a=this[n](),s=e[i],o=r[i]/2,l=a.type==="category"?a.getBandWidth():Math.abs(a.dataToCoord(s-o)-a.dataToCoord(s+o));return t==="Angle"&&(l=l*Math.PI/180),l},this)}function GTe(r){var e=r.getRadiusAxis(),t=r.getAngleAxis(),i=e.getExtent();return i[0]>i[1]&&i.reverse(),{coordSys:{type:"polar",cx:r.cx,cy:r.cy,r:i[1],r0:i[0]},api:{coord:function(n){var a=e.dataToRadius(n[0]),s=t.dataToAngle(n[1]),o=r.coordToPoint([a,s]);return o.push(a,s*Math.PI/180),o},size:ge(zTe,r)}}}function HTe(r){var e=r.getRect(),t=r.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:r.getCellWidth(),cellHeight:r.getCellHeight(),rangeInfo:{start:t.start,end:t.end,weeks:t.weeks,dayCount:t.allDay}},api:{coord:function(i,n){return r.dataToPoint(i,n)}}}}function jj(r,e,t,i){return r&&(r.legacy||r.legacy!==!1&&!t&&!i&&e!=="tspan"&&(e==="text"||ye(r,"text")))}function Xj(r,e,t){var i=r,n,a,s;if(e==="text")s=i;else{s={},ye(i,"text")&&(s.text=i.text),ye(i,"rich")&&(s.rich=i.rich),ye(i,"textFill")&&(s.fill=i.textFill),ye(i,"textStroke")&&(s.stroke=i.textStroke),ye(i,"fontFamily")&&(s.fontFamily=i.fontFamily),ye(i,"fontSize")&&(s.fontSize=i.fontSize),ye(i,"fontStyle")&&(s.fontStyle=i.fontStyle),ye(i,"fontWeight")&&(s.fontWeight=i.fontWeight),a={type:"text",style:s,silent:!0},n={};var o=ye(i,"textPosition");t?n.position=o?i.textPosition:"inside":o&&(n.position=i.textPosition),ye(i,"textPosition")&&(n.position=i.textPosition),ye(i,"textOffset")&&(n.offset=i.textOffset),ye(i,"textRotation")&&(n.rotation=i.textRotation),ye(i,"textDistance")&&(n.distance=i.textDistance)}return jB(s,r),R(s.rich,function(l){jB(l,l)}),{textConfig:n,textContent:a}}function jB(r,e){e&&(e.font=e.textFont||e.font,ye(e,"textStrokeWidth")&&(r.lineWidth=e.textStrokeWidth),ye(e,"textAlign")&&(r.align=e.textAlign),ye(e,"textVerticalAlign")&&(r.verticalAlign=e.textVerticalAlign),ye(e,"textLineHeight")&&(r.lineHeight=e.textLineHeight),ye(e,"textWidth")&&(r.width=e.textWidth),ye(e,"textHeight")&&(r.height=e.textHeight),ye(e,"textBackgroundColor")&&(r.backgroundColor=e.textBackgroundColor),ye(e,"textPadding")&&(r.padding=e.textPadding),ye(e,"textBorderColor")&&(r.borderColor=e.textBorderColor),ye(e,"textBorderWidth")&&(r.borderWidth=e.textBorderWidth),ye(e,"textBorderRadius")&&(r.borderRadius=e.textBorderRadius),ye(e,"textBoxShadowColor")&&(r.shadowColor=e.textBoxShadowColor),ye(e,"textBoxShadowBlur")&&(r.shadowBlur=e.textBoxShadowBlur),ye(e,"textBoxShadowOffsetX")&&(r.shadowOffsetX=e.textBoxShadowOffsetX),ye(e,"textBoxShadowOffsetY")&&(r.shadowOffsetY=e.textBoxShadowOffsetY))}function XB(r,e,t){var i=r;i.textPosition=i.textPosition||t.position||"inside",t.offset!=null&&(i.textOffset=t.offset),t.rotation!=null&&(i.textRotation=t.rotation),t.distance!=null&&(i.textDistance=t.distance);var n=i.textPosition.indexOf("inside")>=0,a=r.fill||"#000";YB(i,e);var s=i.textFill==null;return n?s&&(i.textFill=t.insideFill||"#fff",!i.textStroke&&t.insideStroke&&(i.textStroke=t.insideStroke),!i.textStroke&&(i.textStroke=a),i.textStrokeWidth==null&&(i.textStrokeWidth=2)):(s&&(i.textFill=r.fill||t.outsideFill||"#000"),!i.textStroke&&t.outsideStroke&&(i.textStroke=t.outsideStroke)),i.text=e.text,i.rich=e.rich,R(e.rich,function(o){YB(o,o)}),i}function YB(r,e){e&&(ye(e,"fill")&&(r.textFill=e.fill),ye(e,"stroke")&&(r.textStroke=e.fill),ye(e,"lineWidth")&&(r.textStrokeWidth=e.lineWidth),ye(e,"font")&&(r.font=e.font),ye(e,"fontStyle")&&(r.fontStyle=e.fontStyle),ye(e,"fontWeight")&&(r.fontWeight=e.fontWeight),ye(e,"fontSize")&&(r.fontSize=e.fontSize),ye(e,"fontFamily")&&(r.fontFamily=e.fontFamily),ye(e,"align")&&(r.textAlign=e.align),ye(e,"verticalAlign")&&(r.textVerticalAlign=e.verticalAlign),ye(e,"lineHeight")&&(r.textLineHeight=e.lineHeight),ye(e,"width")&&(r.textWidth=e.width),ye(e,"height")&&(r.textHeight=e.height),ye(e,"backgroundColor")&&(r.textBackgroundColor=e.backgroundColor),ye(e,"padding")&&(r.textPadding=e.padding),ye(e,"borderColor")&&(r.textBorderColor=e.borderColor),ye(e,"borderWidth")&&(r.textBorderWidth=e.borderWidth),ye(e,"borderRadius")&&(r.textBorderRadius=e.borderRadius),ye(e,"shadowColor")&&(r.textBoxShadowColor=e.shadowColor),ye(e,"shadowBlur")&&(r.textBoxShadowBlur=e.shadowBlur),ye(e,"shadowOffsetX")&&(r.textBoxShadowOffsetX=e.shadowOffsetX),ye(e,"shadowOffsetY")&&(r.textBoxShadowOffsetY=e.shadowOffsetY),ye(e,"textShadowColor")&&(r.textShadowColor=e.textShadowColor),ye(e,"textShadowBlur")&&(r.textShadowBlur=e.textShadowBlur),ye(e,"textShadowOffsetX")&&(r.textShadowOffsetX=e.textShadowOffsetX),ye(e,"textShadowOffsetY")&&(r.textShadowOffsetY=e.textShadowOffsetY))}var Yj={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},KB=rt(Yj);Qn(ps,function(r,e){return r[e]=1,r},{});ps.join(", ");var x_=["","style","shape","extra"],Cf=lt();function iI(r,e,t,i,n){var a=r+"Animation",s=Hf(r,i,n)||{},o=Cf(e).userDuring;return s.duration>0&&(s.during=o?ge(XTe,{el:e,userDuring:o}):null,s.setToFinal=!0,s.scope=r),Q(s,t[a]),s}function qy(r,e,t,i){i=i||{};var n=i.dataIndex,a=i.isInit,s=i.clearStyle,o=t.isAnimationEnabled(),l=Cf(r),u=e.style;l.userDuring=e.during;var c={},h={};if(KTe(r,e,h),QB("shape",e,h),QB("extra",e,h),!a&&o&&(YTe(r,e,c),ZB("shape",r,e,c),ZB("extra",r,e,c),ZTe(r,e,u,c)),h.style=u,$Te(r,h,s),qTe(r,e),o)if(a){var d={};R(x_,function(p){var v=p?e[p]:e;v&&v.enterFrom&&(p&&(d[p]=d[p]||{}),Q(p?d[p]:d,v.enterFrom))});var f=iI("enter",r,e,t,n);f.duration>0&&r.animateFrom(d,f)}else WTe(r,e,n||0,t,c);Kj(r,e),u?r.dirty():r.markRedraw()}function Kj(r,e){for(var t=Cf(r).leaveToProps,i=0;i<x_.length;i++){var n=x_[i],a=n?e[n]:e;a&&a.leaveTo&&(t||(t=Cf(r).leaveToProps={}),n&&(t[n]=t[n]||{}),Q(n?t[n]:t,a.leaveTo))}}function nb(r,e,t,i){if(r){var n=r.parent,a=Cf(r).leaveToProps;if(a){var s=iI("update",r,e,t,0);s.done=function(){n.remove(r)},r.animateTo(a,s)}else n.remove(r)}}function Ku(r){return r==="all"}function $Te(r,e,t){var i=e.style;if(!r.isGroup&&i){if(t){r.useStyle({});for(var n=r.animators,a=0;a<n.length;a++){var s=n[a];s.targetName==="style"&&s.changeTarget(r.style)}}r.setStyle(i)}e&&(e.style=null,e&&r.attr(e),e.style=i)}function WTe(r,e,t,i,n){if(n){var a=iI("update",r,e,i,t);a.duration>0&&r.animateFrom(n,a)}}function qTe(r,e){ye(e,"silent")&&(r.silent=e.silent),ye(e,"ignore")&&(r.ignore=e.ignore),r instanceof Jn&&ye(e,"invisible")&&(r.invisible=e.invisible),r instanceof Je&&ye(e,"autoBatch")&&(r.autoBatch=e.autoBatch)}var Va={},jTe={setTransform:function(r,e){return Va.el[r]=e,this},getTransform:function(r){return Va.el[r]},setShape:function(r,e){var t=Va.el,i=t.shape||(t.shape={});return i[r]=e,t.dirtyShape&&t.dirtyShape(),this},getShape:function(r){var e=Va.el.shape;if(e)return e[r]},setStyle:function(r,e){var t=Va.el,i=t.style;return i&&(i[r]=e,t.dirtyStyle&&t.dirtyStyle()),this},getStyle:function(r){var e=Va.el.style;if(e)return e[r]},setExtra:function(r,e){var t=Va.el.extra||(Va.el.extra={});return t[r]=e,this},getExtra:function(r){var e=Va.el.extra;if(e)return e[r]}};function XTe(){var r=this,e=r.el;if(e){var t=Cf(e).userDuring,i=r.userDuring;if(t!==i){r.el=r.userDuring=null;return}Va.el=e,i(jTe)}}function ZB(r,e,t,i){var n=t[r];if(n){var a=e[r],s;if(a){var o=t.transition,l=n.transition;if(l)if(!s&&(s=i[r]={}),Ku(l))Q(s,a);else for(var u=wt(l),c=0;c<u.length;c++){var h=u[c],d=a[h];s[h]=d}else if(Ku(o)||Xe(o,r)>=0){!s&&(s=i[r]={});for(var f=rt(a),c=0;c<f.length;c++){var h=f[c],d=a[h];QTe(n[h],d)&&(s[h]=d)}}}}}function QB(r,e,t){var i=e[r];if(i)for(var n=t[r]={},a=rt(i),s=0;s<a.length;s++){var o=a[s];n[o]=qp(i[o])}}function YTe(r,e,t){for(var i=e.transition,n=Ku(i)?ps:wt(i||[]),a=0;a<n.length;a++){var s=n[a];if(!(s==="style"||s==="shape"||s==="extra")){var o=r[s];t[s]=o}}}function KTe(r,e,t){for(var i=0;i<KB.length;i++){var n=KB[i],a=Yj[n],s=e[n];s&&(t[a[0]]=s[0],t[a[1]]=s[1])}for(var i=0;i<ps.length;i++){var o=ps[i];e[o]!=null&&(t[o]=e[o])}}function ZTe(r,e,t,i){if(t){var n=r.style,a;if(n){var s=t.transition,o=e.transition;if(s&&!Ku(s)){var l=wt(s);!a&&(a=i.style={});for(var u=0;u<l.length;u++){var c=l[u],h=n[c];a[c]=h}}else if(r.getAnimationStyleProps&&(Ku(o)||Ku(s)||Xe(o,"style")>=0)){var d=r.getAnimationStyleProps(),f=d?d.style:null;if(f){!a&&(a=i.style={});for(var p=rt(t),u=0;u<p.length;u++){var c=p[u];if(f[c]){var h=n[c];a[c]=h}}}}}}}function QTe(r,e){return Jr(r)?r!==e:r!=null&&isFinite(r)}var Zj=lt(),JTe=["percent","easing","shape","style","extra"];function Qj(r){r.stopAnimation("keyframe"),r.attr(Zj(r))}function w_(r,e,t){if(!(!t.isAnimationEnabled()||!e)){if(ie(e)){R(e,function(o){w_(r,o,t)});return}var i=e.keyframes,n=e.duration;if(t&&n==null){var a=Hf("enter",t,0);n=a&&a.duration}if(!(!i||!n)){var s=Zj(r);R(x_,function(o){if(!(o&&!r[o])){var l;i.sort(function(u,c){return u.percent-c.percent}),R(i,function(u){var c=r.animators,h=o?u[o]:u;if(h){var d=rt(h);if(o||(d=_t(d,function(v){return Xe(JTe,v)<0})),!!d.length){l||(l=r.animate(o,e.loop,!0),l.scope="keyframe");for(var f=0;f<c.length;f++)c[f]!==l&&c[f].targetName===l.targetName&&c[f].stopTracks(d);o&&(s[o]=s[o]||{});var p=o?s[o]:s;R(d,function(v){p[v]=((o?r[o]:r)||{})[v]}),l.whenWithKeys(n*u.percent,h,d,u.easing)}}}),l&&l.delay(e.delay||0).duration(n).start(e.easing)}})}}}var Ws="emphasis",$o="normal",nI="blur",aI="select",cl=[$o,Ws,nI,aI],px={normal:["itemStyle"],emphasis:[Ws,"itemStyle"],blur:[nI,"itemStyle"],select:[aI,"itemStyle"]},vx={normal:["label"],emphasis:[Ws,"label"],blur:[nI,"label"],select:[aI,"label"]},exe=["x","y"],txe="e\0\0",Rn={normal:{},emphasis:{},blur:{},select:{}},rxe={cartesian2d:NTe,geo:FTe,single:VTe,polar:GTe,calendar:HTe};function dC(r){return r instanceof Je}function pC(r){return r instanceof Jn}function ixe(r,e){e.copyTransform(r),pC(e)&&pC(r)&&(e.setStyle(r.style),e.z=r.z,e.z2=r.z2,e.zlevel=r.zlevel,e.invisible=r.invisible,e.ignore=r.ignore,dC(e)&&dC(r)&&e.setShape(r.shape))}var nxe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,n,a){this._progressiveEls=null;var s=this._data,o=t.getData(),l=this.group,u=JB(t,o,i,n);s||l.removeAll(),o.diff(s).add(function(h){gx(n,null,h,u(h,a),t,l,o)}).remove(function(h){var d=s.getItemGraphicEl(h);d&&nb(d,$s(d).option,t)}).update(function(h,d){var f=s.getItemGraphicEl(d);gx(n,f,h,u(h,a),t,l,o)}).execute();var c=t.get("clip",!0)?Ig(t.coordinateSystem,!1,t):null;c?l.setClipPath(c):l.removeClipPath(),this._data=o},e.prototype.incrementalPrepareRender=function(t,i,n){this.group.removeAll(),this._data=null},e.prototype.incrementalRender=function(t,i,n,a,s){var o=i.getData(),l=JB(i,o,n,a),u=this._progressiveEls=[];function c(f){f.isGroup||(f.incremental=!0,f.ensureState("emphasis").hoverLayer=!0)}for(var h=t.start;h<t.end;h++){var d=gx(null,null,h,l(h,s),i,this.group,o);d&&(d.traverse(c),u.push(d))}},e.prototype.eachRendered=function(t){gl(this._progressiveEls||this.group,t)},e.prototype.filterForExposedEvent=function(t,i,n,a){var s=i.element;if(s==null||n.name===s)return!0;for(;(n=n.__hostTarget||n.parent)&&n!==this.group;)if(n.name===s)return!0;return!1},e.type="custom",e}(Tt);function sI(r){var e=r.type,t;if(e==="path"){var i=r.shape,n=i.width!=null&&i.height!=null?{x:i.x||0,y:i.y||0,width:i.width,height:i.height}:null,a=tX(i);t=Tg(a,null,n,i.layout||"center"),$s(t).customPathData=a}else if(e==="image")t=new Ur({}),$s(t).customImagePath=r.style.image;else if(e==="text")t=new nt({});else if(e==="group")t=new Le;else{if(e==="compoundPath")throw new Error('"compoundPath" is not supported yet.');var s=R1(e);if(!s){var o="";gt(o)}t=new s}return $s(t).customGraphicType=e,t.name=r.name,t.z2EmphasisLift=1,t.z2SelectLift=1,t}function oI(r,e,t,i,n,a,s){Qj(e);var o=n&&n.normal.cfg;o&&e.setTextConfig(o),i&&i.transition==null&&(i.transition=exe);var l=i&&i.style;if(l){if(e.type==="text"){var u=l;ye(u,"textFill")&&(u.fill=u.textFill),ye(u,"textStroke")&&(u.stroke=u.textStroke)}var c=void 0,h=dC(e)?l.decal:null;r&&h&&(h.dirty=!0,c=Sf(h,r)),l.__decalPattern=c}if(pC(e)&&l){var c=l.__decalPattern;c&&(l.decal=c)}qy(e,i,a,{dataIndex:t,isInit:s,clearStyle:!0}),w_(e,i.keyframeAnimation,a)}function Jj(r,e,t,i,n){var a=e.isGroup?null:e,s=n&&n[r].cfg;if(a){var o=a.ensureState(r);if(i===!1){var l=a.getState(r);l&&(l.style=null)}else o.style=i||null;s&&(o.textConfig=s),lc(a)}}function axe(r,e,t){if(!r.isGroup){var i=r,n=t.currentZ,a=t.currentZLevel;i.z=n,i.zlevel=a;var s=e.z2;s!=null&&(i.z2=s||0);for(var o=0;o<cl.length;o++)sxe(i,e,cl[o])}}function sxe(r,e,t){var i=t===$o,n=i?e:C_(e,t),a=n?n.z2:null,s;a!=null&&(s=i?r:r.ensureState(t),s.z2=a||0)}function JB(r,e,t,i){var n=r.get("renderItem"),a=r.coordinateSystem,s={};a&&(s=a.prepareCustoms?a.prepareCustoms(a):rxe[a.type](a));for(var o=Ce({getWidth:i.getWidth,getHeight:i.getHeight,getZr:i.getZr,getDevicePixelRatio:i.getDevicePixelRatio,value:b,style:x,ordinalRawValue:T,styleEmphasis:C,visual:M,barLayout:L,currentSeriesIndices:N,font:O},s.api||{}),l={context:{},seriesId:r.id,seriesName:r.name,seriesIndex:r.seriesIndex,coordSys:s.coordSys,dataInsideLength:e.count(),encode:oxe(r.getData())},u,c,h={},d={},f={},p={},v=0;v<cl.length;v++){var g=cl[v];f[g]=r.getModel(px[g]),p[g]=r.getModel(vx[g])}function m(B){return B===u?c||(c=e.getItemModel(B)):e.getItemModel(B)}function y(B,F){return e.hasItemOption?B===u?h[F]||(h[F]=m(B).getModel(px[F])):m(B).getModel(px[F]):f[F]}function _(B,F){return e.hasItemOption?B===u?d[F]||(d[F]=m(B).getModel(vx[F])):m(B).getModel(vx[F]):p[F]}return function(B,F){return u=B,c=null,h={},d={},n&&n(Ce({dataIndexInside:B,dataIndex:e.getRawIndex(B),actionType:F?F.type:null},l),o)};function b(B,F){return F==null&&(F=u),e.getStore().get(e.getDimensionIndex(B||0),F)}function T(B,F){F==null&&(F=u),B=B||0;var U=e.getDimensionInfo(B);if(!U){var $=e.getDimensionIndex(B);return $>=0?e.getStore().get($,F):void 0}var q=e.get(U.name,F),Z=U&&U.ordinalMeta;return Z?Z.categories[q]:q}function x(B,F){F==null&&(F=u);var U=e.getItemVisual(F,"style"),$=U&&U.fill,q=U&&U.opacity,Z=y(F,$o).getItemStyle();$!=null&&(Z.fill=$),q!=null&&(Z.opacity=q);var te={inheritColor:de($)?$:"#000"},J=_(F,$o),oe=Mt(J,null,te,!1,!0);oe.text=J.getShallow("show")?Fe(r.getFormattedLabel(F,$o),Tf(e,F)):null;var he=J0(J,te,!1);return I(B,Z),Z=XB(Z,oe,he),B&&D(Z,B),Z.legacy=!0,Z}function C(B,F){F==null&&(F=u);var U=y(F,Ws).getItemStyle(),$=_(F,Ws),q=Mt($,null,null,!0,!0);q.text=$.getShallow("show")?Ta(r.getFormattedLabel(F,Ws),r.getFormattedLabel(F,$o),Tf(e,F)):null;var Z=J0($,null,!0);return I(B,U),U=XB(U,q,Z),B&&D(U,B),U.legacy=!0,U}function D(B,F){for(var U in F)ye(F,U)&&(B[U]=F[U])}function I(B,F){B&&(B.textFill&&(F.textFill=B.textFill),B.textPosition&&(F.textPosition=B.textPosition))}function M(B,F){if(F==null&&(F=u),ye(qB,B)){var U=e.getItemVisual(F,"style");return U?U[qB[B]]:null}if(ye(kTe,B))return e.getItemVisual(F,B)}function L(B){if(a.type==="cartesian2d"){var F=a.getBaseAxis();return Nve(Ce({axis:F},B))}}function N(){return t.getCurrentSeriesIndices()}function O(B){return VD(B,t)}}function oxe(r){var e={};return R(r.dimensions,function(t){var i=r.getDimensionInfo(t);if(!i.isExtraCoord){var n=i.coordDim,a=e[n]=e[n]||[];a[i.coordDimIndex]=r.getDimensionIndex(t)}}),e}function gx(r,e,t,i,n,a,s){if(!i){a.remove(e);return}var o=lI(r,e,t,i,n,a);return o&&s.setItemGraphicEl(t,o),o&&Kt(o,i.focus,i.blurScope,i.emphasisDisabled),o}function lI(r,e,t,i,n,a){var s=-1,o=e;e&&eX(e,i,n)&&(s=Xe(a.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=sI(i),o&&ixe(o,u)),i.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),Rn.normal.cfg=Rn.normal.conOpt=Rn.emphasis.cfg=Rn.emphasis.conOpt=Rn.blur.cfg=Rn.blur.conOpt=Rn.select.cfg=Rn.select.conOpt=null,Rn.isLegacy=!1,uxe(u,t,i,n,l,Rn),lxe(u,t,i,n,l),oI(r,u,t,i,Rn,n,l),ye(i,"info")&&($s(u).info=i.info);for(var c=0;c<cl.length;c++){var h=cl[c];if(h!==$o){var d=C_(i,h),f=uI(i,d,h);Jj(h,u,d,f,Rn)}}return axe(u,i,n),i.type==="group"&&cxe(r,u,t,i,n),s>=0?a.replaceAt(u,s):a.add(u),u}function eX(r,e,t){var i=$s(r),n=e.type,a=e.shape,s=e.style;return t.isUniversalTransitionEnabled()||n!=null&&n!==i.customGraphicType||n==="path"&&pxe(a)&&tX(a)!==i.customPathData||n==="image"&&ye(s,"image")&&s.image!==i.customImagePath}function lxe(r,e,t,i,n){var a=t.clipPath;if(a===!1)r&&r.getClipPath()&&r.removeClipPath();else if(a){var s=r.getClipPath();s&&eX(s,a,i)&&(s=null),s||(s=sI(a),r.setClipPath(s)),oI(null,s,e,a,null,i,n)}}function uxe(r,e,t,i,n,a){if(!r.isGroup){e3(t,null,a),e3(t,Ws,a);var s=a.normal.conOpt,o=a.emphasis.conOpt,l=a.blur.conOpt,u=a.select.conOpt;if(s!=null||o!=null||u!=null||l!=null){var c=r.getTextContent();if(s===!1)c&&r.removeTextContent();else{s=a.normal.conOpt=s||{type:"text"},c?c.clearStates():(c=sI(s),r.setTextContent(c)),oI(null,c,e,s,null,i,n);for(var h=s&&s.style,d=0;d<cl.length;d++){var f=cl[d];if(f!==$o){var p=a[f].conOpt;Jj(f,c,p,uI(s,p,f),null)}}h?c.dirty():c.markRedraw()}}}}function e3(r,e,t){var i=e?C_(r,e):r,n=e?uI(r,i,Ws):r.style,a=r.type,s=i?i.textConfig:null,o=r.textContent,l=o?e?C_(o,e):o:null;if(n&&(t.isLegacy||jj(n,a,!!s,!!l))){t.isLegacy=!0;var u=Xj(n,a,!e);!s&&u.textConfig&&(s=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!e&&l){var c=l;!c.type&&(c.type="text")}var h=e?t[e]:t.normal;h.cfg=s,h.conOpt=l}function C_(r,e){return e?r?r[e]:null:r}function uI(r,e,t){var i=e&&e.style;return i==null&&t===Ws&&r&&(i=r.styleEmphasis),i}function cxe(r,e,t,i,n){var a=i.children,s=a?a.length:0,o=i.$mergeChildren,l=o==="byName"||i.diffChildrenByName,u=o===!1;if(!(!s&&!l&&!u)){if(l){fxe({api:r,oldChildren:e.children()||[],newChildren:a||[],dataIndex:t,seriesModel:n,group:e});return}u&&e.removeAll();for(var c=0;c<s;c++){var h=a[c],d=e.childAt(c);h?(h.ignore==null&&(h.ignore=!1),lI(r,d,t,h,n,e)):d.ignore=!0}for(var f=e.childCount()-1;f>=c;f--){var p=e.childAt(f);hxe(e,p,n)}}}function hxe(r,e,t){e&&nb(e,$s(r).option,t)}function fxe(r){new to(r.oldChildren,r.newChildren,t3,t3,r).add(r3).update(r3).remove(dxe).execute()}function t3(r,e){var t=r&&r.name;return t??txe+e}function r3(r,e){var t=this.context,i=r!=null?t.newChildren[r]:null,n=e!=null?t.oldChildren[e]:null;lI(t.api,n,t.dataIndex,i,t.seriesModel,t.group)}function dxe(r){var e=this.context,t=e.oldChildren[r];t&&nb(t,$s(t).option,e.seriesModel)}function tX(r){return r&&(r.pathData||r.d)}function pxe(r){return r&&(ye(r,"pathData")||ye(r,"d"))}function vxe(r){r.registerChartView(nxe),r.registerSeriesModel(RTe)}var mu=lt(),i3=Ee,mx=ge,cI=function(){function r(){this._dragging=!1,this.animationThreshold=15}return r.prototype.render=function(e,t,i,n){var a=t.get("value"),s=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=i,!(!n&&this._lastValue===a&&this._lastStatus===s)){this._lastValue=a,this._lastStatus=s;var o=this._group,l=this._handle;if(!s||s==="hide"){o&&o.hide(),l&&l.hide();return}o&&o.show(),l&&l.show();var u={};this.makeElOption(u,a,e,t,i);var c=u.graphicKey;c!==this._lastGraphicKey&&this.clear(i),this._lastGraphicKey=c;var h=this._moveAnimation=this.determineAnimation(e,t);if(!o)o=this._group=new Le,this.createPointerEl(o,u,e,t),this.createLabelEl(o,u,e,t),i.getZr().add(o);else{var d=Be(n3,t,h);this.updatePointerEl(o,u,d),this.updateLabelEl(o,u,d,t)}s3(o,t,!0),this._renderHandle(a)}},r.prototype.remove=function(e){this.clear(e)},r.prototype.dispose=function(e){this.clear(e)},r.prototype.determineAnimation=function(e,t){var i=t.get("animation"),n=e.axis,a=n.type==="category",s=t.get("snap");if(!s&&!a)return!1;if(i==="auto"||i==null){var o=this.animationThreshold;if(a&&n.getBandWidth()>o)return!0;if(s){var l=RE(e).seriesDataCount,u=n.getExtent();return Math.abs(u[0]-u[1])/l>o}return!1}return i===!0},r.prototype.makeElOption=function(e,t,i,n,a){},r.prototype.createPointerEl=function(e,t,i,n){var a=t.pointer;if(a){var s=mu(e).pointerEl=new mc[a.type](i3(t.pointer));e.add(s)}},r.prototype.createLabelEl=function(e,t,i,n){if(t.label){var a=mu(e).labelEl=new nt(i3(t.label));e.add(a),a3(a,n)}},r.prototype.updatePointerEl=function(e,t,i){var n=mu(e).pointerEl;n&&t.pointer&&(n.setStyle(t.pointer.style),i(n,{shape:t.pointer.shape}))},r.prototype.updateLabelEl=function(e,t,i,n){var a=mu(e).labelEl;a&&(a.setStyle(t.label.style),i(a,{x:t.label.x,y:t.label.y}),a3(a,n))},r.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var t=this._axisPointerModel,i=this._api.getZr(),n=this._handle,a=t.getModel("handle"),s=t.get("status");if(!a.get("show")||!s||s==="hide"){n&&i.remove(n),this._handle=null;return}var o;this._handle||(o=!0,n=this._handle=$f(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){Qs(u.event)},onmousedown:mx(this._onHandleDragMove,this,0,0),drift:mx(this._onHandleDragMove,this),ondragend:mx(this._onHandleDragEnd,this)}),i.add(n)),s3(n,t,!1),n.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=a.get("size");ie(l)||(l=[l,l]),n.scaleX=l[0]/2,n.scaleY=l[1]/2,Qf(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,o)}},r.prototype._moveHandleToValue=function(e,t){n3(this._axisPointerModel,!t&&this._moveAnimation,this._handle,yx(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(e,t){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform(yx(i),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(yx(n)),mu(i).lastProp=null,this._doDispatchAxisPointer()}},r.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(e){var t=this._payloadInfo,i=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:i.axis.dim,axisIndex:i.componentIndex}]})}},r.prototype._onHandleDragEnd=function(){this._dragging=!1;var e=this._handle;if(e){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},r.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),i=this._group,n=this._handle;t&&i&&(this._lastGraphicKey=null,i&&t.remove(i),n&&t.remove(n),this._group=null,this._handle=null,this._payloadInfo=null),Bv(this,"_doDispatchAxisPointer")},r.prototype.doClear=function(){},r.prototype.buildLabel=function(e,t,i){return i=i||0,{x:e[i],y:e[1-i],width:t[i],height:t[1-i]}},r}();function n3(r,e,t,i){rX(mu(t).lastProp,i)||(mu(t).lastProp=i,e?ct(t,i,r):(t.stopAnimation(),t.attr(i)))}function rX(r,e){if(Ae(r)&&Ae(e)){var t=!0;return R(e,function(i,n){t=t&&rX(r[n],i)}),!!t}else return r===e}function a3(r,e){r[e.get(["label","show"])?"show":"hide"]()}function yx(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function s3(r,e,t){var i=e.get("z"),n=e.get("zlevel");r&&r.traverse(function(a){a.type!=="group"&&(i!=null&&(a.z=i),n!=null&&(a.zlevel=n),a.silent=t)})}function hI(r){var e=r.get("type"),t=r.getModel(e+"Style"),i;return e==="line"?(i=t.getLineStyle(),i.fill=null):e==="shadow"&&(i=t.getAreaStyle(),i.stroke=null),i}function iX(r,e,t,i,n){var a=t.get("value"),s=nX(a,e.axis,e.ecModel,t.get("seriesDataIndices"),{precision:t.get(["label","precision"]),formatter:t.get(["label","formatter"])}),o=t.getModel("label"),l=yc(o.get("padding")||0),u=o.getFont(),c=mg(s,u),h=n.position,d=c.width+l[1]+l[3],f=c.height+l[0]+l[2],p=n.align;p==="right"&&(h[0]-=d),p==="center"&&(h[0]-=d/2);var v=n.verticalAlign;v==="bottom"&&(h[1]-=f),v==="middle"&&(h[1]-=f/2),gxe(h,d,f,i);var g=o.get("backgroundColor");(!g||g==="auto")&&(g=e.get(["axisLine","lineStyle","color"])),r.label={x:h[0],y:h[1],style:Mt(o,{text:s,font:u,fill:o.getTextColor(),padding:l,backgroundColor:g}),z2:10}}function gxe(r,e,t,i){var n=i.getWidth(),a=i.getHeight();r[0]=Math.min(r[0]+e,n)-e,r[1]=Math.min(r[1]+t,a)-t,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0)}function nX(r,e,t,i,n){r=e.scale.parse(r);var a=e.scale.getLabel({value:r},{precision:n.precision}),s=n.formatter;if(s){var o={value:xE(e,{value:r}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};R(i,function(l){var u=t.getSeriesByIndex(l.seriesIndex),c=l.dataIndexInside,h=u&&u.getDataParams(c);h&&o.seriesData.push(h)}),de(s)?a=s.replace("{value}",a):xe(s)&&(a=s(o))}return a}function fI(r,e,t){var i=Ji();return vl(i,i,t.rotation),Da(i,i,t.position),Ca([r.dataToCoord(e),(t.labelOffset||0)+(t.labelDirection||1)*(t.labelMargin||0)],i)}function aX(r,e,t,i,n,a){var s=ki.innerTextLayout(t.rotation,0,t.labelDirection);t.labelMargin=n.get(["label","margin"]),iX(e,i,n,a,{position:fI(i.axis,r,t),align:s.textAlign,verticalAlign:s.textVerticalAlign})}function dI(r,e,t){return t=t||0,{x1:r[t],y1:r[1-t],x2:e[t],y2:e[1-t]}}function sX(r,e,t){return t=t||0,{x:r[t],y:r[1-t],width:e[t],height:e[1-t]}}function o3(r,e,t,i,n,a){return{cx:r,cy:e,r0:t,r:i,startAngle:n,endAngle:a,clockwise:!0}}var mxe=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,i,n,a,s){var o=n.axis,l=o.grid,u=a.get("type"),c=l3(l,o).getOtherAxis(o).getGlobalExtent(),h=o.toGlobalCoord(o.dataToCoord(i,!0));if(u&&u!=="none"){var d=hI(a),f=yxe[u](o,h,c);f.style=d,t.graphicKey=f.type,t.pointer=f}var p=X2(l.model,n);aX(i,t,p,n,a,s)},e.prototype.getHandleTransform=function(t,i,n){var a=X2(i.axis.grid.model,i,{labelInside:!1});a.labelMargin=n.get(["handle","margin"]);var s=fI(i.axis,t,a);return{x:s[0],y:s[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,i,n,a){var s=n.axis,o=s.grid,l=s.getGlobalExtent(!0),u=l3(o,s).getOtherAxis(s).getGlobalExtent(),c=s.dim==="x"?0:1,h=[t.x,t.y];h[c]+=i[c],h[c]=Math.min(l[1],h[c]),h[c]=Math.max(l[0],h[c]);var d=(u[1]+u[0])/2,f=[d,d];f[c]=h[c];var p=[{verticalAlign:"middle"},{align:"center"}];return{x:h[0],y:h[1],rotation:t.rotation,cursorPoint:f,tooltipOption:p[c]}},e}(cI);function l3(r,e){var t={};return t[e.dim+"AxisIndex"]=e.index,r.getCartesian(t)}var yxe={line:function(r,e,t){var i=dI([e,t[0]],[e,t[1]],u3(r));return{type:"Line",subPixelOptimize:!0,shape:i}},shadow:function(r,e,t){var i=Math.max(1,r.getBandWidth()),n=t[1]-t[0];return{type:"Rect",shape:sX([e-i/2,t[0]],[i,n],u3(r))}}};function u3(r){return r.dim==="x"?0:1}var _xe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#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}(Qe),zs=lt(),bxe=R;function oX(r,e,t){if(!et.node){var i=e.getZr();zs(i).records||(zs(i).records={}),Sxe(i,e);var n=zs(i).records[r]||(zs(i).records[r]={});n.handler=t}}function Sxe(r,e){if(zs(r).initialized)return;zs(r).initialized=!0,t("click",Be(c3,"click")),t("mousemove",Be(c3,"mousemove")),t("globalout",xxe);function t(i,n){r.on(i,function(a){var s=wxe(e);bxe(zs(r).records,function(o){o&&n(o,a,s.dispatchAction)}),Txe(s.pendings,e)})}}function Txe(r,e){var t=r.showTip.length,i=r.hideTip.length,n;t?n=r.showTip[t-1]:i&&(n=r.hideTip[i-1]),n&&(n.dispatchAction=null,e.dispatchAction(n))}function xxe(r,e,t){r.handler("leave",null,t)}function c3(r,e,t,i){e.handler(r,t,i)}function wxe(r){var e={showTip:[],hideTip:[]},t=function(i){var n=e[i.type];n?n.push(i):(i.dispatchAction=t,r.dispatchAction(i))};return{dispatchAction:t,pendings:e}}function vC(r,e){if(!et.node){var t=e.getZr(),i=(zs(t).records||{})[r];i&&(zs(t).records[r]=null)}}var Cxe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,n){var a=i.getComponent("tooltip"),s=t.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";oX("axisPointer",n,function(o,l,u){s!=="none"&&(o==="leave"||s.indexOf(o)>=0)&&u({type:"updateAxisPointer",currTrigger:o,x:l&&l.offsetX,y:l&&l.offsetY})})},e.prototype.remove=function(t,i){vC("axisPointer",i)},e.prototype.dispose=function(t,i){vC("axisPointer",i)},e.type="axisPointer",e}(Nt);function lX(r,e){var t=[],i=r.seriesIndex,n;if(i==null||!(n=e.getSeriesByIndex(i)))return{point:[]};var a=n.getData(),s=sc(a,r);if(s==null||s<0||ie(s))return{point:[]};var o=a.getItemGraphicEl(s),l=n.coordinateSystem;if(n.getTooltipPosition)t=n.getTooltipPosition(s)||[];else if(l&&l.dataToPoint)if(r.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u),h=c.dim,d=u.dim,f=h==="x"||h==="radius"?1:0,p=a.mapDimension(d),v=[];v[f]=a.get(p,s),v[1-f]=a.get(a.getCalculationInfo("stackResultDimension"),s),t=l.dataToPoint(v)||[]}else t=l.dataToPoint(a.getValues(ae(l.dimensions,function(m){return a.mapDimension(m)}),s))||[];else if(o){var g=o.getBoundingRect().clone();g.applyTransform(o.transform),t=[g.x+g.width/2,g.y+g.height/2]}return{point:t,el:o}}var h3=lt();function Axe(r,e,t){var i=r.currTrigger,n=[r.x,r.y],a=r,s=r.dispatchAction||ge(t.dispatchAction,t),o=e.getComponent("axisPointer").coordSysAxesInfo;if(o){jy(n)&&(n=lX({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},e).point);var l=jy(n),u=a.axesInfo,c=o.axesInfo,h=i==="leave"||jy(n),d={},f={},p={list:[],map:{}},v={showPointer:Be(Exe,f),showTooltip:Be(Ixe,p)};R(o.coordSysMap,function(m,y){var _=l||m.containPoint(n);R(o.coordSysAxesInfo[y],function(b,T){var x=b.axis,C=kxe(u,b);if(!h&&_&&(!u||C)){var D=C&&C.value;D==null&&!l&&(D=x.pointToData(n)),D!=null&&f3(b,D,v,!1,d)}})});var g={};return R(c,function(m,y){var _=m.linkGroup;_&&!f[y]&&R(_.axesInfo,function(b,T){var x=f[T];if(b!==m&&x){var C=x.value;_.mapper&&(C=m.axis.scale.parse(_.mapper(C,d3(b),d3(m)))),g[m.key]=C}})}),R(g,function(m,y){f3(c[y],m,v,!0,d)}),Pxe(f,c,d),Mxe(p,n,r,s),Lxe(c,s,t),d}}function f3(r,e,t,i,n){var a=r.axis;if(!(a.scale.isBlank()||!a.containData(e))){if(!r.involveSeries){t.showPointer(r,e);return}var s=Dxe(e,r),o=s.payloadBatch,l=s.snapToValue;o[0]&&n.seriesIndex==null&&Q(n,o[0]),!i&&r.snap&&a.containData(l)&&l!=null&&(e=l),t.showPointer(r,e,o),t.showTooltip(r,s,l)}}function Dxe(r,e){var t=e.axis,i=t.dim,n=r,a=[],s=Number.MAX_VALUE,o=-1;return R(e.seriesModels,function(l,u){var c=l.getData().mapDimensionsAll(i),h,d;if(l.getAxisTooltipData){var f=l.getAxisTooltipData(c,r,t);d=f.dataIndices,h=f.nestestValue}else{if(d=l.getData().indicesOfNearest(c[0],r,t.type==="category"?.5:null),!d.length)return;h=l.getData().get(c[0],d[0])}if(!(h==null||!isFinite(h))){var p=r-h,v=Math.abs(p);v<=s&&((v<s||p>=0&&o<0)&&(s=v,o=p,n=h,a.length=0),R(d,function(g){a.push({seriesIndex:l.seriesIndex,dataIndexInside:g,dataIndex:l.getData().getRawIndex(g)})}))}}),{payloadBatch:a,snapToValue:n}}function Exe(r,e,t,i){r[e.key]={value:t,payloadBatch:i}}function Ixe(r,e,t,i){var n=t.payloadBatch,a=e.axis,s=a.model,o=e.axisPointerModel;if(!(!e.triggerTooltip||!n.length)){var l=e.coordSys.model,u=$v(l),c=r.map[u];c||(c=r.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},r.list.push(c)),c.dataByAxis.push({axisDim:a.dim,axisIndex:s.componentIndex,axisType:s.type,axisId:s.id,value:i,valueLabelOpt:{precision:o.get(["label","precision"]),formatter:o.get(["label","formatter"])},seriesDataIndices:n.slice()})}}function Pxe(r,e,t){var i=t.axesInfo=[];R(e,function(n,a){var s=n.axisPointerModel.option,o=r[a];o?(!n.useHandle&&(s.status="show"),s.value=o.value,s.seriesDataIndices=(o.payloadBatch||[]).slice()):!n.useHandle&&(s.status="hide"),s.status==="show"&&i.push({axisDim:n.axis.dim,axisIndex:n.axis.model.componentIndex,value:s.value})})}function Mxe(r,e,t,i){if(jy(e)||!r.list.length){i({type:"hideTip"});return}var n=((r.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:t.tooltipOption,position:t.position,dataIndexInside:n.dataIndexInside,dataIndex:n.dataIndex,seriesIndex:n.seriesIndex,dataByCoordSys:r.list})}function Lxe(r,e,t){var i=t.getZr(),n="axisPointerLastHighlights",a=h3(i)[n]||{},s=h3(i)[n]={};R(r,function(u,c){var h=u.axisPointerModel.option;h.status==="show"&&u.triggerEmphasis&&R(h.seriesDataIndices,function(d){var f=d.seriesIndex+" | "+d.dataIndex;s[f]=d})});var o=[],l=[];R(a,function(u,c){!s[c]&&l.push(u)}),R(s,function(u,c){!a[c]&&o.push(u)}),l.length&&t.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),o.length&&t.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:o})}function kxe(r,e){for(var t=0;t<(r||[]).length;t++){var i=r[t];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}function d3(r){var e=r.axis.model,t={},i=t.axisDim=r.axis.dim;return t.axisIndex=t[i+"AxisIndex"]=e.componentIndex,t.axisName=t[i+"AxisName"]=e.name,t.axisId=t[i+"AxisId"]=e.id,t}function jy(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function Og(r){Sc.registerAxisPointerClass("CartesianAxisPointer",mxe),r.registerComponentModel(_xe),r.registerComponentView(Cxe),r.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!ie(t)&&(e.axisPointer.link=[t])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=Hye(e,t)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},Axe)}function Rxe(r){Ye(Nq),Ye(Og)}var Oxe=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,i,n,a,s){var o=n.axis;o.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=o.polar,u=l.getOtherAxis(o),c=u.getExtent(),h=o.dataToCoord(i),d=a.get("type");if(d&&d!=="none"){var f=hI(a),p=Bxe[d](o,l,h,c);p.style=f,t.graphicKey=p.type,t.pointer=p}var v=a.get(["label","margin"]),g=Nxe(i,n,a,l,v);iX(t,n,a,s,g)},e}(cI);function Nxe(r,e,t,i,n){var a=e.axis,s=a.dataToCoord(r),o=i.getAngleAxis().getExtent()[0];o=o/180*Math.PI;var l=i.getRadiusAxis().getExtent(),u,c,h;if(a.dim==="radius"){var d=Ji();vl(d,d,o),Da(d,d,[i.cx,i.cy]),u=Ca([s,-n],d);var f=e.getModel("axisLabel").get("rotate")||0,p=ki.innerTextLayout(o,f*Math.PI/180,-1);c=p.textAlign,h=p.textVerticalAlign}else{var v=l[1];u=i.coordToPoint([v+n,s]);var g=i.cx,m=i.cy;c=Math.abs(u[0]-g)/v<.3?"center":u[0]>g?"left":"right",h=Math.abs(u[1]-m)/v<.3?"middle":u[1]>m?"top":"bottom"}return{position:u,align:c,verticalAlign:h}}var Bxe={line:function(r,e,t,i){return r.dim==="angle"?{type:"Line",shape:dI(e.coordToPoint([i[0],t]),e.coordToPoint([i[1],t]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:t}}},shadow:function(r,e,t,i){var n=Math.max(1,r.getBandWidth()),a=Math.PI/180;return r.dim==="angle"?{type:"Sector",shape:o3(e.cx,e.cy,i[0],i[1],(-t-n/2)*a,(-t+n/2)*a)}:{type:"Sector",shape:o3(e.cx,e.cy,t-n/2,t+n/2,0,Math.PI*2)}}},Fxe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.findAxisModel=function(t){var i,n=this.ecModel;return n.eachComponent(t,function(a){a.getCoordSysModel()===this&&(i=a)},this),i},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e}(Qe),pI=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",_r).models[0]},e.type="polarAxis",e}(Qe);ir(pI,rd);var Uxe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="angleAxis",e}(pI),Vxe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="radiusAxis",e}(pI),vI=function(r){j(e,r);function e(t,i){return r.call(this,"radius",t,i)||this}return e.prototype.pointToData=function(t,i){return this.polar.pointToData(t,i)[this.dim==="radius"?0:1]},e}(aa);vI.prototype.dataToRadius=aa.prototype.dataToCoord;vI.prototype.radiusToData=aa.prototype.coordToData;var zxe=lt(),gI=function(r){j(e,r);function e(t,i){return r.call(this,"angle",t,i||[0,360])||this}return e.prototype.pointToData=function(t,i){return this.polar.pointToData(t,i)[this.dim==="radius"?0:1]},e.prototype.calculateCategoryInterval=function(){var t=this,i=t.getLabelModel(),n=t.scale,a=n.getExtent(),s=n.count();if(a[1]-a[0]<1)return 0;var o=a[0],l=t.dataToCoord(o+1)-t.dataToCoord(o),u=Math.abs(l),c=mg(o==null?"":o+"",i.getFont(),"center","top"),h=Math.max(c.height,7),d=h/u;isNaN(d)&&(d=1/0);var f=Math.max(0,Math.floor(d)),p=zxe(t.model),v=p.lastAutoInterval,g=p.lastTickCount;return v!=null&&g!=null&&Math.abs(v-f)<=1&&Math.abs(g-s)<=1&&v>f?f=v:(p.lastTickCount=s,p.lastAutoInterval=f),f},e}(aa);gI.prototype.dataToAngle=aa.prototype.dataToCoord;gI.prototype.angleToData=aa.prototype.coordToData;var uX=["radius","angle"],Gxe=function(){function r(e){this.dimensions=uX,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new vI,this._angleAxis=new gI,this.axisPointerEnabled=!0,this.name=e||"",this._radiusAxis.polar=this._angleAxis.polar=this}return r.prototype.containPoint=function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},r.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},r.prototype.getAxis=function(e){var t="_"+e+"Axis";return this[t]},r.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},r.prototype.getAxesByScale=function(e){var t=[],i=this._angleAxis,n=this._radiusAxis;return i.scale.type===e&&t.push(i),n.scale.type===e&&t.push(n),t},r.prototype.getAngleAxis=function(){return this._angleAxis},r.prototype.getRadiusAxis=function(){return this._radiusAxis},r.prototype.getOtherAxis=function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},r.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},r.prototype.getTooltipAxes=function(e){var t=e!=null&&e!=="auto"?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},r.prototype.dataToPoint=function(e,t){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)])},r.prototype.pointToData=function(e,t){var i=this.pointToCoord(e);return[this._radiusAxis.radiusToData(i[0],t),this._angleAxis.angleToData(i[1],t)]},r.prototype.pointToCoord=function(e){var t=e[0]-this.cx,i=e[1]-this.cy,n=this.getAngleAxis(),a=n.getExtent(),s=Math.min(a[0],a[1]),o=Math.max(a[0],a[1]);n.inverse?s=o-360:o=s+360;var l=Math.sqrt(t*t+i*i);t/=l,i/=l;for(var u=Math.atan2(-i,t)/Math.PI*180,c=u<s?1:-1;u<s||u>o;)u+=c*360;return[l,u]},r.prototype.coordToPoint=function(e){var t=e[0],i=e[1]/180*Math.PI,n=Math.cos(i)*t+this.cx,a=-Math.sin(i)*t+this.cy;return[n,a]},r.prototype.getArea=function(){var e=this.getAngleAxis(),t=this.getRadiusAxis(),i=t.getExtent().slice();i[0]>i[1]&&i.reverse();var n=e.getExtent(),a=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:i[0],r:i[1],startAngle:-n[0]*a,endAngle:-n[1]*a,clockwise:e.inverse,contain:function(s,o){var l=s-this.cx,u=o-this.cy,c=l*l+u*u-1e-4,h=this.r,d=this.r0;return c<=h*h&&c>=d*d}}},r.prototype.convertToPixel=function(e,t,i){var n=p3(t);return n===this?this.dataToPoint(i):null},r.prototype.convertFromPixel=function(e,t,i){var n=p3(t);return n===this?this.pointToData(i):null},r}();function p3(r){var e=r.seriesModel,t=r.polarModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function Hxe(r,e,t){var i=e.get("center"),n=t.getWidth(),a=t.getHeight();r.cx=ce(i[0],n),r.cy=ce(i[1],a);var s=r.getRadiusAxis(),o=Math.min(n,a)/2,l=e.get("radius");l==null?l=[0,"100%"]:ie(l)||(l=[0,l]);var u=[ce(l[0],o),ce(l[1],o)];s.inverse?s.setExtent(u[1],u[0]):s.setExtent(u[0],u[1])}function $xe(r,e){var t=this,i=t.getAngleAxis(),n=t.getRadiusAxis();if(i.scale.setExtent(1/0,-1/0),n.scale.setExtent(1/0,-1/0),r.eachSeries(function(o){if(o.coordinateSystem===t){var l=o.getData();R(f_(l,"radius"),function(u){n.scale.unionExtentFromData(l,u)}),R(f_(l,"angle"),function(u){i.scale.unionExtentFromData(l,u)})}}),cc(i.scale,i.model),cc(n.scale,n.model),i.type==="category"&&!i.onBand){var a=i.getExtent(),s=360/i.scale.count();i.inverse?a[1]+=s:a[1]-=s,i.setExtent(a[0],a[1])}}function Wxe(r){return r.mainType==="angleAxis"}function v3(r,e){var t;if(r.type=e.get("type"),r.scale=Ag(e),r.onBand=e.get("boundaryGap")&&r.type==="category",r.inverse=e.get("inverse"),Wxe(e)){r.inverse=r.inverse!==e.get("clockwise");var i=e.get("startAngle"),n=(t=e.get("endAngle"))!==null&&t!==void 0?t:i+(r.inverse?-360:360);r.setExtent(i,n)}e.axis=r,r.model=e}var qxe={dimensions:uX,create:function(r,e){var t=[];return r.eachComponent("polar",function(i,n){var a=new Gxe(n+"");a.update=$xe;var s=a.getRadiusAxis(),o=a.getAngleAxis(),l=i.findAxisModel("radiusAxis"),u=i.findAxisModel("angleAxis");v3(s,l),v3(o,u),Hxe(a,i,e),t.push(a),i.coordinateSystem=a,a.model=i}),r.eachSeries(function(i){if(i.get("coordinateSystem")==="polar"){var n=i.getReferringComponents("polar",_r).models[0];i.coordinateSystem=n.coordinateSystem}}),t}},jxe=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function fy(r,e,t){e[1]>e[0]&&(e=e.slice().reverse());var i=r.coordToPoint([e[0],t]),n=r.coordToPoint([e[1],t]);return{x1:i[0],y1:i[1],x2:n[0],y2:n[1]}}function dy(r){var e=r.getRadiusAxis();return e.inverse?0:1}function g3(r){var e=r[0],t=r[r.length-1];e&&t&&Math.abs(Math.abs(e.coord-t.coord)-360)<1e-4&&r.pop()}var Xxe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="PolarAxisPointer",t}return e.prototype.render=function(t,i){if(this.group.removeAll(),!!t.get("show")){var n=t.axis,a=n.polar,s=a.getRadiusAxis().getExtent(),o=n.getTicksCoords(),l=n.getMinorTicksCoords(),u=ae(n.getViewLabels(),function(c){c=Ee(c);var h=n.scale,d=h.type==="ordinal"?h.getRawOrdinalNumber(c.tickValue):c.tickValue;return c.coord=n.dataToCoord(d),c});g3(u),g3(o),R(jxe,function(c){t.get([c,"show"])&&(!n.scale.isBlank()||c==="axisLine")&&Yxe[c](this.group,t,a,o,l,s,u)},this)}},e.type="angleAxis",e}(Sc),Yxe={axisLine:function(r,e,t,i,n,a){var s=e.getModel(["axisLine","lineStyle"]),o=t.getAngleAxis(),l=Math.PI/180,u=o.getExtent(),c=dy(t),h=c?0:1,d,f=Math.abs(u[1]-u[0])===360?"Circle":"Arc";a[h]===0?d=new mc[f]({shape:{cx:t.cx,cy:t.cy,r:a[c],startAngle:-u[0]*l,endAngle:-u[1]*l,clockwise:o.inverse},style:s.getLineStyle(),z2:1,silent:!0}):d=new Vf({shape:{cx:t.cx,cy:t.cy,r:a[c],r0:a[h]},style:s.getLineStyle(),z2:1,silent:!0}),d.style.fill=null,r.add(d)},axisTick:function(r,e,t,i,n,a){var s=e.getModel("axisTick"),o=(s.get("inside")?-1:1)*s.get("length"),l=a[dy(t)],u=ae(i,function(c){return new Ar({shape:fy(t,[l,l+o],c.coord)})});r.add(vn(u,{style:Ce(s.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(r,e,t,i,n,a){if(n.length){for(var s=e.getModel("axisTick"),o=e.getModel("minorTick"),l=(s.get("inside")?-1:1)*o.get("length"),u=a[dy(t)],c=[],h=0;h<n.length;h++)for(var d=0;d<n[h].length;d++)c.push(new Ar({shape:fy(t,[u,u+l],n[h][d].coord)}));r.add(vn(c,{style:Ce(o.getModel("lineStyle").getLineStyle(),Ce(s.getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])}))}))}},axisLabel:function(r,e,t,i,n,a,s){var o=e.getCategories(!0),l=e.getModel("axisLabel"),u=l.get("margin"),c=e.get("triggerEvent");R(s,function(h,d){var f=l,p=h.tickValue,v=a[dy(t)],g=t.coordToPoint([v+u,h.coord]),m=t.cx,y=t.cy,_=Math.abs(g[0]-m)/v<.3?"center":g[0]>m?"left":"right",b=Math.abs(g[1]-y)/v<.3?"middle":g[1]>y?"top":"bottom";if(o&&o[p]){var T=o[p];Ae(T)&&T.textStyle&&(f=new ft(T.textStyle,l,l.ecModel))}var x=new nt({silent:ki.isLabelSilent(e),style:Mt(f,{x:g[0],y:g[1],fill:f.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:h.formattedLabel,align:_,verticalAlign:b})});if(r.add(x),c){var C=ki.makeAxisEventDataBase(e);C.targetType="axisLabel",C.value=h.rawLabel,ke(x).eventData=C}},this)},splitLine:function(r,e,t,i,n,a){var s=e.getModel("splitLine"),o=s.getModel("lineStyle"),l=o.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],h=0;h<i.length;h++){var d=u++%l.length;c[d]=c[d]||[],c[d].push(new Ar({shape:fy(t,a,i[h].coord)}))}for(var h=0;h<c.length;h++)r.add(vn(c[h],{style:Ce({stroke:l[h%l.length]},o.getLineStyle()),silent:!0,z:e.get("z")}))},minorSplitLine:function(r,e,t,i,n,a){if(n.length){for(var s=e.getModel("minorSplitLine"),o=s.getModel("lineStyle"),l=[],u=0;u<n.length;u++)for(var c=0;c<n[u].length;c++)l.push(new Ar({shape:fy(t,a,n[u][c].coord)}));r.add(vn(l,{style:o.getLineStyle(),silent:!0,z:e.get("z")}))}},splitArea:function(r,e,t,i,n,a){if(i.length){var s=e.getModel("splitArea"),o=s.getModel("areaStyle"),l=o.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],h=Math.PI/180,d=-i[0].coord*h,f=Math.min(a[0],a[1]),p=Math.max(a[0],a[1]),v=e.get("clockwise"),g=1,m=i.length;g<=m;g++){var y=g===m?i[0].coord:i[g].coord,_=u++%l.length;c[_]=c[_]||[],c[_].push(new di({shape:{cx:t.cx,cy:t.cy,r0:f,r:p,startAngle:d,endAngle:-y*h,clockwise:v},silent:!0})),d=-y*h}for(var g=0;g<c.length;g++)r.add(vn(c[g],{style:Ce({fill:l[g%l.length]},o.getAreaStyle()),silent:!0}))}}},Kxe=["axisLine","axisTickLabel","axisName"],Zxe=["splitLine","splitArea","minorSplitLine"],Qxe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="PolarAxisPointer",t}return e.prototype.render=function(t,i){if(this.group.removeAll(),!!t.get("show")){var n=this._axisGroup,a=this._axisGroup=new Le;this.group.add(a);var s=t.axis,o=s.polar,l=o.getAngleAxis(),u=s.getTicksCoords(),c=s.getMinorTicksCoords(),h=l.getExtent()[0],d=s.getExtent(),f=ewe(o,t,h),p=new ki(t,f);R(Kxe,p.add,p),a.add(p.getGroup()),xg(n,a,t),R(Zxe,function(v){t.get([v,"show"])&&!s.scale.isBlank()&&Jxe[v](this.group,t,o,h,d,u,c)},this)}},e.type="radiusAxis",e}(Sc),Jxe={splitLine:function(r,e,t,i,n,a){var s=e.getModel("splitLine"),o=s.getModel("lineStyle"),l=o.get("color"),u=0,c=t.getAngleAxis(),h=Math.PI/180,d=c.getExtent(),f=Math.abs(d[1]-d[0])===360?"Circle":"Arc";l=l instanceof Array?l:[l];for(var p=[],v=0;v<a.length;v++){var g=u++%l.length;p[g]=p[g]||[],p[g].push(new mc[f]({shape:{cx:t.cx,cy:t.cy,r:Math.max(a[v].coord,0),startAngle:-d[0]*h,endAngle:-d[1]*h,clockwise:c.inverse}}))}for(var v=0;v<p.length;v++)r.add(vn(p[v],{style:Ce({stroke:l[v%l.length],fill:null},o.getLineStyle()),silent:!0}))},minorSplitLine:function(r,e,t,i,n,a,s){if(s.length){for(var o=e.getModel("minorSplitLine"),l=o.getModel("lineStyle"),u=[],c=0;c<s.length;c++)for(var h=0;h<s[c].length;h++)u.push(new ms({shape:{cx:t.cx,cy:t.cy,r:s[c][h].coord}}));r.add(vn(u,{style:Ce({fill:null},l.getLineStyle()),silent:!0}))}},splitArea:function(r,e,t,i,n,a){if(a.length){var s=e.getModel("splitArea"),o=s.getModel("areaStyle"),l=o.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],h=a[0].coord,d=1;d<a.length;d++){var f=u++%l.length;c[f]=c[f]||[],c[f].push(new di({shape:{cx:t.cx,cy:t.cy,r0:h,r:a[d].coord,startAngle:0,endAngle:Math.PI*2},silent:!0})),h=a[d].coord}for(var d=0;d<c.length;d++)r.add(vn(c[d],{style:Ce({fill:l[d%l.length]},o.getAreaStyle()),silent:!0}))}}};function ewe(r,e,t){return{position:[r.cx,r.cy],rotation:t/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:e.getModel("axisLabel").get("rotate"),z2:1}}function cX(r){return r.get("stack")||"__ec_stack_"+r.seriesIndex}function hX(r,e){return e.dim+r.model.componentIndex}function twe(r,e,t){var i={},n=rwe(_t(e.getSeriesByType(r),function(a){return!e.isSeriesFiltered(a)&&a.coordinateSystem&&a.coordinateSystem.type==="polar"}));e.eachSeriesByType(r,function(a){if(a.coordinateSystem.type==="polar"){var s=a.getData(),o=a.coordinateSystem,l=o.getBaseAxis(),u=hX(o,l),c=cX(a),h=n[u][c],d=h.offset,f=h.width,p=o.getOtherAxis(l),v=a.coordinateSystem.cx,g=a.coordinateSystem.cy,m=a.get("barMinHeight")||0,y=a.get("barMinAngle")||0;i[c]=i[c]||[];for(var _=s.mapDimension(p.dim),b=s.mapDimension(l.dim),T=ro(s,_),x=l.dim!=="radius"||!a.get("roundCap",!0),C=p.model,D=C.get("startValue"),I=p.dataToCoord(D||0),M=0,L=s.count();M<L;M++){var N=s.get(_,M),O=s.get(b,M),B=N>=0?"p":"n",F=I;T&&(i[c][O]||(i[c][O]={p:I,n:I}),F=i[c][O][B]);var U=void 0,$=void 0,q=void 0,Z=void 0;if(p.dim==="radius"){var te=p.dataToCoord(N)-I,J=l.dataToCoord(O);Math.abs(te)<m&&(te=(te<0?-1:1)*m),U=F,$=F+te,q=J-d,Z=q-f,T&&(i[c][O][B]=$)}else{var oe=p.dataToCoord(N,x)-I,he=l.dataToCoord(O);Math.abs(oe)<y&&(oe=(oe<0?-1:1)*y),U=he+d,$=U+f,q=F,Z=F+oe,T&&(i[c][O][B]=Z)}s.setItemLayout(M,{cx:v,cy:g,r0:U,r:$,startAngle:-q*Math.PI/180,endAngle:-Z*Math.PI/180,clockwise:q>=Z})}}})}function rwe(r){var e={};R(r,function(i,n){var a=i.getData(),s=i.coordinateSystem,o=s.getBaseAxis(),l=hX(s,o),u=o.getExtent(),c=o.type==="category"?o.getBandWidth():Math.abs(u[1]-u[0])/a.count(),h=e[l]||{bandWidth:c,remainedWidth:c,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},d=h.stacks;e[l]=h;var f=cX(i);d[f]||h.autoWidthCount++,d[f]=d[f]||{width:0,maxWidth:0};var p=ce(i.get("barWidth"),c),v=ce(i.get("barMaxWidth"),c),g=i.get("barGap"),m=i.get("barCategoryGap");p&&!d[f].width&&(p=Math.min(h.remainedWidth,p),d[f].width=p,h.remainedWidth-=p),v&&(d[f].maxWidth=v),g!=null&&(h.gap=g),m!=null&&(h.categoryGap=m)});var t={};return R(e,function(i,n){t[n]={};var a=i.stacks,s=i.bandWidth,o=ce(i.categoryGap,s),l=ce(i.gap,1),u=i.remainedWidth,c=i.autoWidthCount,h=(u-o)/(c+(c-1)*l);h=Math.max(h,0),R(a,function(v,g){var m=v.maxWidth;m&&m<h&&(m=Math.min(m,u),v.width&&(m=Math.min(m,v.width)),u-=m,v.width=m,c--)}),h=(u-o)/(c+(c-1)*l),h=Math.max(h,0);var d=0,f;R(a,function(v,g){v.width||(v.width=h),f=v,d+=v.width*(1+l)}),f&&(d-=f.width*l);var p=-d/2;R(a,function(v,g){t[n][g]=t[n][g]||{offset:p,width:v.width},p+=v.width*(1+l)})}),t}var iwe={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},nwe={splitNumber:5},awe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="polar",e}(Nt);function swe(r){Ye(Og),Sc.registerAxisPointerClass("PolarAxisPointer",Oxe),r.registerCoordinateSystem("polar",qxe),r.registerComponentModel(Fxe),r.registerComponentView(awe),xf(r,"angle",Uxe,iwe),xf(r,"radius",Vxe,nwe),r.registerComponentView(Xxe),r.registerComponentView(Qxe),r.registerLayout(Be(twe,"bar"))}function gC(r,e){e=e||{};var t=r.coordinateSystem,i=r.axis,n={},a=i.position,s=i.orient,o=t.getRect(),l=[o.x,o.x+o.width,o.y,o.y+o.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};n.position=[s==="vertical"?u.vertical[a]:l[0],s==="horizontal"?u.horizontal[a]:l[3]];var c={horizontal:0,vertical:1};n.rotation=Math.PI/2*c[s];var h={top:-1,bottom:1,right:1,left:-1};n.labelDirection=n.tickDirection=n.nameDirection=h[a],r.get(["axisTick","inside"])&&(n.tickDirection=-n.tickDirection),Rr(e.labelInside,r.get(["axisLabel","inside"]))&&(n.labelDirection=-n.labelDirection);var d=e.rotate;return d==null&&(d=r.get(["axisLabel","rotate"])),n.labelRotation=a==="top"?-d:d,n.z2=1,n}var owe=["axisLine","axisTickLabel","axisName"],lwe=["splitArea","splitLine"],uwe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="SingleAxisPointer",t}return e.prototype.render=function(t,i,n,a){var s=this.group;s.removeAll();var o=this._axisGroup;this._axisGroup=new Le;var l=gC(t),u=new ki(t,l);R(owe,u.add,u),s.add(this._axisGroup),s.add(u.getGroup()),R(lwe,function(c){t.get([c,"show"])&&cwe[c](this,this.group,this._axisGroup,t)},this),xg(o,this._axisGroup,t),r.prototype.render.call(this,t,i,n,a)},e.prototype.remove=function(){kq(this)},e.type="singleAxis",e}(Sc),cwe={splitLine:function(r,e,t,i){var n=i.axis;if(!n.scale.isBlank()){var a=i.getModel("splitLine"),s=a.getModel("lineStyle"),o=s.get("color");o=o instanceof Array?o:[o];for(var l=s.get("width"),u=i.coordinateSystem.getRect(),c=n.isHorizontal(),h=[],d=0,f=n.getTicksCoords({tickModel:a}),p=[],v=[],g=0;g<f.length;++g){var m=n.toGlobalCoord(f[g].coord);c?(p[0]=m,p[1]=u.y,v[0]=m,v[1]=u.y+u.height):(p[0]=u.x,p[1]=m,v[0]=u.x+u.width,v[1]=m);var y=new Ar({shape:{x1:p[0],y1:p[1],x2:v[0],y2:v[1]},silent:!0});_f(y.shape,l);var _=d++%o.length;h[_]=h[_]||[],h[_].push(y)}for(var b=s.getLineStyle(["color"]),g=0;g<h.length;++g)e.add(vn(h[g],{style:Ce({stroke:o[g%o.length]},b),silent:!0}))}},splitArea:function(r,e,t,i){Lq(r,t,i,i)}},Xy=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getCoordSysModel=function(){return this},e.type="singleAxis",e.layoutMode="box",e.defaultOption={left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}},e}(Qe);ir(Xy,rd.prototype);var hwe=function(r){j(e,r);function e(t,i,n,a,s){var o=r.call(this,t,i,n)||this;return o.type=a||"value",o.position=s||"bottom",o}return e.prototype.isHorizontal=function(){var t=this.position;return t==="top"||t==="bottom"},e.prototype.pointToData=function(t,i){return this.coordinateSystem.pointToData(t)[0]},e}(aa),fX=["single"],fwe=function(){function r(e,t,i){this.type="single",this.dimension="single",this.dimensions=fX,this.axisPointerEnabled=!0,this.model=e,this._init(e,t,i)}return r.prototype._init=function(e,t,i){var n=this.dimension,a=new hwe(n,Ag(e),[0,0],e.get("type"),e.get("position")),s=a.type==="category";a.onBand=s&&e.get("boundaryGap"),a.inverse=e.get("inverse"),a.orient=e.get("orient"),e.axis=a,a.model=e,a.coordinateSystem=this,this._axis=a},r.prototype.update=function(e,t){e.eachSeries(function(i){if(i.coordinateSystem===this){var n=i.getData();R(n.mapDimensionsAll(this.dimension),function(a){this._axis.scale.unionExtentFromData(n,a)},this),cc(this._axis.scale,this._axis.model)}},this)},r.prototype.resize=function(e,t){this._rect=br({left:e.get("left"),top:e.get("top"),right:e.get("right"),bottom:e.get("bottom"),width:e.get("width"),height:e.get("height")},{width:t.getWidth(),height:t.getHeight()}),this._adjustAxis()},r.prototype.getRect=function(){return this._rect},r.prototype._adjustAxis=function(){var e=this._rect,t=this._axis,i=t.isHorizontal(),n=i?[0,e.width]:[0,e.height],a=t.inverse?1:0;t.setExtent(n[a],n[1-a]),this._updateAxisTransform(t,i?e.x:e.y)},r.prototype._updateAxisTransform=function(e,t){var i=e.getExtent(),n=i[0]+i[1],a=e.isHorizontal();e.toGlobalCoord=a?function(s){return s+t}:function(s){return n-s+t},e.toLocalCoord=a?function(s){return s-t}:function(s){return n-s+t}},r.prototype.getAxis=function(){return this._axis},r.prototype.getBaseAxis=function(){return this._axis},r.prototype.getAxes=function(){return[this._axis]},r.prototype.getTooltipAxes=function(){return{baseAxes:[this.getAxis()],otherAxes:[]}},r.prototype.containPoint=function(e){var t=this.getRect(),i=this.getAxis(),n=i.orient;return n==="horizontal"?i.contain(i.toLocalCoord(e[0]))&&e[1]>=t.y&&e[1]<=t.y+t.height:i.contain(i.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},r.prototype.pointToData=function(e){var t=this.getAxis();return[t.coordToData(t.toLocalCoord(e[t.orient==="horizontal"?0:1]))]},r.prototype.dataToPoint=function(e){var t=this.getAxis(),i=this.getRect(),n=[],a=t.orient==="horizontal"?0:1;return e instanceof Array&&(e=e[0]),n[a]=t.toGlobalCoord(t.dataToCoord(+e)),n[1-a]=a===0?i.y+i.height/2:i.x+i.width/2,n},r.prototype.convertToPixel=function(e,t,i){var n=m3(t);return n===this?this.dataToPoint(i):null},r.prototype.convertFromPixel=function(e,t,i){var n=m3(t);return n===this?this.pointToData(i):null},r}();function m3(r){var e=r.seriesModel,t=r.singleAxisModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function dwe(r,e){var t=[];return r.eachComponent("singleAxis",function(i,n){var a=new fwe(i,r,e);a.name="single_"+n,a.resize(i,e),i.coordinateSystem=a,t.push(a)}),r.eachSeries(function(i){if(i.get("coordinateSystem")==="singleAxis"){var n=i.getReferringComponents("singleAxis",_r).models[0];i.coordinateSystem=n&&n.coordinateSystem}}),t}var pwe={create:dwe,dimensions:fX},y3=["x","y"],vwe=["width","height"],gwe=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,i,n,a,s){var o=n.axis,l=o.coordinateSystem,u=_x(l,1-A_(o)),c=l.dataToPoint(i)[0],h=a.get("type");if(h&&h!=="none"){var d=hI(a),f=mwe[h](o,c,u);f.style=d,t.graphicKey=f.type,t.pointer=f}var p=gC(n);aX(i,t,p,n,a,s)},e.prototype.getHandleTransform=function(t,i,n){var a=gC(i,{labelInside:!1});a.labelMargin=n.get(["handle","margin"]);var s=fI(i.axis,t,a);return{x:s[0],y:s[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,i,n,a){var s=n.axis,o=s.coordinateSystem,l=A_(s),u=_x(o,l),c=[t.x,t.y];c[l]+=i[l],c[l]=Math.min(u[1],c[l]),c[l]=Math.max(u[0],c[l]);var h=_x(o,1-l),d=(h[1]+h[0])/2,f=[d,d];return f[l]=c[l],{x:c[0],y:c[1],rotation:t.rotation,cursorPoint:f,tooltipOption:{verticalAlign:"middle"}}},e}(cI),mwe={line:function(r,e,t){var i=dI([e,t[0]],[e,t[1]],A_(r));return{type:"Line",subPixelOptimize:!0,shape:i}},shadow:function(r,e,t){var i=r.getBandWidth(),n=t[1]-t[0];return{type:"Rect",shape:sX([e-i/2,t[0]],[i,n],A_(r))}}};function A_(r){return r.isHorizontal()?0:1}function _x(r,e){var t=r.getRect();return[t[y3[e]],t[y3[e]]+t[vwe[e]]]}var ywe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="single",e}(Nt);function _we(r){Ye(Og),Sc.registerAxisPointerClass("SingleAxisPointer",gwe),r.registerComponentView(ywe),r.registerComponentView(uwe),r.registerComponentModel(Xy),xf(r,"single",Xy,Xy.defaultOption),r.registerCoordinateSystem("single",pwe)}var bwe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,i,n){var a=Xf(t);r.prototype.init.apply(this,arguments),_3(t,a)},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),_3(this.option,t)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}(Qe);function _3(r,e){var t=r.cellSize,i;ie(t)?i=t:i=r.cellSize=[t,t],i.length===1&&(i[1]=i[0]);var n=ae([0,1],function(a){return Afe(e,a)&&(i[a]="auto"),i[a]!=null&&i[a]!=="auto"});ll(r,e,{type:"box",ignoreSize:n})}var Swe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,n){var a=this.group;a.removeAll();var s=t.coordinateSystem,o=s.getRangeInfo(),l=s.getOrient(),u=i.getLocaleModel();this._renderDayRect(t,o,a),this._renderLines(t,o,l,a),this._renderYearText(t,o,l,a),this._renderMonthText(t,u,l,a),this._renderWeekText(t,u,o,l,a)},e.prototype._renderDayRect=function(t,i,n){for(var a=t.coordinateSystem,s=t.getModel("itemStyle").getItemStyle(),o=a.getCellWidth(),l=a.getCellHeight(),u=i.start.time;u<=i.end.time;u=a.getNextNDay(u,1).time){var c=a.dataToRect([u],!1).tl,h=new at({shape:{x:c[0],y:c[1],width:o,height:l},cursor:"default",style:s});n.add(h)}},e.prototype._renderLines=function(t,i,n,a){var s=this,o=t.coordinateSystem,l=t.getModel(["splitLine","lineStyle"]).getLineStyle(),u=t.get(["splitLine","show"]),c=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var h=i.start,d=0;h.time<=i.end.time;d++){p(h.formatedDate),d===0&&(h=o.getDateInfo(i.start.y+"-"+i.start.m));var f=h.date;f.setMonth(f.getMonth()+1),h=o.getDateInfo(f)}p(o.getNextNDay(i.end.time,1).formatedDate);function p(v){s._firstDayOfMonth.push(o.getDateInfo(v)),s._firstDayPoints.push(o.dataToRect([v],!1).tl);var g=s._getLinePointsOfOneWeek(t,v,n);s._tlpoints.push(g[0]),s._blpoints.push(g[g.length-1]),u&&s._drawSplitline(g,l,a)}u&&this._drawSplitline(s._getEdgesPoints(s._tlpoints,c,n),l,a),u&&this._drawSplitline(s._getEdgesPoints(s._blpoints,c,n),l,a)},e.prototype._getEdgesPoints=function(t,i,n){var a=[t[0].slice(),t[t.length-1].slice()],s=n==="horizontal"?0:1;return a[0][s]=a[0][s]-i/2,a[1][s]=a[1][s]+i/2,a},e.prototype._drawSplitline=function(t,i,n){var a=new mi({z2:20,shape:{points:t},style:i});n.add(a)},e.prototype._getLinePointsOfOneWeek=function(t,i,n){for(var a=t.coordinateSystem,s=a.getDateInfo(i),o=[],l=0;l<7;l++){var u=a.getNextNDay(s.time,l),c=a.dataToRect([u.time],!1);o[2*u.day]=c.tl,o[2*u.day+1]=c[n==="horizontal"?"bl":"tr"]}return o},e.prototype._formatterLabel=function(t,i){return de(t)&&t?Tfe(t,i):xe(t)?t(i):i.nameMap},e.prototype._yearTextPositionControl=function(t,i,n,a,s){var o=i[0],l=i[1],u=["center","bottom"];a==="bottom"?(l+=s,u=["center","top"]):a==="left"?o-=s:a==="right"?(o+=s,u=["center","top"]):l-=s;var c=0;return(a==="left"||a==="right")&&(c=Math.PI/2),{rotation:c,x:o,y:l,style:{align:u[0],verticalAlign:u[1]}}},e.prototype._renderYearText=function(t,i,n,a){var s=t.getModel("yearLabel");if(s.get("show")){var o=s.get("margin"),l=s.get("position");l||(l=n!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],c=(u[0][0]+u[1][0])/2,h=(u[0][1]+u[1][1])/2,d=n==="horizontal"?0:1,f={top:[c,u[d][1]],bottom:[c,u[1-d][1]],left:[u[1-d][0],h],right:[u[d][0],h]},p=i.start.y;+i.end.y>+i.start.y&&(p=p+"-"+i.end.y);var v=s.get("formatter"),g={start:i.start.y,end:i.end.y,nameMap:p},m=this._formatterLabel(v,g),y=new nt({z2:30,style:Mt(s,{text:m})});y.attr(this._yearTextPositionControl(y,f[l],n,l,o)),a.add(y)}},e.prototype._monthTextPositionControl=function(t,i,n,a,s){var o="left",l="top",u=t[0],c=t[1];return n==="horizontal"?(c=c+s,i&&(o="center"),a==="start"&&(l="bottom")):(u=u+s,i&&(l="middle"),a==="start"&&(o="right")),{x:u,y:c,align:o,verticalAlign:l}},e.prototype._renderMonthText=function(t,i,n,a){var s=t.getModel("monthLabel");if(s.get("show")){var o=s.get("nameMap"),l=s.get("margin"),u=s.get("position"),c=s.get("align"),h=[this._tlpoints,this._blpoints];(!o||de(o))&&(o&&(i=x2(o)||i),o=i.get(["time","monthAbbr"])||[]);var d=u==="start"?0:1,f=n==="horizontal"?0:1;l=u==="start"?-l:l;for(var p=c==="center",v=0;v<h[d].length-1;v++){var g=h[d][v].slice(),m=this._firstDayOfMonth[v];if(p){var y=this._firstDayPoints[v];g[f]=(y[f]+h[0][v+1][f])/2}var _=s.get("formatter"),b=o[+m.m-1],T={yyyy:m.y,yy:(m.y+"").slice(2),MM:m.m,M:+m.m,nameMap:b},x=this._formatterLabel(_,T),C=new nt({z2:30,style:Q(Mt(s,{text:x}),this._monthTextPositionControl(g,p,n,u,l))});a.add(C)}}},e.prototype._weekTextPositionControl=function(t,i,n,a,s){var o="center",l="middle",u=t[0],c=t[1],h=n==="start";return i==="horizontal"?(u=u+a+(h?1:-1)*s[0]/2,o=h?"right":"left"):(c=c+a+(h?1:-1)*s[1]/2,l=h?"bottom":"top"),{x:u,y:c,align:o,verticalAlign:l}},e.prototype._renderWeekText=function(t,i,n,a,s){var o=t.getModel("dayLabel");if(o.get("show")){var l=t.coordinateSystem,u=o.get("position"),c=o.get("nameMap"),h=o.get("margin"),d=l.getFirstDayOfWeek();if(!c||de(c)){c&&(i=x2(c)||i);var f=i.get(["time","dayOfWeekShort"]);c=f||ae(i.get(["time","dayOfWeekAbbr"]),function(T){return T[0]})}var p=l.getNextNDay(n.end.time,7-n.lweek).time,v=[l.getCellWidth(),l.getCellHeight()];h=ce(h,Math.min(v[1],v[0])),u==="start"&&(p=l.getNextNDay(n.start.time,-(7+n.fweek)).time,h=-h);for(var g=0;g<7;g++){var m=l.getNextNDay(p,g),y=l.dataToRect([m.time],!1).center,_=g;_=Math.abs((g+d)%7);var b=new nt({z2:30,style:Q(Mt(o,{text:c[_]}),this._weekTextPositionControl(y,a,u,h,v))});s.add(b)}}},e.type="calendar",e}(Nt),bx=864e5,Twe=function(){function r(e,t,i){this.type="calendar",this.dimensions=r.dimensions,this.getDimensionsInfo=r.getDimensionsInfo,this._model=e}return r.getDimensionsInfo=function(){return[{name:"time",type:"time"},"value"]},r.prototype.getRangeInfo=function(){return this._rangeInfo},r.prototype.getModel=function(){return this._model},r.prototype.getRect=function(){return this._rect},r.prototype.getCellWidth=function(){return this._sw},r.prototype.getCellHeight=function(){return this._sh},r.prototype.getOrient=function(){return this._orient},r.prototype.getFirstDayOfWeek=function(){return this._firstDayOfWeek},r.prototype.getDateInfo=function(e){e=Cn(e);var t=e.getFullYear(),i=e.getMonth()+1,n=i<10?"0"+i:""+i,a=e.getDate(),s=a<10?"0"+a:""+a,o=e.getDay();return o=Math.abs((o+7-this.getFirstDayOfWeek())%7),{y:t+"",m:n,d:s,day:o,time:e.getTime(),formatedDate:t+"-"+n+"-"+s,date:e}},r.prototype.getNextNDay=function(e,t){return t=t||0,t===0?this.getDateInfo(e):(e=new Date(this.getDateInfo(e).time),e.setDate(e.getDate()+t),this.getDateInfo(e))},r.prototype.update=function(e,t){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var i=this._rangeInfo.weeks||1,n=["width","height"],a=this._model.getCellSize().slice(),s=this._model.getBoxLayoutParams(),o=this._orient==="horizontal"?[i,7]:[7,i];R([0,1],function(h){c(a,h)&&(s[n[h]]=a[h]*o[h])});var l={width:t.getWidth(),height:t.getHeight()},u=this._rect=br(s,l);R([0,1],function(h){c(a,h)||(a[h]=u[n[h]]/o[h])});function c(h,d){return h[d]!=null&&h[d]!=="auto"}this._sw=a[0],this._sh=a[1]},r.prototype.dataToPoint=function(e,t){ie(e)&&(e=e[0]),t==null&&(t=!0);var i=this.getDateInfo(e),n=this._rangeInfo,a=i.formatedDate;if(t&&!(i.time>=n.start.time&&i.time<n.end.time+bx))return[NaN,NaN];var s=i.day,o=this._getRangeInfo([n.start.time,a]).nthWeek;return this._orient==="vertical"?[this._rect.x+s*this._sw+this._sw/2,this._rect.y+o*this._sh+this._sh/2]:[this._rect.x+o*this._sw+this._sw/2,this._rect.y+s*this._sh+this._sh/2]},r.prototype.pointToData=function(e){var t=this.pointToDate(e);return t&&t.time},r.prototype.dataToRect=function(e,t){var i=this.dataToPoint(e,t);return{contentShape:{x:i[0]-(this._sw-this._lineWidth)/2,y:i[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:i,tl:[i[0]-this._sw/2,i[1]-this._sh/2],tr:[i[0]+this._sw/2,i[1]-this._sh/2],br:[i[0]+this._sw/2,i[1]+this._sh/2],bl:[i[0]-this._sw/2,i[1]+this._sh/2]}},r.prototype.pointToDate=function(e){var t=Math.floor((e[0]-this._rect.x)/this._sw)+1,i=Math.floor((e[1]-this._rect.y)/this._sh)+1,n=this._rangeInfo.range;return this._orient==="vertical"?this._getDateByWeeksAndDay(i,t-1,n):this._getDateByWeeksAndDay(t,i-1,n)},r.prototype.convertToPixel=function(e,t,i){var n=b3(t);return n===this?n.dataToPoint(i):null},r.prototype.convertFromPixel=function(e,t,i){var n=b3(t);return n===this?n.pointToData(i):null},r.prototype.containPoint=function(e){return console.warn("Not implemented."),!1},r.prototype._initRangeOption=function(){var e=this._model.get("range"),t;if(ie(e)&&e.length===1&&(e=e[0]),ie(e))t=e;else{var i=e.toString();if(/^\d{4}$/.test(i)&&(t=[i+"-01-01",i+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(i)){var n=this.getDateInfo(i),a=n.date;a.setMonth(a.getMonth()+1);var s=this.getNextNDay(a,-1);t=[n.formatedDate,s.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(i)&&(t=[i,i])}if(!t)return e;var o=this._getRangeInfo(t);return o.start.time>o.end.time&&t.reverse(),t},r.prototype._getRangeInfo=function(e){var t=[this.getDateInfo(e[0]),this.getDateInfo(e[1])],i;t[0].time>t[1].time&&(i=!0,t.reverse());var n=Math.floor(t[1].time/bx)-Math.floor(t[0].time/bx)+1,a=new Date(t[0].time),s=a.getDate(),o=t[1].date.getDate();a.setDate(s+n-1);var l=a.getDate();if(l!==o)for(var u=a.getTime()-t[1].time>0?1:-1;(l=a.getDate())!==o&&(a.getTime()-t[1].time)*u>0;)n-=u,a.setDate(l-u);var c=Math.floor((n+t[0].day+6)/7),h=i?-c+1:c-1;return i&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:n,weeks:c,nthWeek:h,fweek:t[0].day,lweek:t[1].day}},r.prototype._getDateByWeeksAndDay=function(e,t,i){var n=this._getRangeInfo(i);if(e>n.weeks||e===0&&t<n.fweek||e===n.weeks&&t>n.lweek)return null;var a=(e-1)*7-n.fweek+t,s=new Date(n.start.time);return s.setDate(+n.start.d+a),this.getDateInfo(s)},r.create=function(e,t){var i=[];return e.eachComponent("calendar",function(n){var a=new r(n);i.push(a),n.coordinateSystem=a}),e.eachSeries(function(n){n.get("coordinateSystem")==="calendar"&&(n.coordinateSystem=i[n.get("calendarIndex")||0])}),i},r.dimensions=["time","value"],r}();function b3(r){var e=r.calendarModel,t=r.seriesModel,i=e?e.coordinateSystem:t?t.coordinateSystem:null;return i}function xwe(r){r.registerComponentModel(bwe),r.registerComponentView(Swe),r.registerCoordinateSystem("calendar",Twe)}function wwe(r,e){var t=r.existing;if(e.id=r.keyInfo.id,!e.type&&t&&(e.type=t.type),e.parentId==null){var i=e.parentOption;i?e.parentId=i.id:t&&(e.parentId=t.parentId)}e.parentOption=null}function S3(r,e){var t;return R(e,function(i){r[i]!=null&&r[i]!=="auto"&&(t=!0)}),t}function Cwe(r,e,t){var i=Q({},t),n=r[e],a=t.$action||"merge";a==="merge"?n?(He(n,i,!0),ll(n,i,{ignoreSize:!0}),r$(t,n),py(t,n),py(t,n,"shape"),py(t,n,"style"),py(t,n,"extra"),t.clipPath=n.clipPath):r[e]=i:a==="replace"?r[e]=i:a==="remove"&&n&&(r[e]=null)}var dX=["transition","enterFrom","leaveTo"],Awe=dX.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function py(r,e,t){if(t&&(!r[t]&&e[t]&&(r[t]={}),r=r[t],e=e[t]),!(!r||!e))for(var i=t?dX:Awe,n=0;n<i.length;n++){var a=i[n];r[a]==null&&e[a]!=null&&(r[a]=e[a])}}function Dwe(r,e){if(r&&(r.hv=e.hv=[S3(e,["left","right"]),S3(e,["top","bottom"])],r.type==="group")){var t=r,i=e;t.width==null&&(t.width=i.width=0),t.height==null&&(t.height=i.height=0)}}var Ewe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.preventAutoZ=!0,t}return e.prototype.mergeOption=function(t,i){var n=this.option.elements;this.option.elements=null,r.prototype.mergeOption.call(this,t,i),this.option.elements=n},e.prototype.optionUpdated=function(t,i){var n=this.option,a=(i?n:t).elements,s=n.elements=i?[]:n.elements,o=[];this._flatten(a,o,null);var l=eH(s,o,"normalMerge"),u=this._elOptionsToUpdate=[];R(l,function(c,h){var d=c.newOption;d&&(u.push(d),wwe(c,d),Cwe(s,h,d),Dwe(s[h],d))},this),n.elements=_t(s,function(c){return c&&delete c.$action,c!=null})},e.prototype._flatten=function(t,i,n){R(t,function(a){if(a){n&&(a.parentOption=n),i.push(a);var s=a.children;s&&s.length&&this._flatten(s,i,a),delete a.children}},this)},e.prototype.useElOptionsToUpdate=function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t},e.type="graphic",e.defaultOption={elements:[]},e}(Qe),T3={path:null,compoundPath:null,group:Le,image:Ur,text:nt},Vn=lt(),Iwe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this._elMap=be()},e.prototype.render=function(t,i,n){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,n)},e.prototype._updateElements=function(t){var i=t.useElOptionsToUpdate();if(i){var n=this._elMap,a=this.group,s=t.get("z"),o=t.get("zlevel");R(i,function(l){var u=Cr(l.id,null),c=u!=null?n.get(u):null,h=Cr(l.parentId,null),d=h!=null?n.get(h):a,f=l.type,p=l.style;f==="text"&&p&&l.hv&&l.hv[1]&&(p.textVerticalAlign=p.textBaseline=p.verticalAlign=p.align=null);var v=l.textContent,g=l.textConfig;if(p&&jj(p,f,!!g,!!v)){var m=Xj(p,f,!0);!g&&m.textConfig&&(g=l.textConfig=m.textConfig),!v&&m.textContent&&(v=m.textContent)}var y=Pwe(l),_=l.$action||"merge",b=_==="merge",T=_==="replace";if(b){var x=!c,C=c;x?C=x3(u,d,l.type,n):(C&&(Vn(C).isNew=!1),Qj(C)),C&&(qy(C,y,t,{isInit:x}),w3(C,l,s,o))}else if(T){Yy(c,l,n,t);var D=x3(u,d,l.type,n);D&&(qy(D,y,t,{isInit:!0}),w3(D,l,s,o))}else _==="remove"&&(Kj(c,l),Yy(c,l,n,t));var I=n.get(u);if(I&&v)if(b){var M=I.getTextContent();M?M.attr(v):I.setTextContent(new nt(v))}else T&&I.setTextContent(new nt(v));if(I){var L=l.clipPath;if(L){var N=L.type,O=void 0,x=!1;if(b){var B=I.getClipPath();x=!B||Vn(B).type!==N,O=x?mC(N):B}else T&&(x=!0,O=mC(N));I.setClipPath(O),qy(O,L,t,{isInit:x}),w_(O,L.keyframeAnimation,t)}var F=Vn(I);I.setTextConfig(g),F.option=l,Mwe(I,t,l),Wf({el:I,componentModel:t,itemName:I.name,itemTooltipOption:l.tooltip}),w_(I,l.keyframeAnimation,t)}})}},e.prototype._relocate=function(t,i){for(var n=t.option.elements,a=this.group,s=this._elMap,o=i.getWidth(),l=i.getHeight(),u=["x","y"],c=0;c<n.length;c++){var h=n[c],d=Cr(h.id,null),f=d!=null?s.get(d):null;if(!(!f||!f.isGroup)){var p=f.parent,v=p===a,g=Vn(f),m=Vn(p);g.width=ce(g.option.width,v?o:m.width)||0,g.height=ce(g.option.height,v?l:m.height)||0}}for(var c=n.length-1;c>=0;c--){var h=n[c],d=Cr(h.id,null),f=d!=null?s.get(d):null;if(f){var p=f.parent,m=Vn(p),y=p===a?{width:o,height:l}:{width:m.width,height:m.height},_={},b=z1(f,h,y,null,{hv:h.hv,boundingMode:h.bounding},_);if(!Vn(f).isNew&&b){for(var T=h.transition,x={},C=0;C<u.length;C++){var D=u[C],I=_[D];T&&(Ku(T)||Xe(T,D)>=0)?x[D]=I:f[D]=I}ct(f,x,t,0)}else f.attr(_)}}},e.prototype._clear=function(){var t=this,i=this._elMap;i.each(function(n){Yy(n,Vn(n).option,i,t._lastGraphicModel)}),this._elMap=be()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(Nt);function mC(r){var e=ye(T3,r)?T3[r]:R1(r),t=new e({});return Vn(t).type=r,t}function x3(r,e,t,i){var n=mC(t);return e.add(n),i.set(r,n),Vn(n).id=r,Vn(n).isNew=!0,n}function Yy(r,e,t,i){var n=r&&r.parent;n&&(r.type==="group"&&r.traverse(function(a){Yy(a,e,t,i)}),nb(r,e,i),t.removeKey(Vn(r).id))}function w3(r,e,t,i){r.isGroup||R([["cursor",Jn.prototype.cursor],["zlevel",i||0],["z",t||0],["z2",0]],function(n){var a=n[0];ye(e,a)?r[a]=Fe(e[a],n[1]):r[a]==null&&(r[a]=n[1])}),R(rt(e),function(n){if(n.indexOf("on")===0){var a=e[n];r[n]=xe(a)?a:null}}),ye(e,"draggable")&&(r.draggable=e.draggable),e.name!=null&&(r.name=e.name),e.id!=null&&(r.id=e.id)}function Pwe(r){return r=Q({},r),R(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(t$),function(e){delete r[e]}),r}function Mwe(r,e,t){var i=ke(r).eventData;!r.silent&&!r.ignore&&!i&&(i=ke(r).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:r.name}),i&&(i.info=t.info)}function Lwe(r){r.registerComponentModel(Ewe),r.registerComponentView(Iwe),r.registerPreprocessor(function(e){var t=e.graphic;ie(t)?!t[0]||!t[0].elements?e.graphic=[{elements:t}]:e.graphic=[e.graphic[0]]:t&&!t.elements&&(e.graphic=[{elements:[t]}])})}var C3=["x","y","radius","angle","single"],kwe=["cartesian2d","polar","singleAxis"];function Rwe(r){var e=r.get("coordinateSystem");return Xe(kwe,e)>=0}function Wo(r){return r+"Axis"}function Owe(r,e){var t=be(),i=[],n=be();r.eachComponent({mainType:"dataZoom",query:e},function(c){n.get(c.uid)||o(c)});var a;do a=!1,r.eachComponent("dataZoom",s);while(a);function s(c){!n.get(c.uid)&&l(c)&&(o(c),a=!0)}function o(c){n.set(c.uid,!0),i.push(c),u(c)}function l(c){var h=!1;return c.eachTargetAxis(function(d,f){var p=t.get(d);p&&p[f]&&(h=!0)}),h}function u(c){c.eachTargetAxis(function(h,d){(t.get(h)||t.set(h,[]))[d]=!0})}return i}function pX(r){var e=r.ecModel,t={infoList:[],infoMap:be()};return r.eachTargetAxis(function(i,n){var a=e.getComponent(Wo(i),n);if(a){var s=a.getCoordSysModel();if(s){var o=s.uid,l=t.infoMap.get(o);l||(l={model:s,axisModels:[]},t.infoList.push(l),t.infoMap.set(o,l)),l.axisModels.push(a)}}}),t}var Sx=function(){function r(){this.indexList=[],this.indexMap=[]}return r.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},r}(),Kv=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._autoThrottle=!0,t._noTarget=!0,t._rangePropMode=["percent","percent"],t}return e.prototype.init=function(t,i,n){var a=A3(t);this.settledOption=a,this.mergeDefaultAndTheme(t,n),this._doInit(a)},e.prototype.mergeOption=function(t){var i=A3(t);He(this.option,t,!0),He(this.settledOption,i,!0),this._doInit(i)},e.prototype._doInit=function(t){var i=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var n=this.settledOption;R([["start","startValue"],["end","endValue"]],function(a,s){this._rangePropMode[s]==="value"&&(i[a[0]]=n[a[0]]=null)},this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),i=this._targetAxisInfoMap=be(),n=this._fillSpecifiedTargetAxis(i);n?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(i,this._orient)),this._noTarget=!0,i.each(function(a){a.indexList.length&&(this._noTarget=!1)},this)},e.prototype._fillSpecifiedTargetAxis=function(t){var i=!1;return R(C3,function(n){var a=this.getReferringComponents(Wo(n),vce);if(a.specified){i=!0;var s=new Sx;R(a.models,function(o){s.add(o.componentIndex)}),t.set(n,s)}},this),i},e.prototype._fillAutoTargetAxisByOrient=function(t,i){var n=this.ecModel,a=!0;if(a){var s=i==="vertical"?"y":"x",o=n.findComponents({mainType:s+"Axis"});l(o,s)}if(a){var o=n.findComponents({mainType:"singleAxis",filter:function(c){return c.get("orient",!0)===i}});l(o,"single")}function l(u,c){var h=u[0];if(h){var d=new Sx;if(d.add(h.componentIndex),t.set(c,d),a=!1,c==="x"||c==="y"){var f=h.getReferringComponents("grid",_r).models[0];f&&R(u,function(p){h.componentIndex!==p.componentIndex&&f===p.getReferringComponents("grid",_r).models[0]&&d.add(p.componentIndex)})}}}a&&R(C3,function(u){if(a){var c=n.findComponents({mainType:Wo(u),filter:function(d){return d.get("type",!0)==="category"}});if(c[0]){var h=new Sx;h.add(c[0].componentIndex),t.set(u,h),a=!1}}},this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis(function(i){!t&&(t=i)},this),t==="y"?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var i=this.ecModel.option;this.option.throttle=i.animation&&i.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var i=this._rangePropMode,n=this.get("rangeMode");R([["start","startValue"],["end","endValue"]],function(a,s){var o=t[a[0]]!=null,l=t[a[1]]!=null;o&&!l?i[s]="percent":!o&&l?i[s]="value":n?i[s]=n[s]:o&&(i[s]="percent")})},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis(function(i,n){t==null&&(t=this.ecModel.getComponent(Wo(i),n))},this),t},e.prototype.eachTargetAxis=function(t,i){this._targetAxisInfoMap.each(function(n,a){R(n.indexList,function(s){t.call(i,a,s)})})},e.prototype.getAxisProxy=function(t,i){var n=this.getAxisModel(t,i);if(n)return n.__dzAxisProxy},e.prototype.getAxisModel=function(t,i){var n=this._targetAxisInfoMap.get(t);if(n&&n.indexMap[i])return this.ecModel.getComponent(Wo(t),i)},e.prototype.setRawRange=function(t){var i=this.option,n=this.settledOption;R([["start","startValue"],["end","endValue"]],function(a){(t[a[0]]!=null||t[a[1]]!=null)&&(i[a[0]]=n[a[0]]=t[a[0]],i[a[1]]=n[a[1]]=t[a[1]])},this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var i=this.option;R(["start","startValue","end","endValue"],function(n){i[n]=t[n]})},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,i){if(t==null&&i==null){var n=this.findRepresentativeAxisProxy();if(n)return n.getDataValueWindow()}else return this.getAxisProxy(t,i).getDataValueWindow()},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var i,n=this._targetAxisInfoMap.keys(),a=0;a<n.length;a++)for(var s=n[a],o=this._targetAxisInfoMap.get(s),l=0;l<o.indexList.length;l++){var u=this.getAxisProxy(s,o.indexList[l]);if(u.hostedBy(this))return u;i||(i=u)}return i},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={z:4,filterMode:"filter",start:0,end:100},e}(Qe);function A3(r){var e={};return R(["start","end","startValue","endValue","throttle"],function(t){r.hasOwnProperty(t)&&(e[t]=r[t])}),e}var Nwe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.select",e}(Kv),mI=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,n,a){this.dataZoomModel=t,this.ecModel=i,this.api=n},e.type="dataZoom",e}(Nt),Bwe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.select",e}(mI),vh=R,D3=mn,Fwe=function(){function r(e,t,i,n){this._dimName=e,this._axisIndex=t,this.ecModel=n,this._dataZoomModel=i}return r.prototype.hostedBy=function(e){return this._dataZoomModel===e},r.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},r.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},r.prototype.getTargetSeriesModels=function(){var e=[];return this.ecModel.eachSeries(function(t){if(Rwe(t)){var i=Wo(this._dimName),n=t.getReferringComponents(i,_r).models[0];n&&this._axisIndex===n.componentIndex&&e.push(t)}},this),e},r.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},r.prototype.getMinMaxSpan=function(){return Ee(this._minMaxSpan)},r.prototype.calculateDataWindow=function(e){var t=this._dataExtent,i=this.getAxisModel(),n=i.axis.scale,a=this._dataZoomModel.getRangePropMode(),s=[0,100],o=[],l=[],u;vh(["start","end"],function(d,f){var p=e[d],v=e[d+"Value"];a[f]==="percent"?(p==null&&(p=s[f]),v=n.parse(yt(p,s,t))):(u=!0,v=v==null?t[f]:n.parse(v),p=yt(v,t,s)),l[f]=v==null||isNaN(v)?t[f]:v,o[f]=p==null||isNaN(p)?s[f]:p}),D3(l),D3(o);var c=this._minMaxSpan;u?h(l,o,t,s,!1):h(o,l,s,t,!0);function h(d,f,p,v,g){var m=g?"Span":"ValueSpan";Tc(0,d,p,"all",c["min"+m],c["max"+m]);for(var y=0;y<2;y++)f[y]=yt(d[y],p,v,!0),g&&(f[y]=n.parse(f[y]))}return{valueWindow:l,percentWindow:o}},r.prototype.reset=function(e){if(e===this._dataZoomModel){var t=this.getTargetSeriesModels();this._dataExtent=Uwe(this,this._dimName,t),this._updateMinMaxSpan();var i=this.calculateDataWindow(e.settledOption);this._valueWindow=i.valueWindow,this._percentWindow=i.percentWindow,this._setAxisModel()}},r.prototype.filterData=function(e,t){if(e!==this._dataZoomModel)return;var i=this._dimName,n=this.getTargetSeriesModels(),a=e.get("filterMode"),s=this._valueWindow;if(a==="none")return;vh(n,function(l){var u=l.getData(),c=u.mapDimensionsAll(i);if(c.length){if(a==="weakFilter"){var h=u.getStore(),d=ae(c,function(f){return u.getDimensionIndex(f)},u);u.filterSelf(function(f){for(var p,v,g,m=0;m<c.length;m++){var y=h.get(d[m],f),_=!isNaN(y),b=y<s[0],T=y>s[1];if(_&&!b&&!T)return!0;_&&(g=!0),b&&(p=!0),T&&(v=!0)}return g&&p&&v})}else vh(c,function(f){if(a==="empty")l.setData(u=u.map(f,function(v){return o(v)?v:NaN}));else{var p={};p[f]=s,u.selectRange(p)}});vh(c,function(f){u.setApproximateExtent(s,f)})}});function o(l){return l>=s[0]&&l<=s[1]}},r.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,i=this._dataExtent;vh(["min","max"],function(n){var a=t.get(n+"Span"),s=t.get(n+"ValueSpan");s!=null&&(s=this.getAxisModel().axis.scale.parse(s)),s!=null?a=yt(i[0]+s,i,[0,100],!0):a!=null&&(s=yt(a,[0,100],i,!0)-i[0]),e[n+"Span"]=a,e[n+"ValueSpan"]=s},this)},r.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,i=this._valueWindow;if(t){var n=bD(i,[0,500]);n=Math.min(n,20);var a=e.axis.scale.rawExtentInfo;t[0]!==0&&a.setDeterminedMinMax("min",+i[0].toFixed(n)),t[1]!==100&&a.setDeterminedMinMax("max",+i[1].toFixed(n)),a.freeze()}},r}();function Uwe(r,e,t){var i=[1/0,-1/0];vh(t,function(s){nge(i,s.getData(),e)});var n=r.getAxisModel(),a=LW(n.axis.scale,n,i).calculate();return[a.min,a.max]}var Vwe={getTargetSeries:function(r){function e(n){r.eachComponent("dataZoom",function(a){a.eachTargetAxis(function(s,o){var l=r.getComponent(Wo(s),o);n(s,o,l,a)})})}e(function(n,a,s,o){s.__dzAxisProxy=null});var t=[];e(function(n,a,s,o){s.__dzAxisProxy||(s.__dzAxisProxy=new Fwe(n,a,o,r),t.push(s.__dzAxisProxy))});var i=be();return R(t,function(n){R(n.getTargetSeriesModels(),function(a){i.set(a.uid,a)})}),i},overallReset:function(r,e){r.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(i,n){t.getAxisProxy(i,n).reset(t)}),t.eachTargetAxis(function(i,n){t.getAxisProxy(i,n).filterData(t,e)})}),r.eachComponent("dataZoom",function(t){var i=t.findRepresentativeAxisProxy();if(i){var n=i.getDataPercentWindow(),a=i.getDataValueWindow();t.setCalculatedRange({start:n[0],end:n[1],startValue:a[0],endValue:a[1]})}})}};function zwe(r){r.registerAction("dataZoom",function(e,t){var i=Owe(t,e);R(i,function(n){n.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var E3=!1;function yI(r){E3||(E3=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,Vwe),zwe(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function Gwe(r){r.registerComponentModel(Nwe),r.registerComponentView(Bwe),yI(r)}var Gn=function(){function r(){}return r}(),vX={};function gh(r,e){vX[r]=e}function gX(r){return vX[r]}var Hwe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){r.prototype.optionUpdated.apply(this,arguments);var t=this.ecModel;R(this.option.feature,function(i,n){var a=gX(n);a&&(a.getDefaultOption&&(a.defaultOption=a.getDefaultOption(t)),He(i,a.defaultOption))})},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#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,position:"bottom"}},e}(Qe);function $we(r,e,t){var i=e.getBoxLayoutParams(),n=e.get("padding"),a={width:t.getWidth(),height:t.getHeight()},s=br(i,a,n);ju(e.get("orient"),r,e.get("itemGap"),s.width,s.height),z1(r,i,a,n)}function mX(r,e){var t=yc(e.get("padding")),i=e.getItemStyle(["color","opacity"]);return i.fill=e.get("backgroundColor"),r=new at({shape:{x:r.x-t[3],y:r.y-t[0],width:r.width+t[1]+t[3],height:r.height+t[0]+t[2],r:e.get("borderRadius")},style:i,silent:!0,z2:-1}),r}var Wwe=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,i,n,a){var s=this.group;if(s.removeAll(),!t.get("show"))return;var o=+t.get("itemSize"),l=t.get("orient")==="vertical",u=t.get("feature")||{},c=this._features||(this._features={}),h=[];R(u,function(p,v){h.push(v)}),new to(this._featureNames||[],h).add(d).update(d).remove(Be(d,null)).execute(),this._featureNames=h;function d(p,v){var g=h[p],m=h[v],y=u[g],_=new ft(y,t,t.ecModel),b;if(a&&a.newTitle!=null&&a.featureName===g&&(y.title=a.newTitle),g&&!m){if(qwe(g))b={onclick:_.option.onclick,featureName:g};else{var T=gX(g);if(!T)return;b=new T}c[g]=b}else if(b=c[m],!b)return;b.uid=jf("toolbox-feature"),b.model=_,b.ecModel=i,b.api=n;var x=b instanceof Gn;if(!g&&m){x&&b.dispose&&b.dispose(i,n);return}if(!_.get("show")||x&&b.unusable){x&&b.remove&&b.remove(i,n);return}f(_,b,g),_.setIconStatus=function(C,D){var I=this.option,M=this.iconPaths;I.iconStatus=I.iconStatus||{},I.iconStatus[C]=D,M[C]&&(D==="emphasis"?Js:eo)(M[C])},b instanceof Gn&&b.render&&b.render(_,i,n,a)}function f(p,v,g){var m=p.getModel("iconStyle"),y=p.getModel(["emphasis","iconStyle"]),_=v instanceof Gn&&v.getIcons?v.getIcons():p.get("icon"),b=p.get("title")||{},T,x;de(_)?(T={},T[g]=_):T=_,de(b)?(x={},x[g]=b):x=b;var C=p.iconPaths={};R(T,function(D,I){var M=$f(D,{},{x:-o/2,y:-o/2,width:o,height:o});M.setStyle(m.getItemStyle());var L=M.ensureState("emphasis");L.style=y.getItemStyle();var N=new nt({style:{text:x[I],align:y.get("textAlign"),borderRadius:y.get("textBorderRadius"),padding:y.get("textPadding"),fill:null,font:VD({fontStyle:y.get("textFontStyle"),fontFamily:y.get("textFontFamily"),fontSize:y.get("textFontSize"),fontWeight:y.get("textFontWeight")},i)},ignore:!0});M.setTextContent(N),Wf({el:M,componentModel:t,itemName:I,formatterParamsExtra:{title:x[I]}}),M.__title=x[I],M.on("mouseover",function(){var O=y.getItemStyle(),B=l?t.get("right")==null&&t.get("left")!=="right"?"right":"left":t.get("bottom")==null&&t.get("top")!=="bottom"?"bottom":"top";N.setStyle({fill:y.get("textFill")||O.fill||O.stroke||"#000",backgroundColor:y.get("textBackgroundColor")}),M.setTextConfig({position:y.get("textPosition")||B}),N.ignore=!t.get("showTitle"),n.enterEmphasis(this)}).on("mouseout",function(){p.get(["iconStatus",I])!=="emphasis"&&n.leaveEmphasis(this),N.hide()}),(p.get(["iconStatus",I])==="emphasis"?Js:eo)(M),s.add(M),M.on("click",ge(v.onclick,v,i,n,I)),C[I]=M})}$we(s,t,n),s.add(mX(s.getBoundingRect(),t)),l||s.eachChild(function(p){var v=p.__title,g=p.ensureState("emphasis"),m=g.textConfig||(g.textConfig={}),y=p.getTextContent(),_=y&&y.ensureState("emphasis");if(_&&!xe(_)&&v){var b=_.style||(_.style={}),T=mg(v,nt.makeFont(b)),x=p.x+s.x,C=p.y+s.y+o,D=!1;C+T.height>n.getHeight()&&(m.position="top",D=!0);var I=D?-5-T.height:o+10;x+T.width/2>n.getWidth()?(m.position=["100%",I],b.align="right"):x-T.width/2<0&&(m.position=[0,I],b.align="left")}})},e.prototype.updateView=function(t,i,n,a){R(this._features,function(s){s instanceof Gn&&s.updateView&&s.updateView(s.model,i,n,a)})},e.prototype.remove=function(t,i){R(this._features,function(n){n instanceof Gn&&n.remove&&n.remove(t,i)}),this.group.removeAll()},e.prototype.dispose=function(t,i){R(this._features,function(n){n instanceof Gn&&n.dispose&&n.dispose(t,i)})},e.type="toolbox",e}(Nt);function qwe(r){return r.indexOf("my")===0}var jwe=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,i){var n=this.model,a=n.get("name")||t.get("title.0.text")||"echarts",s=i.getZr().painter.getType()==="svg",o=s?"svg":n.get("type",!0)||"png",l=i.getConnectedDataURL({type:o,backgroundColor:n.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),u=et.browser;if(typeof MouseEvent=="function"&&(u.newEdge||!u.ie&&!u.edge)){var c=document.createElement("a");c.download=a+"."+o,c.target="_blank",c.href=l;var h=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});c.dispatchEvent(h)}else if(window.navigator.msSaveOrOpenBlob||s){var d=l.split(","),f=d[0].indexOf("base64")>-1,p=s?decodeURIComponent(d[1]):d[1];f&&(p=window.atob(p));var v=a+"."+o;if(window.navigator.msSaveOrOpenBlob){for(var g=p.length,m=new Uint8Array(g);g--;)m[g]=p.charCodeAt(g);var y=new Blob([m]);window.navigator.msSaveOrOpenBlob(y,v)}else{var _=document.createElement("iframe");document.body.appendChild(_);var b=_.contentWindow,T=b.document;T.open("image/svg+xml","replace"),T.write(p),T.close(),b.focus(),T.execCommand("SaveAs",!0,v),document.body.removeChild(_)}}else{var x=n.get("lang"),C='<body style="margin:0;"><img src="'+l+'" style="max-width:100%;" title="'+(x&&x[0]||"")+'" /></body>',D=window.open();D.document.write(C),D.document.title=a}},e.getDefaultOption=function(t){var i={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:t.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return i},e}(Gn),I3="__ec_magicType_stack__",Xwe=[["line","bar"],["stack"]],Ywe=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getIcons=function(){var t=this.model,i=t.get("icon"),n={};return R(t.get("type"),function(a){i[a]&&(n[a]=i[a])}),n},e.getDefaultOption=function(t){var i={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:t.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return i},e.prototype.onclick=function(t,i,n){var a=this.model,s=a.get(["seriesIndex",n]);if(P3[n]){var o={series:[]},l=function(h){var d=h.subType,f=h.id,p=P3[n](d,f,h,a);p&&(Ce(p,h.option),o.series.push(p));var v=h.coordinateSystem;if(v&&v.type==="cartesian2d"&&(n==="line"||n==="bar")){var g=v.getAxesByScale("ordinal")[0];if(g){var m=g.dim,y=m+"Axis",_=h.getReferringComponents(y,_r).models[0],b=_.componentIndex;o[y]=o[y]||[];for(var T=0;T<=b;T++)o[y][b]=o[y][b]||{};o[y][b].boundaryGap=n==="bar"}}};R(Xwe,function(h){Xe(h,n)>=0&&R(h,function(d){a.setIconStatus(d,"normal")})}),a.setIconStatus(n,"emphasis"),t.eachComponent({mainType:"series",query:s==null?null:{seriesIndex:s}},l);var u,c=n;n==="stack"&&(u=He({stack:a.option.title.tiled,tiled:a.option.title.stack},a.option.title),a.get(["iconStatus",n])!=="emphasis"&&(c="tiled")),i.dispatchAction({type:"changeMagicType",currentType:c,newOption:o,newTitle:u,featureName:"magicType"})}},e}(Gn),P3={line:function(r,e,t,i){if(r==="bar")return He({id:e,type:"line",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},i.get(["option","line"])||{},!0)},bar:function(r,e,t,i){if(r==="line")return He({id:e,type:"bar",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},i.get(["option","bar"])||{},!0)},stack:function(r,e,t,i){var n=t.get("stack")===I3;if(r==="line"||r==="bar")return i.setIconStatus("stack",n?"normal":"emphasis"),He({id:e,stack:n?"":I3},i.get(["option","stack"])||{},!0)}};La({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(r,e){e.mergeOption(r.newOption)});var ab=new Array(60).join("-"),Af=" ";function Kwe(r){var e={},t=[],i=[];return r.eachRawSeries(function(n){var a=n.coordinateSystem;if(a&&(a.type==="cartesian2d"||a.type==="polar")){var s=a.getBaseAxis();if(s.type==="category"){var o=s.dim+"_"+s.index;e[o]||(e[o]={categoryAxis:s,valueAxis:a.getOtherAxis(s),series:[]},i.push({axisDim:s.dim,axisIndex:s.index})),e[o].series.push(n)}else t.push(n)}else t.push(n)}),{seriesGroupByCategoryAxis:e,other:t,meta:i}}function Zwe(r){var e=[];return R(r,function(t,i){var n=t.categoryAxis,a=t.valueAxis,s=a.dim,o=[" "].concat(ae(t.series,function(f){return f.name})),l=[n.model.getCategories()];R(t.series,function(f){var p=f.getRawData();l.push(f.getRawData().mapArray(p.mapDimension(s),function(v){return v}))});for(var u=[o.join(Af)],c=0;c<l[0].length;c++){for(var h=[],d=0;d<l.length;d++)h.push(l[d][c]);u.push(h.join(Af))}e.push(u.join(`
|
||
`))}),e.join(`
|
||
|
||
`+ab+`
|
||
|
||
`)}function Qwe(r){return ae(r,function(e){var t=e.getRawData(),i=[e.name],n=[];return t.each(t.dimensions,function(){for(var a=arguments.length,s=arguments[a-1],o=t.getName(s),l=0;l<a-1;l++)n[l]=arguments[l];i.push((o?o+Af:"")+n.join(Af))}),i.join(`
|
||
`)}).join(`
|
||
|
||
`+ab+`
|
||
|
||
`)}function Jwe(r){var e=Kwe(r);return{value:_t([Zwe(e.seriesGroupByCategoryAxis),Qwe(e.other)],function(t){return!!t.replace(/[\n\t\s]/g,"")}).join(`
|
||
|
||
`+ab+`
|
||
|
||
`),meta:e.meta}}function D_(r){return r.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function e2e(r){var e=r.slice(0,r.indexOf(`
|
||
`));if(e.indexOf(Af)>=0)return!0}var yC=new RegExp("["+Af+"]+","g");function t2e(r){for(var e=r.split(/\n+/g),t=D_(e.shift()).split(yC),i=[],n=ae(t,function(l){return{name:l,data:[]}}),a=0;a<e.length;a++){var s=D_(e[a]).split(yC);i.push(s.shift());for(var o=0;o<s.length;o++)n[o]&&(n[o].data[a]=s[o])}return{series:n,categories:i}}function r2e(r){for(var e=r.split(/\n+/g),t=D_(e.shift()),i=[],n=0;n<e.length;n++){var a=D_(e[n]);if(a){var s=a.split(yC),o="",l=void 0,u=!1;isNaN(s[0])?(u=!0,o=s[0],s=s.slice(1),i[n]={name:o,value:[]},l=i[n].value):l=i[n]=[];for(var c=0;c<s.length;c++)l.push(+s[c]);l.length===1&&(u?i[n].value=l[0]:i[n]=l[0])}}return{name:t,data:i}}function i2e(r,e){var t=r.split(new RegExp(`
|
||
*`+ab+`
|
||
*`,"g")),i={series:[]};return R(t,function(n,a){if(e2e(n)){var s=t2e(n),o=e[a],l=o.axisDim+"Axis";o&&(i[l]=i[l]||[],i[l][o.axisIndex]={data:s.categories},i.series=i.series.concat(s.series))}else{var s=r2e(n);i.series.push(s)}}),i}var n2e=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,i){setTimeout(function(){i.dispatchAction({type:"hideTip"})});var n=i.getDom(),a=this.model;this._dom&&n.removeChild(this._dom);var s=document.createElement("div");s.style.cssText="position:absolute;top:0;bottom:0;left:0;right:0;padding:5px",s.style.backgroundColor=a.get("backgroundColor")||"#fff";var o=document.createElement("h4"),l=a.get("lang")||[];o.innerHTML=l[0]||a.get("title"),o.style.cssText="margin:10px 20px",o.style.color=a.get("textColor");var u=document.createElement("div"),c=document.createElement("textarea");u.style.cssText="overflow:auto";var h=a.get("optionToContent"),d=a.get("contentToOption"),f=Jwe(t);if(xe(h)){var p=h(i.getOption());de(p)?u.innerHTML=p:nc(p)&&u.appendChild(p)}else{c.readOnly=a.get("readOnly");var v=c.style;v.cssText="display:block;width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none;box-sizing:border-box;outline:none",v.color=a.get("textColor"),v.borderColor=a.get("textareaBorderColor"),v.backgroundColor=a.get("textareaColor"),c.value=f.value,u.appendChild(c)}var g=f.meta,m=document.createElement("div");m.style.cssText="position:absolute;bottom:5px;left:0;right:0";var y="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",_=document.createElement("div"),b=document.createElement("div");y+=";background-color:"+a.get("buttonColor"),y+=";color:"+a.get("buttonTextColor");var T=this;function x(){n.removeChild(s),T._dom=null}Xw(_,"click",x),Xw(b,"click",function(){if(d==null&&h!=null||d!=null&&h==null){x();return}var C;try{xe(d)?C=d(u,i.getOption()):C=i2e(c.value,g)}catch(D){throw x(),new Error("Data view format error "+D)}C&&i.dispatchAction({type:"changeDataView",newOption:C}),x()}),_.innerHTML=l[1],b.innerHTML=l[2],b.style.cssText=_.style.cssText=y,!a.get("readOnly")&&m.appendChild(b),m.appendChild(_),s.appendChild(o),s.appendChild(u),s.appendChild(m),u.style.height=n.clientHeight-80+"px",n.appendChild(s),this._dom=s},e.prototype.remove=function(t,i){this._dom&&i.getDom().removeChild(this._dom)},e.prototype.dispose=function(t,i){this.remove(t,i)},e.getDefaultOption=function(t){var i={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.getLocaleModel().get(["toolbox","dataView","title"]),lang:t.getLocaleModel().get(["toolbox","dataView","lang"]),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"};return i},e}(Gn);function a2e(r,e){return ae(r,function(t,i){var n=e&&e[i];if(Ae(n)&&!ie(n)){var a=Ae(t)&&!ie(t);a||(t={value:t});var s=n.name!=null&&t.name==null;return t=Ce(t,n),s&&delete t.name,t}else return t})}La({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(r,e){var t=[];R(r.newOption.series,function(i){var n=e.getSeriesByName(i.name)[0];if(!n)t.push(Q({type:"scatter"},i));else{var a=n.get("data");t.push({name:i.name,data:a2e(i.data,a)})}}),e.mergeOption(Ce({series:t},r.newOption))});var yX=R,_X=lt();function s2e(r,e){var t=_I(r);yX(e,function(i,n){for(var a=t.length-1;a>=0;a--){var s=t[a];if(s[n])break}if(a<0){var o=r.queryComponents({mainType:"dataZoom",subType:"select",id:n})[0];if(o){var l=o.getPercentRange();t[0][n]={dataZoomId:n,start:l[0],end:l[1]}}}}),t.push(e)}function o2e(r){var e=_I(r),t=e[e.length-1];e.length>1&&e.pop();var i={};return yX(t,function(n,a){for(var s=e.length-1;s>=0;s--)if(n=e[s][a],n){i[a]=n;break}}),i}function l2e(r){_X(r).snapshots=null}function u2e(r){return _I(r).length}function _I(r){var e=_X(r);return e.snapshots||(e.snapshots=[{}]),e.snapshots}var c2e=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,i){l2e(t),i.dispatchAction({type:"restore",from:this.uid})},e.getDefaultOption=function(t){var i={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:t.getLocaleModel().get(["toolbox","restore","title"])};return i},e}(Gn);La({type:"restore",event:"restore",update:"prepareAndUpdate"},function(r,e){e.resetOption("recreate")});var h2e=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],bI=function(){function r(e,t,i){var n=this;this._targetInfoList=[];var a=M3(t,e);R(f2e,function(s,o){(!i||!i.include||Xe(i.include,o)>=0)&&s(a,n._targetInfoList)})}return r.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,function(i,n,a){if((i.coordRanges||(i.coordRanges=[])).push(n),!i.coordRange){i.coordRange=n;var s=Tx[i.brushType](0,a,n);i.__rangeOffset={offset:O3[i.brushType](s.values,i.range,[1,1]),xyMinMax:s.xyMinMax}}}),e},r.prototype.matchOutputRanges=function(e,t,i){R(e,function(n){var a=this.findTargetInfo(n,t);a&&a!==!0&&R(a.coordSyses,function(s){var o=Tx[n.brushType](1,s,n.range,!0);i(n,o.values,s,t)})},this)},r.prototype.setInputRanges=function(e,t){R(e,function(i){var n=this.findTargetInfo(i,t);if(i.range=i.range||[],n&&n!==!0){i.panelId=n.panelId;var a=Tx[i.brushType](0,n.coordSys,i.coordRange),s=i.__rangeOffset;i.range=s?O3[i.brushType](a.values,s.offset,d2e(a.xyMinMax,s.xyMinMax)):a.values}},this)},r.prototype.makePanelOpts=function(e,t){return ae(this._targetInfoList,function(i){var n=i.getPanelRect();return{panelId:i.panelId,defaultBrushType:t?t(i):null,clipPath:Dj(n),isTargetByCursor:Ij(n,e,i.coordSysModel),getLinearBrushOtherExtent:Ej(n)}})},r.prototype.controlSeries=function(e,t,i){var n=this.findTargetInfo(e,i);return n===!0||n&&Xe(n.coordSyses,t.coordinateSystem)>=0},r.prototype.findTargetInfo=function(e,t){for(var i=this._targetInfoList,n=M3(t,e),a=0;a<i.length;a++){var s=i[a],o=e.panelId;if(o){if(s.panelId===o)return s}else for(var l=0;l<L3.length;l++)if(L3[l](n,s))return s}return!0},r}();function _C(r){return r[0]>r[1]&&r.reverse(),r}function M3(r,e){return Xp(r,e,{includeMainTypes:h2e})}var f2e={grid:function(r,e){var t=r.xAxisModels,i=r.yAxisModels,n=r.gridModels,a=be(),s={},o={};!t&&!i&&!n||(R(t,function(l){var u=l.axis.grid.model;a.set(u.id,u),s[u.id]=!0}),R(i,function(l){var u=l.axis.grid.model;a.set(u.id,u),o[u.id]=!0}),R(n,function(l){a.set(l.id,l),s[l.id]=!0,o[l.id]=!0}),a.each(function(l){var u=l.coordinateSystem,c=[];R(u.getCartesians(),function(h,d){(Xe(t,h.getAxis("x").model)>=0||Xe(i,h.getAxis("y").model)>=0)&&c.push(h)}),e.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:c[0],coordSyses:c,getPanelRect:k3.grid,xAxisDeclared:s[l.id],yAxisDeclared:o[l.id]})}))},geo:function(r,e){R(r.geoModels,function(t){var i=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:i,coordSyses:[i],getPanelRect:k3.geo})})}},L3=[function(r,e){var t=r.xAxisModel,i=r.yAxisModel,n=r.gridModel;return!n&&t&&(n=t.axis.grid.model),!n&&i&&(n=i.axis.grid.model),n&&n===e.gridModel},function(r,e){var t=r.geoModel;return t&&t===e.geoModel}],k3={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var r=this.coordSys,e=r.getBoundingRect().clone();return e.applyTransform(Zo(r)),e}},Tx={lineX:Be(R3,0),lineY:Be(R3,1),rect:function(r,e,t,i){var n=r?e.pointToData([t[0][0],t[1][0]],i):e.dataToPoint([t[0][0],t[1][0]],i),a=r?e.pointToData([t[0][1],t[1][1]],i):e.dataToPoint([t[0][1],t[1][1]],i),s=[_C([n[0],a[0]]),_C([n[1],a[1]])];return{values:s,xyMinMax:s}},polygon:function(r,e,t,i){var n=[[1/0,-1/0],[1/0,-1/0]],a=ae(t,function(s){var o=r?e.pointToData(s,i):e.dataToPoint(s,i);return n[0][0]=Math.min(n[0][0],o[0]),n[1][0]=Math.min(n[1][0],o[1]),n[0][1]=Math.max(n[0][1],o[0]),n[1][1]=Math.max(n[1][1],o[1]),o});return{values:a,xyMinMax:n}}};function R3(r,e,t,i){var n=t.getAxis(["x","y"][r]),a=_C(ae([0,1],function(o){return e?n.coordToData(n.toLocalCoord(i[o]),!0):n.toGlobalCoord(n.dataToCoord(i[o]))})),s=[];return s[r]=a,s[1-r]=[NaN,NaN],{values:a,xyMinMax:s}}var O3={lineX:Be(N3,0),lineY:Be(N3,1),rect:function(r,e,t){return[[r[0][0]-t[0]*e[0][0],r[0][1]-t[0]*e[0][1]],[r[1][0]-t[1]*e[1][0],r[1][1]-t[1]*e[1][1]]]},polygon:function(r,e,t){return ae(r,function(i,n){return[i[0]-t[0]*e[n][0],i[1]-t[1]*e[n][1]]})}};function N3(r,e,t,i){return[e[0]-i[r]*t[0],e[1]-i[r]*t[1]]}function d2e(r,e){var t=B3(r),i=B3(e),n=[t[0]/i[0],t[1]/i[1]];return isNaN(n[0])&&(n[0]=1),isNaN(n[1])&&(n[1]=1),n}function B3(r){return r?[r[0][1]-r[0][0],r[1][1]-r[1][0]]:[NaN,NaN]}var bC=R,p2e=cce("toolbox-dataZoom_"),v2e=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,i,n,a){this._brushController||(this._brushController=new YE(n.getZr()),this._brushController.on("brush",ge(this._onBrush,this)).mount()),y2e(t,i,this,a,n),m2e(t,i)},e.prototype.onclick=function(t,i,n){g2e[n].call(this)},e.prototype.remove=function(t,i){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(t,i){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(t){var i=t.areas;if(!t.isEnd||!i.length)return;var n={},a=this.ecModel;this._brushController.updateCovers([]);var s=new bI(SI(this.model),a,{include:["grid"]});s.matchOutputRanges(i,a,function(u,c,h){if(h.type==="cartesian2d"){var d=u.brushType;d==="rect"?(o("x",h,c[0]),o("y",h,c[1])):o({lineX:"x",lineY:"y"}[d],h,c)}}),s2e(a,n),this._dispatchZoomAction(n);function o(u,c,h){var d=c.getAxis(u),f=d.model,p=l(u,f,a),v=p.findRepresentativeAxisProxy(f).getMinMaxSpan();(v.minValueSpan!=null||v.maxValueSpan!=null)&&(h=Tc(0,h.slice(),d.scale.getExtent(),0,v.minValueSpan,v.maxValueSpan)),p&&(n[p.id]={dataZoomId:p.id,startValue:h[0],endValue:h[1]})}function l(u,c,h){var d;return h.eachComponent({mainType:"dataZoom",subType:"select"},function(f){var p=f.getAxisModel(u,c.componentIndex);p&&(d=f)}),d}},e.prototype._dispatchZoomAction=function(t){var i=[];bC(t,function(n,a){i.push(Ee(n))}),i.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:i})},e.getDefaultOption=function(t){var i={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:t.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}};return i},e}(Gn),g2e={zoom:function(){var r=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:r})},back:function(){this._dispatchZoomAction(o2e(this.ecModel))}};function SI(r){var e={xAxisIndex:r.get("xAxisIndex",!0),yAxisIndex:r.get("yAxisIndex",!0),xAxisId:r.get("xAxisId",!0),yAxisId:r.get("yAxisId",!0)};return e.xAxisIndex==null&&e.xAxisId==null&&(e.xAxisIndex="all"),e.yAxisIndex==null&&e.yAxisId==null&&(e.yAxisIndex="all"),e}function m2e(r,e){r.setIconStatus("back",u2e(e)>1?"emphasis":"normal")}function y2e(r,e,t,i,n){var a=t._isZoomActive;i&&i.type==="takeGlobalCursor"&&(a=i.key==="dataZoomSelect"?i.dataZoomSelectActive:!1),t._isZoomActive=a,r.setIconStatus("zoom",a?"emphasis":"normal");var s=new bI(SI(r),e,{include:["grid"]}),o=s.makePanelOpts(n,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});t._brushController.setPanels(o).enableBrush(a&&o.length?{brushType:"auto",brushStyle:r.getModel("brushStyle").getItemStyle()}:!1)}Lfe("dataZoom",function(r){var e=r.getComponent("toolbox",0),t=["feature","dataZoom"];if(!e||e.get(t)==null)return;var i=e.getModel(t),n=[],a=SI(i),s=Xp(r,a);bC(s.xAxisModels,function(l){return o(l,"xAxis","xAxisIndex")}),bC(s.yAxisModels,function(l){return o(l,"yAxis","yAxisIndex")});function o(l,u,c){var h=l.componentIndex,d={type:"select",$fromToolbox:!0,filterMode:i.get("filterMode",!0)||"filter",id:p2e+u+h};d[c]=h,n.push(d)}return n});function _2e(r){r.registerComponentModel(Hwe),r.registerComponentView(Wwe),gh("saveAsImage",jwe),gh("magicType",Ywe),gh("dataView",n2e),gh("dataZoom",v2e),gh("restore",c2e),Ye(Gwe)}var b2e=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,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,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}(Qe);function bX(r){var e=r.get("confine");return e!=null?!!e:r.get("renderMode")==="richText"}function SX(r){if(et.domSupported){for(var e=document.documentElement.style,t=0,i=r.length;t<i;t++)if(r[t]in e)return r[t]}}var TX=SX(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),S2e=SX(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);function xX(r,e){if(!r)return e;e=XD(e,!0);var t=r.indexOf(e);return r=t===-1?e:"-"+r.slice(0,t)+"-"+e,r.toLowerCase()}function T2e(r,e){var t=r.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(r);return t?t[e]:null}var x2e=xX(S2e,"transition"),TI=xX(TX,"transform"),w2e="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(et.transform3dSupported?"will-change:transform;":"");function C2e(r){return r=r==="left"?"right":r==="right"?"left":r==="top"?"bottom":"top",r}function A2e(r,e,t){if(!de(t)||t==="inside")return"";var i=r.get("backgroundColor"),n=r.get("borderWidth");e=uc(e);var a=C2e(t),s=Math.max(Math.round(n)*1.5,6),o="",l=TI+":",u;Xe(["left","right"],a)>-1?(o+="top:50%",l+="translateY(-50%) rotate("+(u=a==="left"?-225:-45)+"deg)"):(o+="left:50%",l+="translateX(-50%) rotate("+(u=a==="top"?225:45)+"deg)");var c=u*Math.PI/180,h=s+n,d=h*Math.abs(Math.cos(c))+h*Math.abs(Math.sin(c)),f=Math.round(((d-Math.SQRT2*n)/2+Math.SQRT2*n-(d-h)/2)*100)/100;o+=";"+a+":-"+f+"px";var p=e+" solid "+n+"px;",v=["position:absolute;width:"+s+"px;height:"+s+"px;z-index:-1;",o+";"+l+";","border-bottom:"+p,"border-right:"+p,"background-color:"+i+";"];return'<div style="'+v.join("")+'"></div>'}function D2e(r,e){var t="cubic-bezier(0.23,1,0.32,1)",i=" "+r/2+"s "+t,n="opacity"+i+",visibility"+i;return e||(i=" "+r+"s "+t,n+=et.transformSupported?","+TI+i:",left"+i+",top"+i),x2e+":"+n}function F3(r,e,t){var i=r.toFixed(0)+"px",n=e.toFixed(0)+"px";if(!et.transformSupported)return t?"top:"+n+";left:"+i+";":[["top",n],["left",i]];var a=et.transform3dSupported,s="translate"+(a?"3d":"")+"("+i+","+n+(a?",0":"")+")";return t?"top:0;left:0;"+TI+":"+s+";":[["top",0],["left",0],[TX,s]]}function E2e(r){var e=[],t=r.get("fontSize"),i=r.getTextColor();i&&e.push("color:"+i),e.push("font:"+r.getFont()),t&&e.push("line-height:"+Math.round(t*3/2)+"px");var n=r.get("textShadowColor"),a=r.get("textShadowBlur")||0,s=r.get("textShadowOffsetX")||0,o=r.get("textShadowOffsetY")||0;return n&&a&&e.push("text-shadow:"+s+"px "+o+"px "+a+"px "+n),R(["decoration","align"],function(l){var u=r.get(l);u&&e.push("text-"+l+":"+u)}),e.join(";")}function I2e(r,e,t){var i=[],n=r.get("transitionDuration"),a=r.get("backgroundColor"),s=r.get("shadowBlur"),o=r.get("shadowColor"),l=r.get("shadowOffsetX"),u=r.get("shadowOffsetY"),c=r.getModel("textStyle"),h=k$(r,"html"),d=l+"px "+u+"px "+s+"px "+o;return i.push("box-shadow:"+d),e&&n&&i.push(D2e(n,t)),a&&i.push("background-color:"+a),R(["width","color","radius"],function(f){var p="border-"+f,v=XD(p),g=r.get(v);g!=null&&i.push(p+":"+g+(f==="color"?"":"px"))}),i.push(E2e(c)),h!=null&&i.push("padding:"+yc(h).join("px ")+"px"),i.join(";")+";"}function U3(r,e,t,i,n){var a=e&&e.painter;if(t){var s=a&&a.getViewportRoot();s&&Fle(r,s,t,i,n)}else{r[0]=i,r[1]=n;var o=a&&a.getViewportRootOffset();o&&(r[0]+=o.offsetLeft,r[1]+=o.offsetTop)}r[2]=r[0]/e.getWidth(),r[3]=r[1]/e.getHeight()}var P2e=function(){function r(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,et.wxa)return null;var i=document.createElement("div");i.domBelongToZr=!0,this.el=i;var n=this._zr=e.getZr(),a=t.appendTo,s=a&&(de(a)?document.querySelector(a):nc(a)?a:xe(a)&&a(e.getDom()));U3(this._styleCoord,n,s,e.getWidth()/2,e.getHeight()/2),(s||e.getDom()).appendChild(i),this._api=e,this._container=s;var o=this;i.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},i.onmousemove=function(l){if(l=l||window.event,!o._enterable){var u=n.handler,c=n.painter.getViewportRoot();Bn(c,l,!0),u.dispatch("mousemove",l)}},i.onmouseleave=function(){o._inContent=!1,o._enterable&&o._show&&o.hideLater(o._hideDelay)}}return r.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),i=T2e(t,"position"),n=t.style;n.position!=="absolute"&&i!=="absolute"&&(n.position="relative")}var a=e.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a,this.el.className=e.get("className")||""},r.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var i=this.el,n=i.style,a=this._styleCoord;i.innerHTML?n.cssText=w2e+I2e(e,!this._firstShow,this._longHide)+F3(a[0],a[1],!0)+("border-color:"+uc(t)+";")+(e.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):n.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},r.prototype.setContent=function(e,t,i,n,a){var s=this.el;if(e==null){s.innerHTML="";return}var o="";if(de(a)&&i.get("trigger")==="item"&&!bX(i)&&(o=A2e(i,n,a)),de(e))s.innerHTML=e+o;else if(e){s.innerHTML="",ie(e)||(e=[e]);for(var l=0;l<e.length;l++)nc(e[l])&&e[l].parentNode!==s&&s.appendChild(e[l]);if(o&&s.childNodes.length){var u=document.createElement("div");u.innerHTML=o,s.appendChild(u)}}},r.prototype.setEnterable=function(e){this._enterable=e},r.prototype.getSize=function(){var e=this.el;return[e.offsetWidth,e.offsetHeight]},r.prototype.moveTo=function(e,t){var i=this._styleCoord;if(U3(i,this._zr,this._container,e,t),i[0]!=null&&i[1]!=null){var n=this.el.style,a=F3(i[0],i[1]);R(a,function(s){n[s[0]]=s[1]})}},r.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},r.prototype.hide=function(){var e=this,t=this.el.style;t.visibility="hidden",t.opacity="0",et.transform3dSupported&&(t.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return e._longHide=!0},500)},r.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(ge(this.hide,this),e)):this.hide())},r.prototype.isShow=function(){return this._show},r.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var e=this.el.parentNode;e&&e.removeChild(this.el),this.el=this._container=null},r}(),M2e=function(){function r(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),z3(this._styleCoord,this._zr,e.getWidth()/2,e.getHeight()/2)}return r.prototype.update=function(e){var t=e.get("alwaysShowContent");t&&this._moveIfResized(),this._alwaysShowContent=t},r.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},r.prototype.setContent=function(e,t,i,n,a){var s=this;Ae(e)&>(""),this.el&&this._zr.remove(this.el);var o=i.getModel("textStyle");this.el=new nt({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:n,textShadowColor:o.get("textShadowColor"),fill:i.get(["textStyle","color"]),padding:k$(i,"richText"),verticalAlign:"top",align:"left"},z:i.get("z")}),R(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(u){s.el.style[u]=i.get(u)}),R(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],function(u){s.el.style[u]=o.get(u)||0}),this._zr.add(this.el);var l=this;this.el.on("mouseover",function(){l._enterable&&(clearTimeout(l._hideTimeout),l._show=!0),l._inContent=!0}),this.el.on("mouseout",function(){l._enterable&&l._show&&l.hideLater(l._hideDelay),l._inContent=!1})},r.prototype.setEnterable=function(e){this._enterable=e},r.prototype.getSize=function(){var e=this.el,t=this.el.getBoundingRect(),i=V3(e.style);return[t.width+i.left+i.right,t.height+i.top+i.bottom]},r.prototype.moveTo=function(e,t){var i=this.el;if(i){var n=this._styleCoord;z3(n,this._zr,e,t),e=n[0],t=n[1];var a=i.style,s=Io(a.borderWidth||0),o=V3(a);i.x=e+s+o.left,i.y=t+s+o.top,i.markRedraw()}},r.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},r.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},r.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(ge(this.hide,this),e)):this.hide())},r.prototype.isShow=function(){return this._show},r.prototype.dispose=function(){this._zr.remove(this.el)},r}();function Io(r){return Math.max(0,r)}function V3(r){var e=Io(r.shadowBlur||0),t=Io(r.shadowOffsetX||0),i=Io(r.shadowOffsetY||0);return{left:Io(e-t),right:Io(e+t),top:Io(e-i),bottom:Io(e+i)}}function z3(r,e,t,i){r[0]=t,r[1]=i,r[2]=r[0]/e.getWidth(),r[3]=r[1]/e.getHeight()}var L2e=new at({shape:{x:-1,y:-1,width:2,height:2}}),k2e=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,i){if(!(et.node||!i.getDom())){var n=t.getComponent("tooltip"),a=this._renderMode=mce(n.get("renderMode"));this._tooltipContent=a==="richText"?new M2e(i):new P2e(i,{appendTo:n.get("appendToBody",!0)?"body":n.get("appendTo",!0)})}},e.prototype.render=function(t,i,n){if(!(et.node||!n.getDom())){this.group.removeAll(),this._tooltipModel=t,this._ecModel=i,this._api=n;var a=this._tooltipContent;a.update(t),a.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow(),this._renderMode!=="richText"&&t.get("transitionDuration")?Qf(this,"_updatePosition",50,"fixRate"):Bv(this,"_updatePosition")}},e.prototype._initGlobalListener=function(){var t=this._tooltipModel,i=t.get("triggerOn");oX("itemTooltip",this._api,ge(function(n,a,s){i!=="none"&&(i.indexOf(n)>=0?this._tryShow(a,s):n==="leave"&&this._hide(s))},this))},e.prototype._keepShow=function(){var t=this._tooltipModel,i=this._ecModel,n=this._api,a=t.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&a!=="none"&&a!=="click"){var s=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&s.manuallyShowTip(t,i,n,{x:s._lastX,y:s._lastY,dataByCoordSys:s._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(t,i,n,a){if(!(a.from===this.uid||et.node||!n.getDom())){var s=G3(a,n);this._ticket="";var o=a.dataByCoordSys,l=B2e(a,i,n);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:a.position,positionDefault:"bottom"},s)}else if(a.tooltip&&a.x!=null&&a.y!=null){var c=L2e;c.x=a.x,c.y=a.y,c.update(),ke(c).tooltipConfig={name:null,option:a.tooltip},this._tryShow({offsetX:a.x,offsetY:a.y,target:c},s)}else if(o)this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,dataByCoordSys:o,tooltipOption:a.tooltipOption},s);else if(a.seriesIndex!=null){if(this._manuallyAxisShowTip(t,i,n,a))return;var h=lX(a,i),d=h.point[0],f=h.point[1];d!=null&&f!=null&&this._tryShow({offsetX:d,offsetY:f,target:h.el,position:a.position,positionDefault:"bottom"},s)}else a.x!=null&&a.y!=null&&(n.dispatchAction({type:"updateAxisPointer",x:a.x,y:a.y}),this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,target:n.getZr().findHover(a.x,a.y).target},s))}},e.prototype.manuallyHideTip=function(t,i,n,a){var s=this._tooltipContent;this._tooltipModel&&s.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,a.from!==this.uid&&this._hide(G3(a,n))},e.prototype._manuallyAxisShowTip=function(t,i,n,a){var s=a.seriesIndex,o=a.dataIndex,l=i.getComponent("axisPointer").coordSysAxesInfo;if(!(s==null||o==null||l==null)){var u=i.getSeriesByIndex(s);if(u){var c=u.getData(),h=Zd([c.getItemModel(o),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(h.get("trigger")==="axis")return n.dispatchAction({type:"updateAxisPointer",seriesIndex:s,dataIndex:o,position:a.position}),!0}}},e.prototype._tryShow=function(t,i){var n=t.target,a=this._tooltipModel;if(a){this._lastX=t.offsetX,this._lastY=t.offsetY;var s=t.dataByCoordSys;if(s&&s.length)this._showAxisTooltip(s,t);else if(n){var o=ke(n);if(o.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;Du(n,function(c){if(ke(c).dataIndex!=null)return l=c,!0;if(ke(c).tooltipConfig!=null)return u=c,!0},!0),l?this._showSeriesItemTooltip(t,l,i):u?this._showComponentItemTooltip(t,u,i):this._hide(i)}else this._lastDataByCoordSys=null,this._hide(i)}},e.prototype._showOrMove=function(t,i){var n=t.get("showDelay");i=ge(i,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(i,n):i()},e.prototype._showAxisTooltip=function(t,i){var n=this._ecModel,a=this._tooltipModel,s=[i.offsetX,i.offsetY],o=Zd([i.tooltipOption],a),l=this._renderMode,u=[],c=Fr("section",{blocks:[],noHeader:!0}),h=[],d=new oT;R(t,function(y){R(y.dataByAxis,function(_){var b=n.getComponent(_.axisDim+"Axis",_.axisIndex),T=_.value;if(!(!b||T==null)){var x=nX(T,b.axis,n,_.seriesDataIndices,_.valueLabelOpt),C=Fr("section",{header:x,noHeader:!qn(x),sortBlocks:!0,blocks:[]});c.blocks.push(C),R(_.seriesDataIndices,function(D){var I=n.getSeriesByIndex(D.seriesIndex),M=D.dataIndexInside,L=I.getDataParams(M);if(!(L.dataIndex<0)){L.axisDim=_.axisDim,L.axisIndex=_.axisIndex,L.axisType=_.axisType,L.axisId=_.axisId,L.axisValue=xE(b.axis,{value:T}),L.axisValueLabel=x,L.marker=d.makeTooltipMarker("item",uc(L.color),l);var N=IR(I.formatTooltip(M,!0,null)),O=N.frag;if(O){var B=Zd([I],a).get("valueFormatter");C.blocks.push(B?Q({valueFormatter:B},O):O)}N.text&&h.push(N.text),u.push(L)}})}})}),c.blocks.reverse(),h.reverse();var f=i.position,p=o.get("order"),v=OR(c,d,l,p,n.get("useUTC"),o.get("textStyle"));v&&h.unshift(v);var g=l==="richText"?`
|
||
|
||
`:"<br/>",m=h.join(g);this._showOrMove(o,function(){this._updateContentNotChangedOnAxis(t,u)?this._updatePosition(o,f,s[0],s[1],this._tooltipContent,u):this._showTooltipContent(o,m,u,Math.random()+"",s[0],s[1],f,null,d)})},e.prototype._showSeriesItemTooltip=function(t,i,n){var a=this._ecModel,s=ke(i),o=s.seriesIndex,l=a.getSeriesByIndex(o),u=s.dataModel||l,c=s.dataIndex,h=s.dataType,d=u.getData(h),f=this._renderMode,p=t.positionDefault,v=Zd([d.getItemModel(c),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,p?{position:p}:null),g=v.get("trigger");if(!(g!=null&&g!=="item")){var m=u.getDataParams(c,h),y=new oT;m.marker=y.makeTooltipMarker("item",uc(m.color),f);var _=IR(u.formatTooltip(c,!1,h)),b=v.get("order"),T=v.get("valueFormatter"),x=_.frag,C=x?OR(T?Q({valueFormatter:T},x):x,y,f,b,a.get("useUTC"),v.get("textStyle")):_.text,D="item_"+u.name+"_"+c;this._showOrMove(v,function(){this._showTooltipContent(v,C,m,D,t.offsetX,t.offsetY,t.position,t.target,y)}),n({type:"showTip",dataIndexInside:c,dataIndex:d.getRawIndex(c),seriesIndex:o,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,i,n){var a=this._renderMode==="html",s=ke(i),o=s.tooltipConfig,l=o.option||{},u=l.encodeHTMLContent;if(de(l)){var c=l;l={content:c,formatter:c},u=!0}u&&a&&l.content&&(l=Ee(l),l.content=Di(l.content));var h=[l],d=this._ecModel.getComponent(s.componentMainType,s.componentIndex);d&&h.push(d),h.push({formatter:l.content});var f=t.positionDefault,p=Zd(h,this._tooltipModel,f?{position:f}:null),v=p.get("content"),g=Math.random()+"",m=new oT;this._showOrMove(p,function(){var y=Ee(p.get("formatterParams")||{});this._showTooltipContent(p,v,y,g,t.offsetX,t.offsetY,t.position,i,m)}),n({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,i,n,a,s,o,l,u,c){if(this._ticket="",!(!t.get("showContent")||!t.get("show"))){var h=this._tooltipContent;h.setEnterable(t.get("enterable"));var d=t.get("formatter");l=l||t.get("position");var f=i,p=this._getNearestPoint([s,o],n,t.get("trigger"),t.get("borderColor")),v=p.color;if(d)if(de(d)){var g=t.ecModel.get("useUTC"),m=ie(n)?n[0]:n,y=m&&m.axisType&&m.axisType.indexOf("time")>=0;f=d,y&&(f=wg(m.axisValue,f,g)),f=YD(f,n,!0)}else if(xe(d)){var _=ge(function(b,T){b===this._ticket&&(h.setContent(T,c,t,v,l),this._updatePosition(t,l,s,o,h,n,u))},this);this._ticket=a,f=d(n,a,_)}else f=d;h.setContent(f,c,t,v,l),h.show(t,v),this._updatePosition(t,l,s,o,h,n,u)}},e.prototype._getNearestPoint=function(t,i,n,a){if(n==="axis"||ie(i))return{color:a||(this._renderMode==="html"?"#fff":"none")};if(!ie(i))return{color:a||i.color||i.borderColor}},e.prototype._updatePosition=function(t,i,n,a,s,o,l){var u=this._api.getWidth(),c=this._api.getHeight();i=i||t.get("position");var h=s.getSize(),d=t.get("align"),f=t.get("verticalAlign"),p=l&&l.getBoundingRect().clone();if(l&&p.applyTransform(l.transform),xe(i)&&(i=i([n,a],o,s.el,p,{viewSize:[u,c],contentSize:h.slice()})),ie(i))n=ce(i[0],u),a=ce(i[1],c);else if(Ae(i)){var v=i;v.width=h[0],v.height=h[1];var g=br(v,{width:u,height:c});n=g.x,a=g.y,d=null,f=null}else if(de(i)&&l){var m=N2e(i,p,h,t.get("borderWidth"));n=m[0],a=m[1]}else{var m=R2e(n,a,s,u,c,d?null:20,f?null:20);n=m[0],a=m[1]}if(d&&(n-=H3(d)?h[0]/2:d==="right"?h[0]:0),f&&(a-=H3(f)?h[1]/2:f==="bottom"?h[1]:0),bX(t)){var m=O2e(n,a,s,u,c);n=m[0],a=m[1]}s.moveTo(n,a)},e.prototype._updateContentNotChangedOnAxis=function(t,i){var n=this._lastDataByCoordSys,a=this._cbParamsList,s=!!n&&n.length===t.length;return s&&R(n,function(o,l){var u=o.dataByAxis||[],c=t[l]||{},h=c.dataByAxis||[];s=s&&u.length===h.length,s&&R(u,function(d,f){var p=h[f]||{},v=d.seriesDataIndices||[],g=p.seriesDataIndices||[];s=s&&d.value===p.value&&d.axisType===p.axisType&&d.axisId===p.axisId&&v.length===g.length,s&&R(v,function(m,y){var _=g[y];s=s&&m.seriesIndex===_.seriesIndex&&m.dataIndex===_.dataIndex}),a&&R(d.seriesDataIndices,function(m){var y=m.seriesIndex,_=i[y],b=a[y];_&&b&&b.data!==_.data&&(s=!1)})})}),this._lastDataByCoordSys=t,this._cbParamsList=i,!!s},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,i){et.node||!i.getDom()||(Bv(this,"_updatePosition"),this._tooltipContent.dispose(),vC("itemTooltip",i))},e.type="tooltip",e}(Nt);function Zd(r,e,t){var i=e.ecModel,n;t?(n=new ft(t,i,i),n=new ft(e.option,n,i)):n=e;for(var a=r.length-1;a>=0;a--){var s=r[a];s&&(s instanceof ft&&(s=s.get("tooltip",!0)),de(s)&&(s={formatter:s}),s&&(n=new ft(s,n,i)))}return n}function G3(r,e){return r.dispatchAction||ge(e.dispatchAction,e)}function R2e(r,e,t,i,n,a,s){var o=t.getSize(),l=o[0],u=o[1];return a!=null&&(r+l+a+2>i?r-=l+a:r+=a),s!=null&&(e+u+s>n?e-=u+s:e+=s),[r,e]}function O2e(r,e,t,i,n){var a=t.getSize(),s=a[0],o=a[1];return r=Math.min(r+s,i)-s,e=Math.min(e+o,n)-o,r=Math.max(r,0),e=Math.max(e,0),[r,e]}function N2e(r,e,t,i){var n=t[0],a=t[1],s=Math.ceil(Math.SQRT2*i)+8,o=0,l=0,u=e.width,c=e.height;switch(r){case"inside":o=e.x+u/2-n/2,l=e.y+c/2-a/2;break;case"top":o=e.x+u/2-n/2,l=e.y-a-s;break;case"bottom":o=e.x+u/2-n/2,l=e.y+c+s;break;case"left":o=e.x-n-s,l=e.y+c/2-a/2;break;case"right":o=e.x+u+s,l=e.y+c/2-a/2}return[o,l]}function H3(r){return r==="center"||r==="middle"}function B2e(r,e,t){var i=CD(r).queryOptionMap,n=i.keys()[0];if(!(!n||n==="series")){var a=yg(e,n,i.get(n),{useDefault:!1,enableAll:!1,enableNone:!1}),s=a.models[0];if(s){var o=t.getViewOfComponentModel(s),l;if(o.group.traverse(function(u){var c=ke(u).tooltipConfig;if(c&&c.name===r.name)return l=u,!0}),l)return{componentMainType:n,componentIndex:s.componentIndex,el:l}}}}function F2e(r){Ye(Og),r.registerComponentModel(b2e),r.registerComponentView(k2e),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},tr),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},tr)}var U2e=["rect","polygon","keep","clear"];function V2e(r,e){var t=wt(r?r.brush:[]);if(t.length){var i=[];R(t,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(i=i.concat(u))});var n=r&&r.toolbox;ie(n)&&(n=n[0]),n||(n={feature:{}},r.toolbox=[n]);var a=n.feature||(n.feature={}),s=a.brush||(a.brush={}),o=s.type||(s.type=[]);o.push.apply(o,i),z2e(o),e&&!o.length&&o.push.apply(o,U2e)}}function z2e(r){var e={};R(r,function(t){e[t]=1}),r.length=0,R(e,function(t,i){r.push(i)})}var $3=R;function W3(r){if(r){for(var e in r)if(r.hasOwnProperty(e))return!0}}function SC(r,e,t){var i={};return $3(e,function(a){var s=i[a]=n();$3(r[a],function(o,l){if(Nr.isValidType(l)){var u={type:l,visual:o};t&&t(u,a),s[l]=new Nr(u),l==="opacity"&&(u=Ee(u),u.type="colorAlpha",s.__hidden.__alphaForOpacity=new Nr(u))}})}),i;function n(){var a=function(){};a.prototype.__hidden=a.prototype;var s=new a;return s}}function wX(r,e,t){var i;R(t,function(n){e.hasOwnProperty(n)&&W3(e[n])&&(i=!0)}),i&&R(t,function(n){e.hasOwnProperty(n)&&W3(e[n])?r[n]=Ee(e[n]):delete r[n]})}function G2e(r,e,t,i,n,a){var s={};R(r,function(h){var d=Nr.prepareVisualTypes(e[h]);s[h]=d});var o;function l(h){return aE(t,o,h)}function u(h,d){H$(t,o,h,d)}t.each(c);function c(h,d){o=h;var f=t.getRawDataItem(o);if(!(f&&f.visualMap===!1))for(var p=i.call(n,h),v=e[p],g=s[p],m=0,y=g.length;m<y;m++){var _=g[m];v[_]&&v[_].applyVisual(h,l,u)}}}function H2e(r,e,t,i){var n={};return R(r,function(a){var s=Nr.prepareVisualTypes(e[a]);n[a]=s}),{progress:function(s,o){var l;i!=null&&(l=o.getDimensionIndex(i));function u(T){return aE(o,h,T)}function c(T,x){H$(o,h,T,x)}for(var h,d=o.getStore();(h=s.next())!=null;){var f=o.getRawDataItem(h);if(!(f&&f.visualMap===!1))for(var p=i!=null?d.get(l,h):h,v=t(p),g=e[v],m=n[v],y=0,_=m.length;y<_;y++){var b=m[y];g[b]&&g[b].applyVisual(p,u,c)}}}}}function $2e(r){var e=r.brushType,t={point:function(i){return q3[e].point(i,t,r)},rect:function(i){return q3[e].rect(i,t,r)}};return t}var q3={lineX:j3(0),lineY:j3(1),rect:{point:function(r,e,t){return r&&t.boundingRect.contain(r[0],r[1])},rect:function(r,e,t){return r&&t.boundingRect.intersect(r)}},polygon:{point:function(r,e,t){return r&&t.boundingRect.contain(r[0],r[1])&&vu(t.range,r[0],r[1])},rect:function(r,e,t){var i=t.range;if(!r||i.length<=1)return!1;var n=r.x,a=r.y,s=r.width,o=r.height,l=i[0];if(vu(i,n,a)||vu(i,n+s,a)||vu(i,n,a+o)||vu(i,n+s,a+o)||We.create(r).contain(l[0],l[1])||_p(n,a,n+s,a,i)||_p(n,a,n,a+o,i)||_p(n+s,a,n+s,a+o,i)||_p(n,a+o,n+s,a+o,i))return!0}}};function j3(r){var e=["x","y"],t=["width","height"];return{point:function(i,n,a){if(i){var s=a.range,o=i[r];return Qd(o,s)}},rect:function(i,n,a){if(i){var s=a.range,o=[i[e[r]],i[e[r]]+i[t[r]]];return o[1]<o[0]&&o.reverse(),Qd(o[0],s)||Qd(o[1],s)||Qd(s[0],o)||Qd(s[1],o)}}}}function Qd(r,e){return e[0]<=r&&r<=e[1]}var X3=["inBrush","outOfBrush"],xx="__ecBrushSelect",TC="__ecInBrushSelectEvent";function CX(r){r.eachComponent({mainType:"brush"},function(e){var t=e.brushTargetManager=new bI(e.option,r);t.setInputRanges(e.areas,r)})}function W2e(r,e,t){var i=[],n,a;r.eachComponent({mainType:"brush"},function(s){t&&t.type==="takeGlobalCursor"&&s.setBrushOption(t.key==="brush"?t.brushOption:{brushType:!1})}),CX(r),r.eachComponent({mainType:"brush"},function(s,o){var l={brushId:s.id,brushIndex:o,brushName:s.name,areas:Ee(s.areas),selected:[]};i.push(l);var u=s.option,c=u.brushLink,h=[],d=[],f=[],p=!1;o||(n=u.throttleType,a=u.throttleDelay);var v=ae(s.areas,function(T){var x=Y2e[T.brushType],C=Ce({boundingRect:x?x(T):void 0},T);return C.selectors=$2e(C),C}),g=SC(s.option,X3,function(T){T.mappingMethod="fixed"});ie(c)&&R(c,function(T){h[T]=1});function m(T){return c==="all"||!!h[T]}function y(T){return!!T.length}r.eachSeries(function(T,x){var C=f[x]=[];T.subType==="parallel"?_(T,x):b(T,x,C)});function _(T,x){var C=T.coordinateSystem;p=p||C.hasAxisBrushed(),m(x)&&C.eachActiveState(T.getData(),function(D,I){D==="active"&&(d[I]=1)})}function b(T,x,C){if(!(!T.brushSelector||X2e(s,x))&&(R(v,function(I){s.brushTargetManager.controlSeries(I,T,r)&&C.push(I),p=p||y(C)}),m(x)&&y(C))){var D=T.getData();D.each(function(I){Y3(T,C,D,I)&&(d[I]=1)})}}r.eachSeries(function(T,x){var C={seriesId:T.id,seriesIndex:x,seriesName:T.name,dataIndex:[]};l.selected.push(C);var D=f[x],I=T.getData(),M=m(x)?function(L){return d[L]?(C.dataIndex.push(I.getRawIndex(L)),"inBrush"):"outOfBrush"}:function(L){return Y3(T,D,I,L)?(C.dataIndex.push(I.getRawIndex(L)),"inBrush"):"outOfBrush"};(m(x)?p:y(D))&&G2e(X3,g,I,M)})}),q2e(e,n,a,i,t)}function q2e(r,e,t,i,n){if(n){var a=r.getZr();if(!a[TC]){a[xx]||(a[xx]=j2e);var s=Qf(a,xx,t,e);s(r,i)}}}function j2e(r,e){if(!r.isDisposed()){var t=r.getZr();t[TC]=!0,r.dispatchAction({type:"brushSelect",batch:e}),t[TC]=!1}}function Y3(r,e,t,i){for(var n=0,a=e.length;n<a;n++){var s=e[n];if(r.brushSelector(i,t,s.selectors,s))return!0}}function X2e(r,e){var t=r.option.seriesIndex;return t!=null&&t!=="all"&&(ie(t)?Xe(t,e)<0:e!==t)}var Y2e={rect:function(r){return K3(r.range)},polygon:function(r){for(var e,t=r.range,i=0,n=t.length;i<n;i++){e=e||[[1/0,-1/0],[1/0,-1/0]];var a=t[i];a[0]<e[0][0]&&(e[0][0]=a[0]),a[0]>e[0][1]&&(e[0][1]=a[0]),a[1]<e[1][0]&&(e[1][0]=a[1]),a[1]>e[1][1]&&(e[1][1]=a[1])}return e&&K3(e)}};function K3(r){return new We(r[0][0],r[1][0],r[0][1]-r[0][0],r[1][1]-r[1][0])}var K2e=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,i){this.ecModel=t,this.api=i,this.model,(this._brushController=new YE(i.getZr())).on("brush",ge(this._onBrush,this)).mount()},e.prototype.render=function(t,i,n,a){this.model=t,this._updateController(t,i,n,a)},e.prototype.updateTransform=function(t,i,n,a){CX(i),this._updateController(t,i,n,a)},e.prototype.updateVisual=function(t,i,n,a){this.updateTransform(t,i,n,a)},e.prototype.updateView=function(t,i,n,a){this._updateController(t,i,n,a)},e.prototype._updateController=function(t,i,n,a){(!a||a.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(n)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var i=this.model.id,n=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:i,areas:Ee(n),$from:i}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:i,areas:Ee(n),$from:i})},e.type="brush",e}(Nt),Z2e="#ddd",Q2e=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.areas=[],t.brushOption={},t}return e.prototype.optionUpdated=function(t,i){var n=this.option;!i&&wX(n,t,["inBrush","outOfBrush"]);var a=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:Z2e},a.hasOwnProperty("liftZ")||(a.liftZ=5)},e.prototype.setAreas=function(t){t&&(this.areas=ae(t,function(i){return Z3(this.option,i)},this))},e.prototype.setBrushOption=function(t){this.brushOption=Z3(this.option,t),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},e}(Qe);function Z3(r,e){return He({brushType:r.brushType,brushMode:r.brushMode,transformable:r.transformable,brushStyle:new ft(r.brushStyle).getItemStyle(),removeOnClick:r.removeOnClick,z:r.z},e,!0)}var J2e=["rect","polygon","lineX","lineY","keep","clear"],eCe=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,i,n){var a,s,o;i.eachComponent({mainType:"brush"},function(l){a=l.brushType,s=l.brushOption.brushMode||"single",o=o||!!l.areas.length}),this._brushType=a,this._brushMode=s,R(t.get("type",!0),function(l){t.setIconStatus(l,(l==="keep"?s==="multiple":l==="clear"?o:l===a)?"emphasis":"normal")})},e.prototype.updateView=function(t,i,n){this.render(t,i,n)},e.prototype.getIcons=function(){var t=this.model,i=t.get("icon",!0),n={};return R(t.get("type",!0),function(a){i[a]&&(n[a]=i[a])}),n},e.prototype.onclick=function(t,i,n){var a=this._brushType,s=this._brushMode;n==="clear"?(i.dispatchAction({type:"axisAreaSelect",intervals:[]}),i.dispatchAction({type:"brush",command:"clear",areas:[]})):i.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:n==="keep"?a:a===n?!1:n,brushMode:n==="keep"?s==="multiple"?"single":"multiple":s}})},e.getDefaultOption=function(t){var i={show:!0,type:J2e.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:t.getLocaleModel().get(["toolbox","brush","title"])};return i},e}(Gn);function tCe(r){r.registerComponentView(K2e),r.registerComponentModel(Q2e),r.registerPreprocessor(V2e),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,W2e),r.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(i){i.setAreas(e.areas)})}),r.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},tr),r.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},tr),gh("brush",eCe)}var rCe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode={type:"box",ignoreSize:!0},t}return e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left: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}(Qe),iCe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,n){if(this.group.removeAll(),!!t.get("show")){var a=this.group,s=t.getModel("textStyle"),o=t.getModel("subtextStyle"),l=t.get("textAlign"),u=Fe(t.get("textBaseline"),t.get("textVerticalAlign")),c=new nt({style:Mt(s,{text:t.get("text"),fill:s.getTextColor()},{disableBox:!0}),z2:10}),h=c.getBoundingRect(),d=t.get("subtext"),f=new nt({style:Mt(o,{text:d,fill:o.getTextColor(),y:h.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),p=t.get("link"),v=t.get("sublink"),g=t.get("triggerEvent",!0);c.silent=!p&&!g,f.silent=!v&&!g,p&&c.on("click",function(){t_(p,"_"+t.get("target"))}),v&&f.on("click",function(){t_(v,"_"+t.get("subtarget"))}),ke(c).eventData=ke(f).eventData=g?{componentType:"title",componentIndex:t.componentIndex}:null,a.add(c),d&&a.add(f);var m=a.getBoundingRect(),y=t.getBoxLayoutParams();y.width=m.width,y.height=m.height;var _=br(y,{width:n.getWidth(),height:n.getHeight()},t.get("padding"));l||(l=t.get("left")||t.get("right"),l==="middle"&&(l="center"),l==="right"?_.x+=_.width:l==="center"&&(_.x+=_.width/2)),u||(u=t.get("top")||t.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?_.y+=_.height:u==="middle"&&(_.y+=_.height/2),u=u||"top"),a.x=_.x,a.y=_.y,a.markRedraw();var b={align:l,verticalAlign:u};c.setStyle(b),f.setStyle(b),m=a.getBoundingRect();var T=_.margin,x=t.getItemStyle(["color","opacity"]);x.fill=t.get("backgroundColor");var C=new at({shape:{x:m.x-T[3],y:m.y-T[0],width:m.width+T[1]+T[3],height:m.height+T[0]+T[2],r:t.get("borderRadius")},style:x,subPixelOptimize:!0,silent:!0});a.add(C)}},e.type="title",e}(Nt);function nCe(r){r.registerComponentModel(rCe),r.registerComponentView(iCe)}var Q3=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode="box",t}return e.prototype.init=function(t,i,n){this.mergeDefaultAndTheme(t,n),this._initData()},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(t){t==null&&(t=this.option.currentIndex);var i=this._data.count();this.option.loop?t=(t%i+i)%i:(t>=i&&(t=i-1),t<0&&(t=0)),this.option.currentIndex=t},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(t){this.option.autoPlay=!!t},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var t=this.option,i=t.data||[],n=t.axisType,a=this._names=[],s;n==="category"?(s=[],R(i,function(u,c){var h=Cr(Ff(u),""),d;Ae(u)?(d=Ee(u),d.value=c):d=c,s.push(d),a.push(h)})):s=i;var o={category:"ordinal",time:"time",value:"number"}[n]||"number",l=this._data=new hi([{name:"value",type:o}],this);l.initData(s,a)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},e}(Qe),AX=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline.slider",e.defaultOption=ml(Q3.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),e}(Q3);ir(AX,H1.prototype);var aCe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline",e}(Nt),sCe=function(r){j(e,r);function e(t,i,n,a){var s=r.call(this,t,i,n)||this;return s.type=a||"value",s}return e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},e}(aa),Cx=Math.PI,J3=lt(),oCe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,i){this.api=i},e.prototype.render=function(t,i,n){if(this.model=t,this.api=n,this.ecModel=i,this.group.removeAll(),t.get("show",!0)){var a=this._layout(t,n),s=this._createGroup("_mainGroup"),o=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(a,t);t.formatTooltip=function(u){var c=l.scale.getLabel({value:u});return Fr("nameValue",{noName:!0,value:c})},R(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](a,s,l,t)},this),this._renderAxisLabel(a,o,l,t),this._position(a,t)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(t,i){var n=t.get(["label","position"]),a=t.get("orient"),s=uCe(t,i),o;n==null||n==="auto"?o=a==="horizontal"?s.y+s.height/2<i.getHeight()/2?"-":"+":s.x+s.width/2<i.getWidth()/2?"+":"-":de(n)?o={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[a][n]:o=n;var l={horizontal:"center",vertical:o>=0||o==="+"?"left":"right"},u={horizontal:o>=0||o==="+"?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:Cx/2},h=a==="vertical"?s.height:s.width,d=t.getModel("controlStyle"),f=d.get("show",!0),p=f?d.get("itemSize"):0,v=f?d.get("itemGap"):0,g=p+v,m=t.get(["label","rotate"])||0;m=m*Cx/180;var y,_,b,T=d.get("position",!0),x=f&&d.get("showPlayBtn",!0),C=f&&d.get("showPrevBtn",!0),D=f&&d.get("showNextBtn",!0),I=0,M=h;T==="left"||T==="bottom"?(x&&(y=[0,0],I+=g),C&&(_=[I,0],I+=g),D&&(b=[M-p,0],M-=g)):(x&&(y=[M-p,0],M-=g),C&&(_=[0,0],I+=g),D&&(b=[M-p,0],M-=g));var L=[I,M];return t.get("inverse")&&L.reverse(),{viewRect:s,mainLength:h,orient:a,rotation:c[a],labelRotation:m,labelPosOpt:o,labelAlign:t.get(["label","align"])||l[a],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||u[a],playPosition:y,prevBtnPosition:_,nextBtnPosition:b,axisExtent:L,controlSize:p,controlGap:v}},e.prototype._position=function(t,i){var n=this._mainGroup,a=this._labelGroup,s=t.viewRect;if(t.orient==="vertical"){var o=Ji(),l=s.x,u=s.y+s.height;Da(o,o,[-l,-u]),vl(o,o,-Cx/2),Da(o,o,[l,u]),s=s.clone(),s.applyTransform(o)}var c=y(s),h=y(n.getBoundingRect()),d=y(a.getBoundingRect()),f=[n.x,n.y],p=[a.x,a.y];p[0]=f[0]=c[0][0];var v=t.labelPosOpt;if(v==null||de(v)){var g=v==="+"?0:1;_(f,h,c,1,g),_(p,d,c,1,1-g)}else{var g=v>=0?0:1;_(f,h,c,1,g),p[1]=f[1]+v}n.setPosition(f),a.setPosition(p),n.rotation=a.rotation=t.rotation,m(n),m(a);function m(b){b.originX=c[0][0]-b.x,b.originY=c[1][0]-b.y}function y(b){return[[b.x,b.x+b.width],[b.y,b.y+b.height]]}function _(b,T,x,C,D){b[C]+=x[C][D]-T[C][D]}},e.prototype._createAxis=function(t,i){var n=i.getData(),a=i.get("axisType"),s=lCe(i,a);s.getTicks=function(){return n.mapArray(["value"],function(u){return{value:u}})};var o=n.getDataExtent("value");s.setExtent(o[0],o[1]),s.calcNiceTicks();var l=new sCe("value",s,t.axisExtent,a);return l.model=i,l},e.prototype._createGroup=function(t){var i=this[t]=new Le;return this.group.add(i),i},e.prototype._renderAxisLine=function(t,i,n,a){var s=n.getExtent();if(a.get(["lineStyle","show"])){var o=new Ar({shape:{x1:s[0],y1:0,x2:s[1],y2:0},style:Q({lineCap:"round"},a.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});i.add(o);var l=this._progressLine=new Ar({shape:{x1:s[0],x2:this._currentPointer?this._currentPointer.x:s[0],y1:0,y2:0},style:Ce({lineCap:"round",lineWidth:o.style.lineWidth},a.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});i.add(l)}},e.prototype._renderAxisTick=function(t,i,n,a){var s=this,o=a.getData(),l=n.scale.getTicks();this._tickSymbols=[],R(l,function(u){var c=n.dataToCoord(u.value),h=o.getItemModel(u.value),d=h.getModel("itemStyle"),f=h.getModel(["emphasis","itemStyle"]),p=h.getModel(["progress","itemStyle"]),v={x:c,y:0,onclick:ge(s._changeTimeline,s,u.value)},g=e5(h,d,i,v);g.ensureState("emphasis").style=f.getItemStyle(),g.ensureState("progress").style=p.getItemStyle(),Ko(g);var m=ke(g);h.get("tooltip")?(m.dataIndex=u.value,m.dataModel=a):m.dataIndex=m.dataModel=null,s._tickSymbols.push(g)})},e.prototype._renderAxisLabel=function(t,i,n,a){var s=this,o=n.getLabelModel();if(o.get("show")){var l=a.getData(),u=n.getViewLabels();this._tickLabels=[],R(u,function(c){var h=c.tickValue,d=l.getItemModel(h),f=d.getModel("label"),p=d.getModel(["emphasis","label"]),v=d.getModel(["progress","label"]),g=n.dataToCoord(c.tickValue),m=new nt({x:g,y:0,rotation:t.labelRotation-t.rotation,onclick:ge(s._changeTimeline,s,h),silent:!1,style:Mt(f,{text:c.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});m.ensureState("emphasis").style=Mt(p),m.ensureState("progress").style=Mt(v),i.add(m),Ko(m),J3(m).dataIndex=h,s._tickLabels.push(m)})}},e.prototype._renderControl=function(t,i,n,a){var s=t.controlSize,o=t.rotation,l=a.getModel("controlStyle").getItemStyle(),u=a.getModel(["emphasis","controlStyle"]).getItemStyle(),c=a.getPlayState(),h=a.get("inverse",!0);d(t.nextBtnPosition,"next",ge(this._changeTimeline,this,h?"-":"+")),d(t.prevBtnPosition,"prev",ge(this._changeTimeline,this,h?"+":"-")),d(t.playPosition,c?"stop":"play",ge(this._handlePlayClick,this,!c),!0);function d(f,p,v,g){if(f){var m=Ea(Fe(a.get(["controlStyle",p+"BtnSize"]),s),s),y=[0,-m/2,m,m],_=cCe(a,p+"Icon",y,{x:f[0],y:f[1],originX:s/2,originY:0,rotation:g?-o:0,rectHover:!0,style:l,onclick:v});_.ensureState("emphasis").style=u,i.add(_),Ko(_)}}},e.prototype._renderCurrentPointer=function(t,i,n,a){var s=a.getData(),o=a.getCurrentIndex(),l=s.getItemModel(o).getModel("checkpointStyle"),u=this,c={onCreate:function(h){h.draggable=!0,h.drift=ge(u._handlePointerDrag,u),h.ondragend=ge(u._handlePointerDragend,u),t5(h,u._progressLine,o,n,a,!0)},onUpdate:function(h){t5(h,u._progressLine,o,n,a)}};this._currentPointer=e5(l,l,this._mainGroup,{},this._currentPointer,c)},e.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},e.prototype._handlePointerDrag=function(t,i,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,i){var n=this._toAxisCoord(t)[0],a=this._axis,s=mn(a.getExtent().slice());n>s[1]&&(n=s[1]),n<s[0]&&(n=s[0]),this._currentPointer.x=n,this._currentPointer.markRedraw();var o=this._progressLine;o&&(o.shape.x2=n,o.dirty());var l=this._findNearestTick(n),u=this.model;(i||l!==u.getCurrentIndex()&&u.get("realtime"))&&this._changeTimeline(l)},e.prototype._doPlayStop=function(){var t=this;this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(function(){var i=t.model;t._changeTimeline(i.getCurrentIndex()+(i.get("rewind",!0)?-1:1))},this.model.get("playInterval")))},e.prototype._toAxisCoord=function(t){var i=this._mainGroup.getLocalTransform();return Ca(t,i,!0)},e.prototype._findNearestTick=function(t){var i=this.model.getData(),n=1/0,a,s=this._axis;return i.each(["value"],function(o,l){var u=s.dataToCoord(o),c=Math.abs(u-t);c<n&&(n=c,a=l)}),a},e.prototype._clearTimer=function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},e.prototype._changeTimeline=function(t){var i=this.model.getCurrentIndex();t==="+"?t=i+1:t==="-"&&(t=i-1),this.api.dispatchAction({type:"timelineChange",currentIndex:t,from:this.uid})},e.prototype._updateTicksStatus=function(){var t=this.model.getCurrentIndex(),i=this._tickSymbols,n=this._tickLabels;if(i)for(var a=0;a<i.length;a++)i&&i[a]&&i[a].toggleState("progress",a<t);if(n)for(var a=0;a<n.length;a++)n&&n[a]&&n[a].toggleState("progress",J3(n[a]).dataIndex<=t)},e.type="timeline.slider",e}(aCe);function lCe(r,e){if(e=e||r.get("type"),e)switch(e){case"category":return new Z1({ordinalMeta:r.getCategories(),extent:[1/0,-1/0]});case"time":return new SE({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new io}}function uCe(r,e){return br(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},r.get("padding"))}function cCe(r,e,t,i){var n=i.style,a=$f(r.get(["controlStyle",e]),i||{},new We(t[0],t[1],t[2],t[3]));return n&&a.setStyle(n),a}function e5(r,e,t,i,n,a){var s=e.get("color");if(n)n.setColor(s),t.add(n),a&&a.onUpdate(n);else{var o=r.get("symbol");n=cr(o,-1,-1,2,2,s),n.setStyle("strokeNoScale",!0),t.add(n),a&&a.onCreate(n)}var l=e.getItemStyle(["color"]);n.setStyle(l),i=He({rectHover:!0,z2:100},i,!0);var u=Jf(r.get("symbolSize"));i.scaleX=u[0]/2,i.scaleY=u[1]/2;var c=_c(r.get("symbolOffset"),u);c&&(i.x=(i.x||0)+c[0],i.y=(i.y||0)+c[1]);var h=r.get("symbolRotate");return i.rotation=(h||0)*Math.PI/180||0,n.attr(i),n.updateTransform(),n}function t5(r,e,t,i,n,a){if(!r.dragging){var s=n.getModel("checkpointStyle"),o=i.dataToCoord(n.getData().get("value",t));if(a||!s.get("animation",!0))r.attr({x:o,y:0}),e&&e.attr({shape:{x2:o}});else{var l={duration:s.get("animationDuration",!0),easing:s.get("animationEasing",!0)};r.stopAnimation(null,!0),r.animateTo({x:o,y:0},l),e&&e.animateTo({shape:{x2:o}},l)}}}function hCe(r){r.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(e,t,i){var n=t.getComponent("timeline");return n&&e.currentIndex!=null&&(n.setCurrentIndex(e.currentIndex),!n.get("loop",!0)&&n.isIndexMax()&&n.getPlayState()&&(n.setPlayState(!1),i.dispatchAction({type:"timelinePlayChange",playState:!1,from:e.from}))),t.resetOption("timeline",{replaceMerge:n.get("replaceMerge",!0)}),Ce({currentIndex:n.option.currentIndex},e)}),r.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(e,t){var i=t.getComponent("timeline");i&&e.playState!=null&&i.setPlayState(e.playState)})}function fCe(r){var e=r&&r.timeline;ie(e)||(e=e?[e]:[]),R(e,function(t){t&&dCe(t)})}function dCe(r){var e=r.type,t={number:"value",time:"time"};if(t[e]&&(r.axisType=t[e],delete r.type),r5(r),yu(r,"controlPosition")){var i=r.controlStyle||(r.controlStyle={});yu(i,"position")||(i.position=r.controlPosition),i.position==="none"&&!yu(i,"show")&&(i.show=!1,delete i.position),delete r.controlPosition}R(r.data||[],function(n){Ae(n)&&!ie(n)&&(!yu(n,"value")&&yu(n,"name")&&(n.value=n.name),r5(n))})}function r5(r){var e=r.itemStyle||(r.itemStyle={}),t=e.emphasis||(e.emphasis={}),i=r.label||r.label||{},n=i.normal||(i.normal={}),a={normal:1,emphasis:1};R(i,function(s,o){!a[o]&&!yu(n,o)&&(n[o]=s)}),t.label&&!yu(i,"emphasis")&&(i.emphasis=t.label,delete t.label)}function yu(r,e){return r.hasOwnProperty(e)}function pCe(r){r.registerComponentModel(AX),r.registerComponentView(oCe),r.registerSubTypeDefaulter("timeline",function(){return"slider"}),hCe(r),r.registerPreprocessor(fCe)}function xI(r,e){if(!r)return!1;for(var t=ie(r)?r:[r],i=0;i<t.length;i++)if(t[i]&&t[i][e])return!0;return!1}function vy(r){ac(r,"label",["show"])}var gy=lt(),ao=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.createdBySelf=!1,t}return e.prototype.init=function(t,i,n){this.mergeDefaultAndTheme(t,n),this._mergeOption(t,n,!1,!0)},e.prototype.isAnimationEnabled=function(){if(et.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},e.prototype.mergeOption=function(t,i){this._mergeOption(t,i,!1,!1)},e.prototype._mergeOption=function(t,i,n,a){var s=this.mainType;n||i.eachSeries(function(o){var l=o.get(this.mainType,!0),u=gy(o)[s];if(!l||!l.data){gy(o)[s]=null;return}u?u._mergeOption(l,i,!0):(a&&vy(l),R(l.data,function(c){c instanceof Array?(vy(c[0]),vy(c[1])):vy(c)}),u=this.createMarkerModelFromSeries(l,this,i),Q(u,{mainType:this.mainType,seriesIndex:o.seriesIndex,name:o.name,createdBySelf:!0}),u.__hostSeries=o),gy(o)[s]=u},this)},e.prototype.formatTooltip=function(t,i,n){var a=this.getData(),s=this.getRawValue(t),o=a.getName(t);return Fr("section",{header:this.name,blocks:[Fr("nameValue",{name:o,value:s,noName:!o,noValue:s==null})]})},e.prototype.getData=function(){return this._data},e.prototype.setData=function(t){this._data=t},e.prototype.getDataParams=function(t,i){var n=H1.prototype.getDataParams.call(this,t,i),a=this.__hostSeries;return a&&(n.seriesId=a.id,n.seriesName=a.name,n.seriesType=a.subType),n},e.getMarkerModelFromSeries=function(t,i){return gy(t)[i]},e.type="marker",e.dependencies=["series","grid","polar","geo"],e}(Qe);ir(ao,H1.prototype);var vCe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,i,n){return new e(t,i,n)},e.type="markPoint",e.defaultOption={z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},e}(ao);function xC(r){return!(isNaN(parseFloat(r.x))&&isNaN(parseFloat(r.y)))}function gCe(r){return!isNaN(parseFloat(r.x))&&!isNaN(parseFloat(r.y))}function my(r,e,t,i,n,a){var s=[],o=ro(e,i),l=o?e.getCalculationInfo("stackResultDimension"):i,u=wI(e,l,r),c=e.indicesOfNearest(l,u)[0];s[n]=e.get(t,c),s[a]=e.get(l,c);var h=e.get(i,c),d=ma(e.get(i,c));return d=Math.min(d,20),d>=0&&(s[a]=+s[a].toFixed(d)),[s,h]}var Ax={min:Be(my,"min"),max:Be(my,"max"),average:Be(my,"average"),median:Be(my,"median")};function Zv(r,e){if(e){var t=r.getData(),i=r.coordinateSystem,n=i&&i.dimensions;if(!gCe(e)&&!ie(e.coord)&&ie(n)){var a=DX(e,t,i,r);if(e=Ee(e),e.type&&Ax[e.type]&&a.baseAxis&&a.valueAxis){var s=Xe(n,a.baseAxis.dim),o=Xe(n,a.valueAxis.dim),l=Ax[e.type](t,a.baseDataDim,a.valueDataDim,s,o);e.coord=l[0],e.value=l[1]}else e.coord=[e.xAxis!=null?e.xAxis:e.radiusAxis,e.yAxis!=null?e.yAxis:e.angleAxis]}if(e.coord==null||!ie(n))e.coord=[];else for(var u=e.coord,c=0;c<2;c++)Ax[u[c]]&&(u[c]=wI(t,t.mapDimension(n[c]),u[c]));return e}}function DX(r,e,t,i){var n={};return r.valueIndex!=null||r.valueDim!=null?(n.valueDataDim=r.valueIndex!=null?e.getDimension(r.valueIndex):r.valueDim,n.valueAxis=t.getAxis(mCe(i,n.valueDataDim)),n.baseAxis=t.getOtherAxis(n.valueAxis),n.baseDataDim=e.mapDimension(n.baseAxis.dim)):(n.baseAxis=i.getBaseAxis(),n.valueAxis=t.getOtherAxis(n.baseAxis),n.baseDataDim=e.mapDimension(n.baseAxis.dim),n.valueDataDim=e.mapDimension(n.valueAxis.dim)),n}function mCe(r,e){var t=r.getData().getDimensionInfo(e);return t&&t.coordDim}function Qv(r,e){return r&&r.containData&&e.coord&&!xC(e)?r.containData(e.coord):!0}function yCe(r,e,t){return r&&r.containZone&&e.coord&&t.coord&&!xC(e)&&!xC(t)?r.containZone(e.coord,t.coord):!0}function EX(r,e){return r?function(t,i,n,a){var s=a<2?t.coord&&t.coord[a]:t.value;return Jo(s,e[a])}:function(t,i,n,a){return Jo(t.value,e[a])}}function wI(r,e,t){if(t==="average"){var i=0,n=0;return r.each(e,function(a,s){isNaN(a)||(i+=a,n++)}),i/n}else return t==="median"?r.getMedian(e):r.getDataExtent(e)[t==="max"?1:0]}var Dx=lt(),CI=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this.markerGroupMap=be()},e.prototype.render=function(t,i,n){var a=this,s=this.markerGroupMap;s.each(function(o){Dx(o).keep=!1}),i.eachSeries(function(o){var l=ao.getMarkerModelFromSeries(o,a.type);l&&a.renderSeries(o,l,i,n)}),s.each(function(o){!Dx(o).keep&&a.group.remove(o.group)})},e.prototype.markKeep=function(t){Dx(t).keep=!0},e.prototype.toggleBlurSeries=function(t,i){var n=this;R(t,function(a){var s=ao.getMarkerModelFromSeries(a,n.type);if(s){var o=s.getData();o.eachItemGraphicEl(function(l){l&&(i?bH(l):LD(l))})}})},e.type="marker",e}(Nt);function i5(r,e,t){var i=e.coordinateSystem;r.each(function(n){var a=r.getItemModel(n),s,o=ce(a.get("x"),t.getWidth()),l=ce(a.get("y"),t.getHeight());if(!isNaN(o)&&!isNaN(l))s=[o,l];else if(e.getMarkerPosition)s=e.getMarkerPosition(r.getValues(r.dimensions,n));else if(i){var u=r.get(i.dimensions[0],n),c=r.get(i.dimensions[1],n);s=i.dataToPoint([u,c])}isNaN(o)||(s[0]=o),isNaN(l)||(s[1]=l),r.setItemLayout(n,s)})}var _Ce=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,i,n){i.eachSeries(function(a){var s=ao.getMarkerModelFromSeries(a,"markPoint");s&&(i5(s.getData(),a,n),this.markerGroupMap.get(a.id).updateLayout())},this)},e.prototype.renderSeries=function(t,i,n,a){var s=t.coordinateSystem,o=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(o)||u.set(o,new Eg),h=bCe(s,t,i);i.setData(h),i5(i.getData(),t,a),h.each(function(d){var f=h.getItemModel(d),p=f.getShallow("symbol"),v=f.getShallow("symbolSize"),g=f.getShallow("symbolRotate"),m=f.getShallow("symbolOffset"),y=f.getShallow("symbolKeepAspect");if(xe(p)||xe(v)||xe(g)||xe(m)){var _=i.getRawValue(d),b=i.getDataParams(d);xe(p)&&(p=p(_,b)),xe(v)&&(v=v(_,b)),xe(g)&&(g=g(_,b)),xe(m)&&(m=m(_,b))}var T=f.getModel("itemStyle").getItemStyle(),x=Cg(l,"color");T.fill||(T.fill=x),h.setItemVisual(d,{symbol:p,symbolSize:v,symbolRotate:g,symbolOffset:m,symbolKeepAspect:y,style:T})}),c.updateData(h),this.group.add(c.group),h.eachItemGraphicEl(function(d){d.traverse(function(f){ke(f).dataModel=i})}),this.markKeep(c),c.group.silent=i.get("silent")||t.get("silent")},e.type="markPoint",e}(CI);function bCe(r,e,t){var i;r?i=ae(r&&r.dimensions,function(o){var l=e.getData().getDimensionInfo(e.getData().mapDimension(o))||{};return Q(Q({},l),{name:o,ordinalMeta:null})}):i=[{name:"value",type:"float"}];var n=new hi(i,t),a=ae(t.get("data"),Be(Zv,e));r&&(a=_t(a,Be(Qv,r)));var s=EX(!!r,i);return n.initData(a,null,s),n}function SCe(r){r.registerComponentModel(vCe),r.registerComponentView(_Ce),r.registerPreprocessor(function(e){xI(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var TCe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,i,n){return new e(t,i,n)},e.type="markLine",e.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e}(ao),yy=lt(),xCe=function(r,e,t,i){var n=r.getData(),a;if(ie(i))a=i;else{var s=i.type;if(s==="min"||s==="max"||s==="average"||s==="median"||i.xAxis!=null||i.yAxis!=null){var o=void 0,l=void 0;if(i.yAxis!=null||i.xAxis!=null)o=e.getAxis(i.yAxis!=null?"y":"x"),l=Rr(i.yAxis,i.xAxis);else{var u=DX(i,n,e,r);o=u.valueAxis;var c=yE(n,u.valueDataDim);l=wI(n,c,s)}var h=o.dim==="x"?0:1,d=1-h,f=Ee(i),p={coord:[]};f.type=null,f.coord=[],f.coord[d]=-1/0,p.coord[d]=1/0;var v=t.get("precision");v>=0&&ut(l)&&(l=+l.toFixed(Math.min(v,20))),f.coord[h]=p.coord[h]=l,a=[f,p,{type:s,valueIndex:i.valueIndex,value:l}]}else a=[]}var g=[Zv(r,a[0]),Zv(r,a[1]),Q({},a[2])];return g[2].type=g[2].type||null,He(g[2],g[0]),He(g[2],g[1]),g};function E_(r){return!isNaN(r)&&!isFinite(r)}function n5(r,e,t,i){var n=1-r,a=i.dimensions[r];return E_(e[n])&&E_(t[n])&&e[r]===t[r]&&i.getAxis(a).containData(e[r])}function wCe(r,e){if(r.type==="cartesian2d"){var t=e[0].coord,i=e[1].coord;if(t&&i&&(n5(1,t,i,r)||n5(0,t,i,r)))return!0}return Qv(r,e[0])&&Qv(r,e[1])}function Ex(r,e,t,i,n){var a=i.coordinateSystem,s=r.getItemModel(e),o,l=ce(s.get("x"),n.getWidth()),u=ce(s.get("y"),n.getHeight());if(!isNaN(l)&&!isNaN(u))o=[l,u];else{if(i.getMarkerPosition)o=i.getMarkerPosition(r.getValues(r.dimensions,e));else{var c=a.dimensions,h=r.get(c[0],e),d=r.get(c[1],e);o=a.dataToPoint([h,d])}if(bc(a,"cartesian2d")){var f=a.getAxis("x"),p=a.getAxis("y"),c=a.dimensions;E_(r.get(c[0],e))?o[0]=f.toGlobalCoord(f.getExtent()[t?0:1]):E_(r.get(c[1],e))&&(o[1]=p.toGlobalCoord(p.getExtent()[t?0:1]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}r.setItemLayout(e,o)}var CCe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,i,n){i.eachSeries(function(a){var s=ao.getMarkerModelFromSeries(a,"markLine");if(s){var o=s.getData(),l=yy(s).from,u=yy(s).to;l.each(function(c){Ex(l,c,!0,a,n),Ex(u,c,!1,a,n)}),o.each(function(c){o.setItemLayout(c,[l.getItemLayout(c),u.getItemLayout(c)])}),this.markerGroupMap.get(a.id).updateLayout()}},this)},e.prototype.renderSeries=function(t,i,n,a){var s=t.coordinateSystem,o=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(o)||u.set(o,new XE);this.group.add(c.group);var h=ACe(s,t,i),d=h.from,f=h.to,p=h.line;yy(i).from=d,yy(i).to=f,i.setData(p);var v=i.get("symbol"),g=i.get("symbolSize"),m=i.get("symbolRotate"),y=i.get("symbolOffset");ie(v)||(v=[v,v]),ie(g)||(g=[g,g]),ie(m)||(m=[m,m]),ie(y)||(y=[y,y]),h.from.each(function(b){_(d,b,!0),_(f,b,!1)}),p.each(function(b){var T=p.getItemModel(b).getModel("lineStyle").getLineStyle();p.setItemLayout(b,[d.getItemLayout(b),f.getItemLayout(b)]),T.stroke==null&&(T.stroke=d.getItemVisual(b,"style").fill),p.setItemVisual(b,{fromSymbolKeepAspect:d.getItemVisual(b,"symbolKeepAspect"),fromSymbolOffset:d.getItemVisual(b,"symbolOffset"),fromSymbolRotate:d.getItemVisual(b,"symbolRotate"),fromSymbolSize:d.getItemVisual(b,"symbolSize"),fromSymbol:d.getItemVisual(b,"symbol"),toSymbolKeepAspect:f.getItemVisual(b,"symbolKeepAspect"),toSymbolOffset:f.getItemVisual(b,"symbolOffset"),toSymbolRotate:f.getItemVisual(b,"symbolRotate"),toSymbolSize:f.getItemVisual(b,"symbolSize"),toSymbol:f.getItemVisual(b,"symbol"),style:T})}),c.updateData(p),h.line.eachItemGraphicEl(function(b){ke(b).dataModel=i,b.traverse(function(T){ke(T).dataModel=i})});function _(b,T,x){var C=b.getItemModel(T);Ex(b,T,x,t,a);var D=C.getModel("itemStyle").getItemStyle();D.fill==null&&(D.fill=Cg(l,"color")),b.setItemVisual(T,{symbolKeepAspect:C.get("symbolKeepAspect"),symbolOffset:Fe(C.get("symbolOffset",!0),y[x?0:1]),symbolRotate:Fe(C.get("symbolRotate",!0),m[x?0:1]),symbolSize:Fe(C.get("symbolSize"),g[x?0:1]),symbol:Fe(C.get("symbol",!0),v[x?0:1]),style:D})}this.markKeep(c),c.group.silent=i.get("silent")||t.get("silent")},e.type="markLine",e}(CI);function ACe(r,e,t){var i;r?i=ae(r&&r.dimensions,function(u){var c=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return Q(Q({},c),{name:u,ordinalMeta:null})}):i=[{name:"value",type:"float"}];var n=new hi(i,t),a=new hi(i,t),s=new hi([],t),o=ae(t.get("data"),Be(xCe,e,r,t));r&&(o=_t(o,Be(wCe,r)));var l=EX(!!r,i);return n.initData(ae(o,function(u){return u[0]}),null,l),a.initData(ae(o,function(u){return u[1]}),null,l),s.initData(ae(o,function(u){return u[2]})),s.hasItemOption=!0,{from:n,to:a,line:s}}function DCe(r){r.registerComponentModel(TCe),r.registerComponentView(CCe),r.registerPreprocessor(function(e){xI(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var ECe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,i,n){return new e(t,i,n)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(ao),_y=lt(),ICe=function(r,e,t,i){var n=i[0],a=i[1];if(!(!n||!a)){var s=Zv(r,n),o=Zv(r,a),l=s.coord,u=o.coord;l[0]=Rr(l[0],-1/0),l[1]=Rr(l[1],-1/0),u[0]=Rr(u[0],1/0),u[1]=Rr(u[1],1/0);var c=y1([{},s,o]);return c.coord=[s.coord,o.coord],c.x0=s.x,c.y0=s.y,c.x1=o.x,c.y1=o.y,c}};function I_(r){return!isNaN(r)&&!isFinite(r)}function a5(r,e,t,i){var n=1-r;return I_(e[n])&&I_(t[n])}function PCe(r,e){var t=e.coord[0],i=e.coord[1],n={coord:t,x:e.x0,y:e.y0},a={coord:i,x:e.x1,y:e.y1};return bc(r,"cartesian2d")?t&&i&&(a5(1,t,i)||a5(0,t,i))?!0:yCe(r,n,a):Qv(r,n)||Qv(r,a)}function s5(r,e,t,i,n){var a=i.coordinateSystem,s=r.getItemModel(e),o,l=ce(s.get(t[0]),n.getWidth()),u=ce(s.get(t[1]),n.getHeight());if(!isNaN(l)&&!isNaN(u))o=[l,u];else{if(i.getMarkerPosition){var c=r.getValues(["x0","y0"],e),h=r.getValues(["x1","y1"],e),d=a.clampData(c),f=a.clampData(h),p=[];t[0]==="x0"?p[0]=d[0]>f[0]?h[0]:c[0]:p[0]=d[0]>f[0]?c[0]:h[0],t[1]==="y0"?p[1]=d[1]>f[1]?h[1]:c[1]:p[1]=d[1]>f[1]?c[1]:h[1],o=i.getMarkerPosition(p,t,!0)}else{var v=r.get(t[0],e),g=r.get(t[1],e),m=[v,g];a.clampData&&a.clampData(m,m),o=a.dataToPoint(m,!0)}if(bc(a,"cartesian2d")){var y=a.getAxis("x"),_=a.getAxis("y"),v=r.get(t[0],e),g=r.get(t[1],e);I_(v)?o[0]=y.toGlobalCoord(y.getExtent()[t[0]==="x0"?0:1]):I_(g)&&(o[1]=_.toGlobalCoord(_.getExtent()[t[1]==="y0"?0:1]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}return o}var o5=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],MCe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,i,n){i.eachSeries(function(a){var s=ao.getMarkerModelFromSeries(a,"markArea");if(s){var o=s.getData();o.each(function(l){var u=ae(o5,function(h){return s5(o,l,h,a,n)});o.setItemLayout(l,u);var c=o.getItemGraphicEl(l);c.setShape("points",u)})}},this)},e.prototype.renderSeries=function(t,i,n,a){var s=t.coordinateSystem,o=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(o)||u.set(o,{group:new Le});this.group.add(c.group),this.markKeep(c);var h=LCe(s,t,i);i.setData(h),h.each(function(d){var f=ae(o5,function(D){return s5(h,d,D,t,a)}),p=s.getAxis("x").scale,v=s.getAxis("y").scale,g=p.getExtent(),m=v.getExtent(),y=[p.parse(h.get("x0",d)),p.parse(h.get("x1",d))],_=[v.parse(h.get("y0",d)),v.parse(h.get("y1",d))];mn(y),mn(_);var b=!(g[0]>y[1]||g[1]<y[0]||m[0]>_[1]||m[1]<_[0]),T=!b;h.setItemLayout(d,{points:f,allClipped:T});var x=h.getItemModel(d).getModel("itemStyle").getItemStyle(),C=Cg(l,"color");x.fill||(x.fill=C,de(x.fill)&&(x.fill=Dv(x.fill,.4))),x.stroke||(x.stroke=C),h.setItemVisual(d,"style",x)}),h.diff(_y(c).data).add(function(d){var f=h.getItemLayout(d);if(!f.allClipped){var p=new pi({shape:{points:f.points}});h.setItemGraphicEl(d,p),c.group.add(p)}}).update(function(d,f){var p=_y(c).data.getItemGraphicEl(f),v=h.getItemLayout(d);v.allClipped?p&&c.group.remove(p):(p?ct(p,{shape:{points:v.points}},i,d):p=new pi({shape:{points:v.points}}),h.setItemGraphicEl(d,p),c.group.add(p))}).remove(function(d){var f=_y(c).data.getItemGraphicEl(d);c.group.remove(f)}).execute(),h.eachItemGraphicEl(function(d,f){var p=h.getItemModel(f),v=h.getItemVisual(f,"style");d.useStyle(h.getItemVisual(f,"style")),ti(d,Br(p),{labelFetcher:i,labelDataIndex:f,defaultText:h.getName(f)||"",inheritColor:de(v.fill)?Dv(v.fill,1):"#000"}),ei(d,p),Kt(d,null,null,p.get(["emphasis","disabled"])),ke(d).dataModel=i}),_y(c).data=h,c.group.silent=i.get("silent")||t.get("silent")},e.type="markArea",e}(CI);function LCe(r,e,t){var i,n,a=["x0","y0","x1","y1"];if(r){var s=ae(r&&r.dimensions,function(u){var c=e.getData(),h=c.getDimensionInfo(c.mapDimension(u))||{};return Q(Q({},h),{name:u,ordinalMeta:null})});n=ae(a,function(u,c){return{name:u,type:s[c%2].type}}),i=new hi(n,t)}else n=[{name:"value",type:"float"}],i=new hi(n,t);var o=ae(t.get("data"),Be(ICe,e,r,t));r&&(o=_t(o,Be(PCe,r)));var l=r?function(u,c,h,d){var f=u.coord[Math.floor(d/2)][d%2];return Jo(f,n[d])}:function(u,c,h,d){return Jo(u.value,n[d])};return i.initData(o,null,l),i.hasItemOption=!0,i}function kCe(r){r.registerComponentModel(ECe),r.registerComponentView(MCe),r.registerPreprocessor(function(e){xI(e.series,"markArea")&&(e.markArea=e.markArea||{})})}var RCe=function(r,e){if(e==="all")return{type:"all",title:r.getLocaleModel().get(["legend","selector","all"])};if(e==="inverse")return{type:"inverse",title:r.getLocaleModel().get(["legend","selector","inverse"])}},wC=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode={type:"box",ignoreSize:!0},t}return e.prototype.init=function(t,i,n){this.mergeDefaultAndTheme(t,n),t.selected=t.selected||{},this._updateSelector(t)},e.prototype.mergeOption=function(t,i){r.prototype.mergeOption.call(this,t,i),this._updateSelector(t)},e.prototype._updateSelector=function(t){var i=t.selector,n=this.ecModel;i===!0&&(i=t.selector=["all","inverse"]),ie(i)&&R(i,function(a,s){de(a)&&(a={type:a}),i[s]=He(a,RCe(n,a.type))})},e.prototype.optionUpdated=function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&this.get("selectedMode")==="single"){for(var i=!1,n=0;n<t.length;n++){var a=t[n].get("name");if(this.isSelected(a)){this.select(a),i=!0;break}}!i&&this.select(t[0].get("name"))}},e.prototype._updateData=function(t){var i=[],n=[];t.eachRawSeries(function(l){var u=l.name;n.push(u);var c;if(l.legendVisualProvider){var h=l.legendVisualProvider,d=h.getAllNames();t.isSeriesFiltered(l)||(n=n.concat(d)),d.length?i=i.concat(d):c=!0}else c=!0;c&&wD(l)&&i.push(l.name)}),this._availableNames=n;var a=this.get("data")||i,s=be(),o=ae(a,function(l){return(de(l)||ut(l))&&(l={name:l}),s.get(l.name)?null:(s.set(l.name,!0),new ft(l,this,this.ecModel))},this);this._data=_t(o,function(l){return!!l})},e.prototype.getData=function(){return this._data},e.prototype.select=function(t){var i=this.option.selected,n=this.get("selectedMode");if(n==="single"){var a=this._data;R(a,function(s){i[s.get("name")]=!1})}i[t]=!0},e.prototype.unSelect=function(t){this.get("selectedMode")!=="single"&&(this.option.selected[t]=!1)},e.prototype.toggleSelected=function(t){var i=this.option.selected;i.hasOwnProperty(t)||(i[t]=!0),this[i[t]?"unSelect":"select"](t)},e.prototype.allSelect=function(){var t=this._data,i=this.option.selected;R(t,function(n){i[n.get("name",!0)]=!0})},e.prototype.inverseSelect=function(){var t=this._data,i=this.option.selected;R(t,function(n){var a=n.get("name",!0);i.hasOwnProperty(a)||(i[a]=!0),i[a]=!i[a]})},e.prototype.isSelected=function(t){var i=this.option.selected;return!(i.hasOwnProperty(t)&&!i[t])&&Xe(this._availableNames,t)>=0},e.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},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}(Qe),ah=Be,CC=R,by=Le,IX=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.newlineDisabled=!1,t}return e.prototype.init=function(){this.group.add(this._contentGroup=new by),this.group.add(this._selectorGroup=new by),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(t,i,n){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!t.get("show",!0)){var s=t.get("align"),o=t.get("orient");(!s||s==="auto")&&(s=t.get("left")==="right"&&o==="vertical"?"right":"left");var l=t.get("selector",!0),u=t.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=o==="horizontal"?"end":"start"),this.renderInner(s,t,i,n,l,o,u);var c=t.getBoxLayoutParams(),h={width:n.getWidth(),height:n.getHeight()},d=t.get("padding"),f=br(c,h,d),p=this.layoutInner(t,s,f,a,l,u),v=br(Ce({width:p.width,height:p.height},c),h,d);this.group.x=v.x-p.x,this.group.y=v.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=mX(p,t))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(t,i,n,a,s,o,l){var u=this.getContentGroup(),c=be(),h=i.get("selectedMode"),d=[];n.eachRawSeries(function(f){!f.get("legendHoverLink")&&d.push(f.id)}),CC(i.getData(),function(f,p){var v=f.get("name");if(!this.newlineDisabled&&(v===""||v===`
|
||
`)){var g=new by;g.newline=!0,u.add(g);return}var m=n.getSeriesByName(v)[0];if(!c.get(v))if(m){var y=m.getData(),_=y.getVisual("legendLineStyle")||{},b=y.getVisual("legendIcon"),T=y.getVisual("style"),x=this._createItem(m,v,p,f,i,t,_,T,b,h,a);x.on("click",ah(l5,v,null,a,d)).on("mouseover",ah(AC,m.name,null,a,d)).on("mouseout",ah(DC,m.name,null,a,d)),n.ssr&&x.eachChild(function(C){var D=ke(C);D.seriesIndex=m.seriesIndex,D.dataIndex=p,D.ssrType="legend"}),c.set(v,!0)}else n.eachRawSeries(function(C){if(!c.get(v)&&C.legendVisualProvider){var D=C.legendVisualProvider;if(!D.containName(v))return;var I=D.indexOfName(v),M=D.getItemVisual(I,"style"),L=D.getItemVisual(I,"legendIcon"),N=Li(M.fill);N&&N[3]===0&&(N[3]=.2,M=Q(Q({},M),{fill:wa(N,"rgba")}));var O=this._createItem(C,v,p,f,i,t,{},M,L,h,a);O.on("click",ah(l5,null,v,a,d)).on("mouseover",ah(AC,null,v,a,d)).on("mouseout",ah(DC,null,v,a,d)),n.ssr&&O.eachChild(function(B){var F=ke(B);F.seriesIndex=C.seriesIndex,F.dataIndex=p,F.ssrType="legend"}),c.set(v,!0)}},this)},this),s&&this._createSelector(s,i,a,o,l)},e.prototype._createSelector=function(t,i,n,a,s){var o=this.getSelectorGroup();CC(t,function(u){var c=u.type,h=new nt({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:c==="all"?"legendAllSelect":"legendInverseSelect"})}});o.add(h);var d=i.getModel("selectorLabel"),f=i.getModel(["emphasis","selectorLabel"]);ti(h,{normal:d,emphasis:f},{defaultText:u.title}),Ko(h)})},e.prototype._createItem=function(t,i,n,a,s,o,l,u,c,h,d){var f=t.visualDrawType,p=s.get("itemWidth"),v=s.get("itemHeight"),g=s.isSelected(i),m=a.get("symbolRotate"),y=a.get("symbolKeepAspect"),_=a.get("icon");c=_||c||"roundRect";var b=OCe(c,a,l,u,f,g,d),T=new by,x=a.getModel("textStyle");if(xe(t.getLegendIcon)&&(!_||_==="inherit"))T.add(t.getLegendIcon({itemWidth:p,itemHeight:v,icon:c,iconRotate:m,itemStyle:b.itemStyle,lineStyle:b.lineStyle,symbolKeepAspect:y}));else{var C=_==="inherit"&&t.getData().getVisual("symbol")?m==="inherit"?t.getData().getVisual("symbolRotate"):m:0;T.add(NCe({itemWidth:p,itemHeight:v,icon:c,iconRotate:C,itemStyle:b.itemStyle,lineStyle:b.lineStyle,symbolKeepAspect:y}))}var D=o==="left"?p+5:-5,I=o,M=s.get("formatter"),L=i;de(M)&&M?L=M.replace("{name}",i??""):xe(M)&&(L=M(i));var N=g?x.getTextColor():a.get("inactiveColor");T.add(new nt({style:Mt(x,{text:L,x:D,y:v/2,fill:N,align:I,verticalAlign:"middle"},{inheritColor:N})}));var O=new at({shape:T.getBoundingRect(),style:{fill:"transparent"}}),B=a.getModel("tooltip");return B.get("show")&&Wf({el:O,componentModel:s,itemName:i,itemTooltipOption:B.option}),T.add(O),T.eachChild(function(F){F.silent=!0}),O.silent=!h,this.getContentGroup().add(T),Ko(T),T.__legendDataIndex=n,T},e.prototype.layoutInner=function(t,i,n,a,s,o){var l=this.getContentGroup(),u=this.getSelectorGroup();ju(t.get("orient"),l,t.get("itemGap"),n.width,n.height);var c=l.getBoundingRect(),h=[-c.x,-c.y];if(u.markRedraw(),l.markRedraw(),s){ju("horizontal",u,t.get("selectorItemGap",!0));var d=u.getBoundingRect(),f=[-d.x,-d.y],p=t.get("selectorButtonGap",!0),v=t.getOrient().index,g=v===0?"width":"height",m=v===0?"height":"width",y=v===0?"y":"x";o==="end"?f[v]+=c[g]+p:h[v]+=d[g]+p,f[1-v]+=c[m]/2-d[m]/2,u.x=f[0],u.y=f[1],l.x=h[0],l.y=h[1];var _={x:0,y:0};return _[g]=c[g]+p+d[g],_[m]=Math.max(c[m],d[m]),_[y]=Math.min(0,d[y]+f[1-v]),_}else return l.x=h[0],l.y=h[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(Nt);function OCe(r,e,t,i,n,a,s){function o(g,m){g.lineWidth==="auto"&&(g.lineWidth=m.lineWidth>0?2:0),CC(g,function(y,_){g[_]==="inherit"&&(g[_]=m[_])})}var l=e.getModel("itemStyle"),u=l.getItemStyle(),c=r.lastIndexOf("empty",0)===0?"fill":"stroke",h=l.getShallow("decal");u.decal=!h||h==="inherit"?i.decal:Sf(h,s),u.fill==="inherit"&&(u.fill=i[n]),u.stroke==="inherit"&&(u.stroke=i[c]),u.opacity==="inherit"&&(u.opacity=(n==="fill"?i:t).opacity),o(u,i);var d=e.getModel("lineStyle"),f=d.getLineStyle();if(o(f,t),u.fill==="auto"&&(u.fill=i.fill),u.stroke==="auto"&&(u.stroke=i.fill),f.stroke==="auto"&&(f.stroke=i.fill),!a){var p=e.get("inactiveBorderWidth"),v=u[c];u.lineWidth=p==="auto"?i.lineWidth>0&&v?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),f.stroke=d.get("inactiveColor"),f.lineWidth=d.get("inactiveWidth")}return{itemStyle:u,lineStyle:f}}function NCe(r){var e=r.icon||"roundRect",t=cr(e,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill,r.symbolKeepAspect);return t.setStyle(r.itemStyle),t.rotation=(r.iconRotate||0)*Math.PI/180,t.setOrigin([r.itemWidth/2,r.itemHeight/2]),e.indexOf("empty")>-1&&(t.style.stroke=t.style.fill,t.style.fill="#fff",t.style.lineWidth=2),t}function l5(r,e,t,i){DC(r,e,t,i),t.dispatchAction({type:"legendToggleSelect",name:r??e}),AC(r,e,t,i)}function PX(r){for(var e=r.getZr().storage.getDisplayList(),t,i=0,n=e.length;i<n&&!(t=e[i].states.emphasis);)i++;return t&&t.hoverLayer}function AC(r,e,t,i){PX(t)||t.dispatchAction({type:"highlight",seriesName:r,name:e,excludeSeriesId:i})}function DC(r,e,t,i){PX(t)||t.dispatchAction({type:"downplay",seriesName:r,name:e,excludeSeriesId:i})}function BCe(r){var e=r.findComponents({mainType:"legend"});e&&e.length&&r.filterSeries(function(t){for(var i=0;i<e.length;i++)if(!e[i].isSelected(t.name))return!1;return!0})}function Jd(r,e,t){var i={},n=r==="toggleSelected",a;return t.eachComponent("legend",function(s){n&&a!=null?s[a?"select":"unSelect"](e.name):r==="allSelect"||r==="inverseSelect"?s[r]():(s[r](e.name),a=s.isSelected(e.name));var o=s.getData();R(o,function(l){var u=l.get("name");if(!(u===`
|
||
`||u==="")){var c=s.isSelected(u);i.hasOwnProperty(u)?i[u]=i[u]&&c:i[u]=c}})}),r==="allSelect"||r==="inverseSelect"?{selected:i}:{name:e.name,selected:i}}function FCe(r){r.registerAction("legendToggleSelect","legendselectchanged",Be(Jd,"toggleSelected")),r.registerAction("legendAllSelect","legendselectall",Be(Jd,"allSelect")),r.registerAction("legendInverseSelect","legendinverseselect",Be(Jd,"inverseSelect")),r.registerAction("legendSelect","legendselected",Be(Jd,"select")),r.registerAction("legendUnSelect","legendunselected",Be(Jd,"unSelect"))}function MX(r){r.registerComponentModel(wC),r.registerComponentView(IX),r.registerProcessor(r.PRIORITY.PROCESSOR.SERIES_FILTER,BCe),r.registerSubTypeDefaulter("legend",function(){return"plain"}),FCe(r)}var UCe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.setScrollDataIndex=function(t){this.option.scrollDataIndex=t},e.prototype.init=function(t,i,n){var a=Xf(t);r.prototype.init.call(this,t,i,n),u5(this,t,a)},e.prototype.mergeOption=function(t,i){r.prototype.mergeOption.call(this,t,i),u5(this,this.option,t)},e.type="legend.scroll",e.defaultOption=ml(wC.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800}),e}(wC);function u5(r,e,t){var i=r.getOrient(),n=[1,1];n[i.index]=0,ll(e,t,{type:"box",ignoreSize:!!n})}var c5=Le,Ix=["width","height"],Px=["x","y"],VCe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.newlineDisabled=!0,t._currentIndex=0,t}return e.prototype.init=function(){r.prototype.init.call(this),this.group.add(this._containerGroup=new c5),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new c5)},e.prototype.resetInner=function(){r.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},e.prototype.renderInner=function(t,i,n,a,s,o,l){var u=this;r.prototype.renderInner.call(this,t,i,n,a,s,o,l);var c=this._controllerGroup,h=i.get("pageIconSize",!0),d=ie(h)?h:[h,h];p("pagePrev",0);var f=i.getModel("pageTextStyle");c.add(new nt({name:"pageText",style:{text:"xx/xx",fill:f.getTextColor(),font:f.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),p("pageNext",1);function p(v,g){var m=v+"DataIndex",y=$f(i.get("pageIcons",!0)[i.getOrient().name][g],{onclick:ge(u._pageGo,u,m,i,a)},{x:-d[0]/2,y:-d[1]/2,width:d[0],height:d[1]});y.name=v,c.add(y)}},e.prototype.layoutInner=function(t,i,n,a,s,o){var l=this.getSelectorGroup(),u=t.getOrient().index,c=Ix[u],h=Px[u],d=Ix[1-u],f=Px[1-u];s&&ju("horizontal",l,t.get("selectorItemGap",!0));var p=t.get("selectorButtonGap",!0),v=l.getBoundingRect(),g=[-v.x,-v.y],m=Ee(n);s&&(m[c]=n[c]-v[c]-p);var y=this._layoutContentAndController(t,a,m,u,c,d,f,h);if(s){if(o==="end")g[u]+=y[c]+p;else{var _=v[c]+p;g[u]-=_,y[h]-=_}y[c]+=v[c]+p,g[1-u]+=y[f]+y[d]/2-v[d]/2,y[d]=Math.max(y[d],v[d]),y[f]=Math.min(y[f],v[f]+g[1-u]),l.x=g[0],l.y=g[1],l.markRedraw()}return y},e.prototype._layoutContentAndController=function(t,i,n,a,s,o,l,u){var c=this.getContentGroup(),h=this._containerGroup,d=this._controllerGroup;ju(t.get("orient"),c,t.get("itemGap"),a?n.width:null,a?null:n.height),ju("horizontal",d,t.get("pageButtonItemGap",!0));var f=c.getBoundingRect(),p=d.getBoundingRect(),v=this._showController=f[s]>n[s],g=[-f.x,-f.y];i||(g[a]=c[u]);var m=[0,0],y=[-p.x,-p.y],_=Fe(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(v){var b=t.get("pageButtonPosition",!0);b==="end"?y[a]+=n[s]-p[s]:m[a]+=p[s]+_}y[1-a]+=f[o]/2-p[o]/2,c.setPosition(g),h.setPosition(m),d.setPosition(y);var T={x:0,y:0};if(T[s]=v?n[s]:f[s],T[o]=Math.max(f[o],p[o]),T[l]=Math.min(0,p[l]+y[1-a]),h.__rectSize=n[s],v){var x={x:0,y:0};x[s]=Math.max(n[s]-p[s]-_,0),x[o]=T[o],h.setClipPath(new at({shape:x})),h.__rectSize=x[s]}else d.eachChild(function(D){D.attr({invisible:!0,silent:!0})});var C=this._getPageInfo(t);return C.pageIndex!=null&&ct(c,{x:C.contentPosition[0],y:C.contentPosition[1]},v?t:null),this._updatePageInfoView(t,C),T},e.prototype._pageGo=function(t,i,n){var a=this._getPageInfo(i)[t];a!=null&&n.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:i.id})},e.prototype._updatePageInfoView=function(t,i){var n=this._controllerGroup;R(["pagePrev","pageNext"],function(c){var h=c+"DataIndex",d=i[h]!=null,f=n.childOfName(c);f&&(f.setStyle("fill",d?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),f.cursor=d?"pointer":"default")});var a=n.childOfName("pageText"),s=t.get("pageFormatter"),o=i.pageIndex,l=o!=null?o+1:0,u=i.pageCount;a&&s&&a.setStyle("text",de(s)?s.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):s({current:l,total:u}))},e.prototype._getPageInfo=function(t){var i=t.get("scrollDataIndex",!0),n=this.getContentGroup(),a=this._containerGroup.__rectSize,s=t.getOrient().index,o=Ix[s],l=Px[s],u=this._findTargetItemIndex(i),c=n.children(),h=c[u],d=c.length,f=d?1:0,p={contentPosition:[n.x,n.y],pageCount:f,pageIndex:f-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!h)return p;var v=b(h);p.contentPosition[s]=-v.s;for(var g=u+1,m=v,y=v,_=null;g<=d;++g)_=b(c[g]),(!_&&y.e>m.s+a||_&&!T(_,m.s))&&(y.i>m.i?m=y:m=_,m&&(p.pageNextDataIndex==null&&(p.pageNextDataIndex=m.i),++p.pageCount)),y=_;for(var g=u-1,m=v,y=v,_=null;g>=-1;--g)_=b(c[g]),(!_||!T(y,_.s))&&m.i<y.i&&(y=m,p.pagePrevDataIndex==null&&(p.pagePrevDataIndex=m.i),++p.pageCount,++p.pageIndex),m=_;return p;function b(x){if(x){var C=x.getBoundingRect(),D=C[l]+x[l];return{s:D,e:D+C[o],i:x.__legendDataIndex}}}function T(x,C){return x.e>=C&&x.s<=C+a}},e.prototype._findTargetItemIndex=function(t){if(!this._showController)return 0;var i,n=this.getContentGroup(),a;return n.eachChild(function(s,o){var l=s.__legendDataIndex;a==null&&l!=null&&(a=o),l===t&&(i=o)}),i??a},e.type="legend.scroll",e}(IX);function zCe(r){r.registerAction("legendScroll","legendscroll",function(e,t){var i=e.scrollDataIndex;i!=null&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},function(n){n.setScrollDataIndex(i)})})}function GCe(r){Ye(MX),r.registerComponentModel(UCe),r.registerComponentView(VCe),zCe(r)}function HCe(r){Ye(MX),Ye(GCe)}var $Ce=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.inside",e.defaultOption=ml(Kv.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(Kv),AI=lt();function WCe(r,e,t){AI(r).coordSysRecordMap.each(function(i){var n=i.dataZoomInfoMap.get(e.uid);n&&(n.getRange=t)})}function qCe(r,e){for(var t=AI(r).coordSysRecordMap,i=t.keys(),n=0;n<i.length;n++){var a=i[n],s=t.get(a),o=s.dataZoomInfoMap;if(o){var l=e.uid,u=o.get(l);u&&(o.removeKey(l),o.keys().length||LX(t,s))}}}function LX(r,e){if(e){r.removeKey(e.model.uid);var t=e.controller;t&&t.dispose()}}function jCe(r,e){var t={model:e,containsPoint:Be(YCe,e),dispatchAction:Be(XCe,r),dataZoomInfoMap:null,controller:null},i=t.controller=new kg(r.getZr());return R(["pan","zoom","scrollMove"],function(n){i.on(n,function(a){var s=[];t.dataZoomInfoMap.each(function(o){if(a.isAvailableBehavior(o.model.option)){var l=(o.getRange||{})[n],u=l&&l(o.dzReferCoordSysInfo,t.model.mainType,t.controller,a);!o.model.get("disabled",!0)&&u&&s.push({dataZoomId:o.model.id,start:u[0],end:u[1]})}}),s.length&&t.dispatchAction(s)})}),t}function XCe(r,e){r.isDisposed()||r.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:e})}function YCe(r,e,t,i){return r.coordinateSystem.containPoint([t,i])}function KCe(r){var e,t="type_",i={type_true:2,type_move:1,type_false:0,type_undefined:-1},n=!0;return r.each(function(a){var s=a.model,o=s.get("disabled",!0)?!1:s.get("zoomLock",!0)?"move":!0;i[t+o]>i[t+e]&&(e=o),n=n&&s.get("preventDefaultMouseMove",!0)}),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!n}}}function ZCe(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(e,t){var i=AI(t),n=i.coordSysRecordMap||(i.coordSysRecordMap=be());n.each(function(a){a.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(a){var s=pX(a);R(s.infoList,function(o){var l=o.model.uid,u=n.get(l)||n.set(l,jCe(t,o.model)),c=u.dataZoomInfoMap||(u.dataZoomInfoMap=be());c.set(a.uid,{dzReferCoordSysInfo:o,model:a,getRange:null})})}),n.each(function(a){var s=a.controller,o,l=a.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(o=l.get(u))}if(!o){LX(n,a);return}var c=KCe(l);s.enable(c.controlType,c.opt),s.setPointerChecker(a.containsPoint),Qf(a,"dispatchAction",o.model.get("throttle",!0),"fixRate")})})}var QCe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return e.prototype.render=function(t,i,n){if(r.prototype.render.apply(this,arguments),t.noTarget()){this._clear();return}this.range=t.getPercentRange(),WCe(n,t,{pan:ge(Mx.pan,this),zoom:ge(Mx.zoom,this),scrollMove:ge(Mx.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){qCe(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e}(mI),Mx={zoom:function(r,e,t,i){var n=this.range,a=n.slice(),s=r.axisModels[0];if(s){var o=Lx[e](null,[i.originX,i.originY],s,t,r),l=(o.signal>0?o.pixelStart+o.pixelLength-o.pixel:o.pixel-o.pixelStart)/o.pixelLength*(a[1]-a[0])+a[0],u=Math.max(1/i.scale,0);a[0]=(a[0]-l)*u+l,a[1]=(a[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(Tc(0,a,[0,100],0,c.minSpan,c.maxSpan),this.range=a,n[0]!==a[0]||n[1]!==a[1])return a}},pan:h5(function(r,e,t,i,n,a){var s=Lx[i]([a.oldX,a.oldY],[a.newX,a.newY],e,n,t);return s.signal*(r[1]-r[0])*s.pixel/s.pixelLength}),scrollMove:h5(function(r,e,t,i,n,a){var s=Lx[i]([0,0],[a.scrollDelta,a.scrollDelta],e,n,t);return s.signal*(r[1]-r[0])*a.scrollDelta})};function h5(r){return function(e,t,i,n){var a=this.range,s=a.slice(),o=e.axisModels[0];if(o){var l=r(s,o,e,t,i,n);if(Tc(l,s,[0,100],"all"),this.range=s,a[0]!==s[0]||a[1]!==s[1])return s}}}var Lx={grid:function(r,e,t,i,n){var a=t.axis,s={},o=n.model.coordinateSystem.getRect();return r=r||[0,0],a.dim==="x"?(s.pixel=e[0]-r[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=e[1]-r[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s},polar:function(r,e,t,i,n){var a=t.axis,s={},o=n.model.coordinateSystem,l=o.getRadiusAxis().getExtent(),u=o.getAngleAxis().getExtent();return r=r?o.pointToCoord(r):[0,0],e=o.pointToCoord(e),t.mainType==="radiusAxis"?(s.pixel=e[0]-r[0],s.pixelLength=l[1]-l[0],s.pixelStart=l[0],s.signal=a.inverse?1:-1):(s.pixel=e[1]-r[1],s.pixelLength=u[1]-u[0],s.pixelStart=u[0],s.signal=a.inverse?-1:1),s},singleAxis:function(r,e,t,i,n){var a=t.axis,s=n.model.coordinateSystem.getRect(),o={};return r=r||[0,0],a.orient==="horizontal"?(o.pixel=e[0]-r[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o}};function kX(r){yI(r),r.registerComponentModel($Ce),r.registerComponentView(QCe),ZCe(r)}var JCe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=ml(Kv.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),e}(Kv),ep=at,f5=7,eAe=1,kx=30,tAe=7,tp="horizontal",d5="vertical",rAe=5,iAe=["line","bar","candlestick","scatter"],nAe={easing:"cubicOut",duration:100,delay:0},aAe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._displayables={},t}return e.prototype.init=function(t,i){this.api=i,this._onBrush=ge(this._onBrush,this),this._onBrushEnd=ge(this._onBrushEnd,this)},e.prototype.render=function(t,i,n,a){if(r.prototype.render.apply(this,arguments),Qf(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),t.get("show")===!1){this.group.removeAll();return}if(t.noTarget()){this._clear(),this.group.removeAll();return}(!a||a.type!=="dataZoom"||a.from!==this.uid)&&this._buildView(),this._updateView()},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){Bv(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var i=this._displayables.sliderGroup=new Le;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(i),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,i=this.api,n=t.get("brushSelect"),a=n?tAe:0,s=this._findCoordRect(),o={width:i.getWidth(),height:i.getHeight()},l=this._orient===tp?{right:o.width-s.x-s.width,top:o.height-kx-f5-a,width:s.width,height:kx}:{right:f5,top:s.y,width:kx,height:s.height},u=Xf(t.option);R(["right","top","width","height"],function(h){u[h]==="ph"&&(u[h]=l[h])});var c=br(u,o);this._location={x:c.x,y:c.y},this._size=[c.width,c.height],this._orient===d5&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,i=this._location,n=this._orient,a=this.dataZoomModel.getFirstTargetAxisModel(),s=a&&a.get("inverse"),o=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;o.attr(n===tp&&!s?{scaleY:l?1:-1,scaleX:1}:n===tp&&s?{scaleY:l?1:-1,scaleX:-1}:n===d5&&!s?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=t.getBoundingRect([o]);t.x=i.x-u.x,t.y=i.y-u.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,i=this._size,n=this._displayables.sliderGroup,a=t.get("brushSelect");n.add(new ep({silent:!0,shape:{x:0,y:0,width:i[0],height:i[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var s=new ep({shape:{x:0,y:0,width:i[0],height:i[1]},style:{fill:"transparent"},z2:0,onclick:ge(this._onClickPanel,this)}),o=this.api.getZr();a?(s.on("mousedown",this._onBrushStart,this),s.cursor="crosshair",o.on("mousemove",this._onBrush),o.on("mouseup",this._onBrushEnd)):(o.off("mousemove",this._onBrush),o.off("mouseup",this._onBrushEnd)),n.add(s)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!t)return;var i=this._size,n=this._shadowSize||[],a=t.series,s=a.getRawData(),o=a.getShadowDim&&a.getShadowDim(),l=o&&s.getDimensionInfo(o)?a.getShadowDim():t.otherDim;if(l==null)return;var u=this._shadowPolygonPts,c=this._shadowPolylinePts;if(s!==this._shadowData||l!==this._shadowDim||i[0]!==n[0]||i[1]!==n[1]){var h=s.getDataExtent(l),d=(h[1]-h[0])*.3;h=[h[0]-d,h[1]+d];var f=[0,i[1]],p=[0,i[0]],v=[[i[0],0],[0,0]],g=[],m=p[1]/(s.count()-1),y=0,_=Math.round(s.count()/i[0]),b;s.each([l],function(I,M){if(_>0&&M%_){y+=m;return}var L=I==null||isNaN(I)||I==="",N=L?0:yt(I,h,f,!0);L&&!b&&M?(v.push([v[v.length-1][0],0]),g.push([g[g.length-1][0],0])):!L&&b&&(v.push([y,0]),g.push([y,0])),v.push([y,N]),g.push([y,N]),y+=m,b=L}),u=this._shadowPolygonPts=v,c=this._shadowPolylinePts=g}this._shadowData=s,this._shadowDim=l,this._shadowSize=[i[0],i[1]];var T=this.dataZoomModel;function x(I){var M=T.getModel(I?"selectedDataBackground":"dataBackground"),L=new Le,N=new pi({shape:{points:u},segmentIgnoreThreshold:1,style:M.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),O=new mi({shape:{points:c},segmentIgnoreThreshold:1,style:M.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return L.add(N),L.add(O),L}for(var C=0;C<3;C++){var D=x(C===1);this._displayables.sliderGroup.add(D),this._displayables.dataShadowSegs.push(D)}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,i=t.get("showDataShadow");if(i!==!1){var n,a=this.ecModel;return t.eachTargetAxis(function(s,o){var l=t.getAxisProxy(s,o).getTargetSeriesModels();R(l,function(u){if(!n&&!(i!==!0&&Xe(iAe,u.get("type"))<0)){var c=a.getComponent(Wo(s),o).axis,h=sAe(s),d,f=u.coordinateSystem;h!=null&&f.getOtherAxis&&(d=f.getOtherAxis(c).inverse),h=u.getData().mapDimension(h),n={thisAxis:c,series:u,thisDim:s,otherDim:h,otherAxisInverse:d}}},this)},this),n}},e.prototype._renderHandle=function(){var t=this.group,i=this._displayables,n=i.handles=[null,null],a=i.handleLabels=[null,null],s=this._displayables.sliderGroup,o=this._size,l=this.dataZoomModel,u=this.api,c=l.get("borderRadius")||0,h=l.get("brushSelect"),d=i.filler=new ep({silent:h,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});s.add(d),s.add(new ep({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:o[0],height:o[1],r:c},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:eAe,fill:"rgba(0,0,0,0)"}})),R([0,1],function(_){var b=l.get("handleIcon");!n_[b]&&b.indexOf("path://")<0&&b.indexOf("image://")<0&&(b="path://"+b);var T=cr(b,-1,0,2,2,null,!0);T.attr({cursor:p5(this._orient),draggable:!0,drift:ge(this._onDragMove,this,_),ondragend:ge(this._onDragEnd,this),onmouseover:ge(this._showDataInfo,this,!0),onmouseout:ge(this._showDataInfo,this,!1),z2:5});var x=T.getBoundingRect(),C=l.get("handleSize");this._handleHeight=ce(C,this._size[1]),this._handleWidth=x.width/x.height*this._handleHeight,T.setStyle(l.getModel("handleStyle").getItemStyle()),T.style.strokeNoScale=!0,T.rectHover=!0,T.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),Ko(T);var D=l.get("handleColor");D!=null&&(T.style.fill=D),s.add(n[_]=T);var I=l.getModel("textStyle");t.add(a[_]=new nt({silent:!0,invisible:!0,style:Mt(I,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:I.getTextColor(),font:I.getFont()}),z2:10}))},this);var f=d;if(h){var p=ce(l.get("moveHandleSize"),o[1]),v=i.moveHandle=new at({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:o[1]-.5,height:p}}),g=p*.8,m=i.moveHandleIcon=cr(l.get("moveHandleIcon"),-g/2,-g/2,g,g,"#fff",!0);m.silent=!0,m.y=o[1]+p/2-.5,v.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var y=Math.min(o[1]/2,Math.max(p,10));f=i.moveZone=new at({invisible:!0,shape:{y:o[1]-y,height:p+y}}),f.on("mouseover",function(){u.enterEmphasis(v)}).on("mouseout",function(){u.leaveEmphasis(v)}),s.add(v),s.add(m),s.add(f)}f.attr({draggable:!0,cursor:p5(this._orient),drift:ge(this._onDragMove,this,"all"),ondragstart:ge(this._showDataInfo,this,!0),ondragend:ge(this._onDragEnd,this),onmouseover:ge(this._showDataInfo,this,!0),onmouseout:ge(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),i=this._getViewExtent();this._handleEnds=[yt(t[0],[0,100],i,!0),yt(t[1],[0,100],i,!0)]},e.prototype._updateInterval=function(t,i){var n=this.dataZoomModel,a=this._handleEnds,s=this._getViewExtent(),o=n.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];Tc(i,a,s,n.get("zoomLock")?"all":t,o.minSpan!=null?yt(o.minSpan,l,s,!0):null,o.maxSpan!=null?yt(o.maxSpan,l,s,!0):null);var u=this._range,c=this._range=mn([yt(a[0],s,l,!0),yt(a[1],s,l,!0)]);return!u||u[0]!==c[0]||u[1]!==c[1]},e.prototype._updateView=function(t){var i=this._displayables,n=this._handleEnds,a=mn(n.slice()),s=this._size;R([0,1],function(f){var p=i.handles[f],v=this._handleHeight;p.attr({scaleX:v/2,scaleY:v/2,x:n[f]+(f?-1:1),y:s[1]/2-v/2})},this),i.filler.setShape({x:a[0],y:0,width:a[1]-a[0],height:s[1]});var o={x:a[0],width:a[1]-a[0]};i.moveHandle&&(i.moveHandle.setShape(o),i.moveZone.setShape(o),i.moveZone.getBoundingRect(),i.moveHandleIcon&&i.moveHandleIcon.attr("x",o.x+o.width/2));for(var l=i.dataShadowSegs,u=[0,a[0],a[1],s[0]],c=0;c<l.length;c++){var h=l[c],d=h.getClipPath();d||(d=new at,h.setClipPath(d)),d.setShape({x:u[c],y:0,width:u[c+1]-u[c],height:s[1]})}this._updateDataInfo(t)},e.prototype._updateDataInfo=function(t){var i=this.dataZoomModel,n=this._displayables,a=n.handleLabels,s=this._orient,o=["",""];if(i.get("showDetail")){var l=i.findRepresentativeAxisProxy();if(l){var u=l.getAxisModel().axis,c=this._range,h=t?l.calculateDataWindow({start:c[0],end:c[1]}).valueWindow:l.getDataValueWindow();o=[this._formatLabel(h[0],u),this._formatLabel(h[1],u)]}}var d=mn(this._handleEnds.slice());f.call(this,0),f.call(this,1);function f(p){var v=Zo(n.handles[p].parent,this.group),g=O1(p===0?"right":"left",v),m=this._handleWidth/2+rAe,y=Ca([d[p]+(p===0?-m:m),this._size[1]/2],v);a[p].setStyle({x:y[0],y:y[1],verticalAlign:s===tp?"middle":g,align:s===tp?g:"center",text:o[p]})}},e.prototype._formatLabel=function(t,i){var n=this.dataZoomModel,a=n.get("labelFormatter"),s=n.get("labelPrecision");(s==null||s==="auto")&&(s=i.getPixelPrecision());var o=t==null||isNaN(t)?"":i.type==="category"||i.type==="time"?i.scale.getLabel({value:Math.round(t)}):t.toFixed(Math.min(s,20));return xe(a)?a(t,o):de(a)?a.replace("{value}",o):o},e.prototype._showDataInfo=function(t){t=this._dragging||t;var i=this._displayables,n=i.handleLabels;n[0].attr("invisible",!t),n[1].attr("invisible",!t),i.moveHandle&&this.api[t?"enterEmphasis":"leaveEmphasis"](i.moveHandle,1)},e.prototype._onDragMove=function(t,i,n,a){this._dragging=!0,Qs(a.event);var s=this._displayables.sliderGroup.getLocalTransform(),o=Ca([i,n],s,!0),l=this._updateInterval(t,o[0]),u=this.dataZoomModel.get("realtime");this._updateView(!u),l&&u&&this._dispatchZoomAction(!0)},e.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1);var t=this.dataZoomModel.get("realtime");!t&&this._dispatchZoomAction(!1)},e.prototype._onClickPanel=function(t){var i=this._size,n=this._displayables.sliderGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(n[0]<0||n[0]>i[0]||n[1]<0||n[1]>i[1])){var a=this._handleEnds,s=(a[0]+a[1])/2,o=this._updateInterval("all",n[0]-s);this._updateView(),o&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var i=t.offsetX,n=t.offsetY;this._brushStart=new $e(i,n),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(this._brushing){var i=this._displayables.brushRect;if(this._brushing=!1,!!i){i.attr("ignore",!0);var n=i.shape,a=+new Date;if(!(a-this._brushStartTime<200&&Math.abs(n.width)<5)){var s=this._getViewExtent(),o=[0,100];this._range=mn([yt(n.x,s,o,!0),yt(n.x+n.width,s,o,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(Qs(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,i){var n=this._displayables,a=this.dataZoomModel,s=n.brushRect;s||(s=n.brushRect=new ep({silent:!0,style:a.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(s)),s.attr("ignore",!1);var o=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(t,i),c=l.transformCoordToLocal(o.x,o.y),h=this._size;u[0]=Math.max(Math.min(h[0],u[0]),0),s.setShape({x:c[0],y:0,width:u[0]-c[0],height:h[1]})},e.prototype._dispatchZoomAction=function(t){var i=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?nAe:null,start:i[0],end:i[1]})},e.prototype._findCoordRect=function(){var t,i=pX(this.dataZoomModel).infoList;if(!t&&i.length){var n=i[0].model.coordinateSystem;t=n.getRect&&n.getRect()}if(!t){var a=this.api.getWidth(),s=this.api.getHeight();t={x:a*.2,y:s*.2,width:a*.6,height:s*.6}}return t},e.type="dataZoom.slider",e}(mI);function sAe(r){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[r]}function p5(r){return r==="vertical"?"ns-resize":"ew-resize"}function RX(r){r.registerComponentModel(JCe),r.registerComponentView(aAe),yI(r)}function oAe(r){Ye(kX),Ye(RX)}var OX={get:function(r,e,t){var i=Ee((lAe[r]||{})[e]);return t&&ie(i)?i[i.length-1]:i}},lAe={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},v5=Nr.mapVisual,uAe=Nr.eachVisual,cAe=ie,g5=R,hAe=mn,fAe=yt,P_=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.stateList=["inRange","outOfRange"],t.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],t.layoutMode={type:"box",ignoreSize:!0},t.dataBound=[-1/0,1/0],t.targetVisuals={},t.controllerVisuals={},t}return e.prototype.init=function(t,i,n){this.mergeDefaultAndTheme(t,n)},e.prototype.optionUpdated=function(t,i){var n=this.option;!i&&wX(n,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var i=this.stateList;t=ge(t,this),this.controllerVisuals=SC(this.option.controller,i,t),this.targetVisuals=SC(this.option.target,i,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,i=[];return t==null||t==="all"?this.ecModel.eachSeries(function(n,a){i.push(a)}):i=wt(t),i},e.prototype.eachTargetSeries=function(t,i){R(this.getTargetSeriesIndices(),function(n){var a=this.ecModel.getSeriesByIndex(n);a&&t.call(i,a)},this)},e.prototype.isTargetSeries=function(t){var i=!1;return this.eachTargetSeries(function(n){n===t&&(i=!0)}),i},e.prototype.formatValueText=function(t,i,n){var a=this.option,s=a.precision,o=this.dataBound,l=a.formatter,u;n=n||["<",">"],ie(t)&&(t=t.slice(),u=!0);var c=i?t:u?[h(t[0]),h(t[1])]:h(t);if(de(l))return l.replace("{value}",u?c[0]:c).replace("{value2}",u?c[1]:c);if(xe(l))return u?l(t[0],t[1]):l(t);if(u)return t[0]===o[0]?n[0]+" "+c[1]:t[1]===o[1]?n[1]+" "+c[0]:c[0]+" - "+c[1];return c;function h(d){return d===o[0]?"min":d===o[1]?"max":(+d).toFixed(Math.min(s,20))}},e.prototype.resetExtent=function(){var t=this.option,i=hAe([t.min,t.max]);this._dataExtent=i},e.prototype.getDataDimensionIndex=function(t){var i=this.option.dimension;if(i!=null)return t.getDimensionIndex(i);for(var n=t.dimensions,a=n.length-1;a>=0;a--){var s=n[a],o=t.getDimensionInfo(s);if(!o.isCalculationCoord)return o.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=this.ecModel,i=this.option,n={inRange:i.inRange,outOfRange:i.outOfRange},a=i.target||(i.target={}),s=i.controller||(i.controller={});He(a,n),He(s,n);var o=this.isCategory();l.call(this,a),l.call(this,s),u.call(this,a,"inRange","outOfRange"),c.call(this,s);function l(h){cAe(i.color)&&!h.inRange&&(h.inRange={color:i.color.slice().reverse()}),h.inRange=h.inRange||{color:t.get("gradientColor")}}function u(h,d,f){var p=h[d],v=h[f];p&&!v&&(v=h[f]={},g5(p,function(g,m){if(Nr.isValidType(m)){var y=OX.get(m,"inactive",o);y!=null&&(v[m]=y,m==="color"&&!v.hasOwnProperty("opacity")&&!v.hasOwnProperty("colorAlpha")&&(v.opacity=[0,0]))}}))}function c(h){var d=(h.inRange||{}).symbol||(h.outOfRange||{}).symbol,f=(h.inRange||{}).symbolSize||(h.outOfRange||{}).symbolSize,p=this.get("inactiveColor"),v=this.getItemSymbol(),g=v||"roundRect";g5(this.stateList,function(m){var y=this.itemSize,_=h[m];_||(_=h[m]={color:o?p:[p]}),_.symbol==null&&(_.symbol=d&&Ee(d)||(o?g:[g])),_.symbolSize==null&&(_.symbolSize=f&&Ee(f)||(o?y[0]:[y[0],y[0]])),_.symbol=v5(_.symbol,function(x){return x==="none"?g:x});var b=_.symbolSize;if(b!=null){var T=-1/0;uAe(b,function(x){x>T&&(T=x)}),_.symbolSize=v5(b,function(x){return fAe(x,[0,T],[0,y[0]],!0)})}},this)}},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(t){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(t){return null},e.prototype.getVisualMeta=function(t){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},e}(Qe),m5=[20,140],dAe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(t,i){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(n){n.mappingMethod="linear",n.dataExtent=this.getExtent()}),this._resetRange()},e.prototype.resetItemSize=function(){r.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=m5[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=m5[1])},e.prototype._resetRange=function(){var t=this.getExtent(),i=this.option.range;!i||i.auto?(t.auto=1,this.option.range=t):ie(i)&&(i[0]>i[1]&&i.reverse(),i[0]=Math.max(i[0],t[0]),i[1]=Math.min(i[1],t[1]))},e.prototype.completeVisualOption=function(){r.prototype.completeVisualOption.apply(this,arguments),R(this.stateList,function(t){var i=this.option.controller[t].symbolSize;i&&i[0]!==i[1]&&(i[0]=i[1]/3)},this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),i=mn((this.get("range")||[]).slice());return i[0]>t[1]&&(i[0]=t[1]),i[1]>t[1]&&(i[1]=t[1]),i[0]<t[0]&&(i[0]=t[0]),i[1]<t[0]&&(i[1]=t[0]),i},e.prototype.getValueState=function(t){var i=this.option.range,n=this.getExtent();return(i[0]<=n[0]||i[0]<=t)&&(i[1]>=n[1]||t<=i[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var i=[];return this.eachTargetSeries(function(n){var a=[],s=n.getData();s.each(this.getDataDimensionIndex(s),function(o,l){t[0]<=o&&o<=t[1]&&a.push(l)},this),i.push({seriesId:n.id,dataIndex:a})},this),i},e.prototype.getVisualMeta=function(t){var i=y5(this,"outOfRange",this.getExtent()),n=y5(this,"inRange",this.option.range.slice()),a=[];function s(f,p){a.push({value:f,color:t(f,p)})}for(var o=0,l=0,u=n.length,c=i.length;l<c&&(!n.length||i[l]<=n[0]);l++)i[l]<n[o]&&s(i[l],"outOfRange");for(var h=1;o<u;o++,h=0)h&&a.length&&s(n[o],"outOfRange"),s(n[o],"inRange");for(var h=1;l<c;l++)(!n.length||n[n.length-1]<i[l])&&(h&&(a.length&&s(a[a.length-1].value,"outOfRange"),h=0),s(i[l],"outOfRange"));var d=a.length;return{stops:a,outerColors:[d?a[0].color:"transparent",d?a[d-1].color:"transparent"]}},e.type="visualMap.continuous",e.defaultOption=ml(P_.defaultOption,{align:"auto",calculable:!1,hoverLink:!0,realtime:!0,handleIcon:"path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z",handleSize:"120%",handleStyle:{borderColor:"#fff",borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}}),e}(P_);function y5(r,e,t){if(t[0]===t[1])return t.slice();for(var i=200,n=(t[1]-t[0])/i,a=t[0],s=[],o=0;o<=i&&a<t[1];o++)s.push(a),a+=n;return s.push(t[1]),s}var NX=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.autoPositionValues={left:1,right:1,top:1,bottom:1},t}return e.prototype.init=function(t,i){this.ecModel=t,this.api=i},e.prototype.render=function(t,i,n,a){if(this.visualMapModel=t,t.get("show")===!1){this.group.removeAll();return}this.doRender(t,i,n,a)},e.prototype.renderBackground=function(t){var i=this.visualMapModel,n=yc(i.get("padding")||0),a=t.getBoundingRect();t.add(new at({z2:-1,silent:!0,shape:{x:a.x-n[3],y:a.y-n[0],width:a.width+n[3]+n[1],height:a.height+n[0]+n[2]},style:{fill:i.get("backgroundColor"),stroke:i.get("borderColor"),lineWidth:i.get("borderWidth")}}))},e.prototype.getControllerVisual=function(t,i,n){n=n||{};var a=n.forceState,s=this.visualMapModel,o={};if(i==="color"){var l=s.get("contentColor");o.color=l}function u(f){return o[f]}function c(f,p){o[f]=p}var h=s.controllerVisuals[a||s.getValueState(t)],d=Nr.prepareVisualTypes(h);return R(d,function(f){var p=h[f];n.convertOpacityToAlpha&&f==="opacity"&&(f="colorAlpha",p=h.__alphaForOpacity),Nr.dependsOn(f,i)&&p&&p.applyVisual(t,u,c)}),o[i]},e.prototype.positionGroup=function(t){var i=this.visualMapModel,n=this.api;z1(t,i.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()})},e.prototype.doRender=function(t,i,n,a){},e.type="visualMap",e}(Nt),_5=[["left","right","width"],["top","bottom","height"]];function BX(r,e,t){var i=r.option,n=i.align;if(n!=null&&n!=="auto")return n;for(var a={width:e.getWidth(),height:e.getHeight()},s=i.orient==="horizontal"?1:0,o=_5[s],l=[0,null,10],u={},c=0;c<3;c++)u[_5[1-s][c]]=l[c],u[o[c]]=c===2?t[0]:i[o[c]];var h=[["x","width",3],["y","height",0]][s],d=br(u,a,i.padding);return o[(d.margin[h[2]]||0)+d[h[0]]+d[h[1]]*.5<a[h[1]]*.5?0:1]}function Ky(r,e){return R(r||[],function(t){t.dataIndex!=null&&(t.dataIndexInside=t.dataIndex,t.dataIndex=null),t.highlightKey="visualMap"+(e?e.componentIndex:"")}),r}var za=yt,pAe=R,b5=Math.min,Rx=Math.max,vAe=12,gAe=6,mAe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._shapes={},t._dataInterval=[],t._handleEnds=[],t._hoverLinkDataIndices=[],t}return e.prototype.init=function(t,i){r.prototype.init.call(this,t,i),this._hoverLinkFromSeriesMouseOver=ge(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=ge(this._hideIndicator,this)},e.prototype.doRender=function(t,i,n,a){(!a||a.type!=="selectDataRange"||a.from!==this.uid)&&this._buildView()},e.prototype._buildView=function(){this.group.removeAll();var t=this.visualMapModel,i=this.group;this._orient=t.get("orient"),this._useHandle=t.get("calculable"),this._resetInterval(),this._renderBar(i);var n=t.get("text");this._renderEndsText(i,n,0),this._renderEndsText(i,n,1),this._updateView(!0),this.renderBackground(i),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(i)},e.prototype._renderEndsText=function(t,i,n){if(i){var a=i[1-n];a=a!=null?a+"":"";var s=this.visualMapModel,o=s.get("textGap"),l=s.itemSize,u=this._shapes.mainGroup,c=this._applyTransform([l[0]/2,n===0?-o:l[1]+o],u),h=this._applyTransform(n===0?"bottom":"top",u),d=this._orient,f=this.visualMapModel.textStyleModel;this.group.add(new nt({style:Mt(f,{x:c[0],y:c[1],verticalAlign:d==="horizontal"?"middle":h,align:d==="horizontal"?h:"center",text:a})}))}},e.prototype._renderBar=function(t){var i=this.visualMapModel,n=this._shapes,a=i.itemSize,s=this._orient,o=this._useHandle,l=BX(i,this.api,a),u=n.mainGroup=this._createBarGroup(l),c=new Le;u.add(c),c.add(n.outOfRange=S5()),c.add(n.inRange=S5(null,o?x5(this._orient):null,ge(this._dragHandle,this,"all",!1),ge(this._dragHandle,this,"all",!0))),c.setClipPath(new at({shape:{x:0,y:0,width:a[0],height:a[1],r:3}}));var h=i.textStyleModel.getTextRect("国"),d=Rx(h.width,h.height);o&&(n.handleThumbs=[],n.handleLabels=[],n.handleLabelPoints=[],this._createHandle(i,u,0,a,d,s),this._createHandle(i,u,1,a,d,s)),this._createIndicator(i,u,a,d,s),t.add(u)},e.prototype._createHandle=function(t,i,n,a,s,o){var l=ge(this._dragHandle,this,n,!1),u=ge(this._dragHandle,this,n,!0),c=Ea(t.get("handleSize"),a[0]),h=cr(t.get("handleIcon"),-c/2,-c/2,c,c,null,!0),d=x5(this._orient);h.attr({cursor:d,draggable:!0,drift:l,ondragend:u,onmousemove:function(m){Qs(m.event)}}),h.x=a[0]/2,h.useStyle(t.getModel("handleStyle").getItemStyle()),h.setStyle({strokeNoScale:!0,strokeFirst:!0}),h.style.lineWidth*=2,h.ensureState("emphasis").style=t.getModel(["emphasis","handleStyle"]).getItemStyle(),Cu(h,!0),i.add(h);var f=this.visualMapModel.textStyleModel,p=new nt({cursor:d,draggable:!0,drift:l,onmousemove:function(m){Qs(m.event)},ondragend:u,style:Mt(f,{x:0,y:0,text:""})});p.ensureState("blur").style={opacity:.1},p.stateTransition={duration:200},this.group.add(p);var v=[c,0],g=this._shapes;g.handleThumbs[n]=h,g.handleLabelPoints[n]=v,g.handleLabels[n]=p},e.prototype._createIndicator=function(t,i,n,a,s){var o=Ea(t.get("indicatorSize"),n[0]),l=cr(t.get("indicatorIcon"),-o/2,-o/2,o,o,null,!0);l.attr({cursor:"move",invisible:!0,silent:!0,x:n[0]/2});var u=t.getModel("indicatorStyle").getItemStyle();if(l instanceof Ur){var c=l.style;l.useStyle(Q({image:c.image,x:c.x,y:c.y,width:c.width,height:c.height},u))}else l.useStyle(u);i.add(l);var h=this.visualMapModel.textStyleModel,d=new nt({silent:!0,invisible:!0,style:Mt(h,{x:0,y:0,text:""})});this.group.add(d);var f=[(s==="horizontal"?a/2:gAe)+n[0]/2,0],p=this._shapes;p.indicator=l,p.indicatorLabel=d,p.indicatorLabelPoint=f,this._firstShowIndicator=!0},e.prototype._dragHandle=function(t,i,n,a){if(this._useHandle){if(this._dragging=!i,!i){var s=this._applyTransform([n,a],this._shapes.mainGroup,!0);this._updateInterval(t,s[1]),this._hideIndicator(),this._updateView()}i===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),i?!this._hovering&&this._clearHoverLinkToSeries():T5(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[t],!1)}},e.prototype._resetInterval=function(){var t=this.visualMapModel,i=this._dataInterval=t.getSelected(),n=t.getExtent(),a=[0,t.itemSize[1]];this._handleEnds=[za(i[0],n,a,!0),za(i[1],n,a,!0)]},e.prototype._updateInterval=function(t,i){i=i||0;var n=this.visualMapModel,a=this._handleEnds,s=[0,n.itemSize[1]];Tc(i,a,s,t,0);var o=n.getExtent();this._dataInterval=[za(a[0],s,o,!0),za(a[1],s,o,!0)]},e.prototype._updateView=function(t){var i=this.visualMapModel,n=i.getExtent(),a=this._shapes,s=[0,i.itemSize[1]],o=t?s:this._handleEnds,l=this._createBarVisual(this._dataInterval,n,o,"inRange"),u=this._createBarVisual(n,n,s,"outOfRange");a.inRange.setStyle({fill:l.barColor}).setShape("points",l.barPoints),a.outOfRange.setStyle({fill:u.barColor}).setShape("points",u.barPoints),this._updateHandle(o,l)},e.prototype._createBarVisual=function(t,i,n,a){var s={forceState:a,convertOpacityToAlpha:!0},o=this._makeColorGradient(t,s),l=[this.getControllerVisual(t[0],"symbolSize",s),this.getControllerVisual(t[1],"symbolSize",s)],u=this._createBarPoints(n,l);return{barColor:new Gf(0,0,0,1,o),barPoints:u,handlesColor:[o[0].color,o[o.length-1].color]}},e.prototype._makeColorGradient=function(t,i){var n=100,a=[],s=(t[1]-t[0])/n;a.push({color:this.getControllerVisual(t[0],"color",i),offset:0});for(var o=1;o<n;o++){var l=t[0]+s*o;if(l>t[1])break;a.push({color:this.getControllerVisual(l,"color",i),offset:o/n})}return a.push({color:this.getControllerVisual(t[1],"color",i),offset:1}),a},e.prototype._createBarPoints=function(t,i){var n=this.visualMapModel.itemSize;return[[n[0]-i[0],t[0]],[n[0],t[0]],[n[0],t[1]],[n[0]-i[1],t[1]]]},e.prototype._createBarGroup=function(t){var i=this._orient,n=this.visualMapModel.get("inverse");return new Le(i==="horizontal"&&!n?{scaleX:t==="bottom"?1:-1,rotation:Math.PI/2}:i==="horizontal"&&n?{scaleX:t==="bottom"?-1:1,rotation:-Math.PI/2}:i==="vertical"&&!n?{scaleX:t==="left"?1:-1,scaleY:-1}:{scaleX:t==="left"?1:-1})},e.prototype._updateHandle=function(t,i){if(this._useHandle){var n=this._shapes,a=this.visualMapModel,s=n.handleThumbs,o=n.handleLabels,l=a.itemSize,u=a.getExtent();pAe([0,1],function(c){var h=s[c];h.setStyle("fill",i.handlesColor[c]),h.y=t[c];var d=za(t[c],[0,l[1]],u,!0),f=this.getControllerVisual(d,"symbolSize");h.scaleX=h.scaleY=f/l[0],h.x=l[0]-f/2;var p=Ca(n.handleLabelPoints[c],Zo(h,this.group));o[c].setStyle({x:p[0],y:p[1],text:a.formatValueText(this._dataInterval[c]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",n.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(t,i,n,a){var s=this.visualMapModel,o=s.getExtent(),l=s.itemSize,u=[0,l[1]],c=this._shapes,h=c.indicator;if(h){h.attr("invisible",!1);var d={convertOpacityToAlpha:!0},f=this.getControllerVisual(t,"color",d),p=this.getControllerVisual(t,"symbolSize"),v=za(t,o,u,!0),g=l[0]-p/2,m={x:h.x,y:h.y};h.y=v,h.x=g;var y=Ca(c.indicatorLabelPoint,Zo(h,this.group)),_=c.indicatorLabel;_.attr("invisible",!1);var b=this._applyTransform("left",c.mainGroup),T=this._orient,x=T==="horizontal";_.setStyle({text:(n||"")+s.formatValueText(i),verticalAlign:x?b:"middle",align:x?"center":b});var C={x:g,y:v,style:{fill:f}},D={style:{x:y[0],y:y[1]}};if(s.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var I={duration:100,easing:"cubicInOut",additive:!0};h.x=m.x,h.y=m.y,h.animateTo(C,I),_.animateTo(D,I)}else h.attr(C),_.attr(D);this._firstShowIndicator=!1;var M=this._shapes.handleLabels;if(M)for(var L=0;L<M.length;L++)this.api.enterBlur(M[L])}},e.prototype._enableHoverLinkToSeries=function(){var t=this;this._shapes.mainGroup.on("mousemove",function(i){if(t._hovering=!0,!t._dragging){var n=t.visualMapModel.itemSize,a=t._applyTransform([i.offsetX,i.offsetY],t._shapes.mainGroup,!0,!0);a[1]=b5(Rx(0,a[1]),n[1]),t._doHoverLinkToSeries(a[1],0<=a[0]&&a[0]<=n[0])}}).on("mouseout",function(){t._hovering=!1,!t._dragging&&t._clearHoverLinkToSeries()})},e.prototype._enableHoverLinkFromSeries=function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},e.prototype._doHoverLinkToSeries=function(t,i){var n=this.visualMapModel,a=n.itemSize;if(n.option.hoverLink){var s=[0,a[1]],o=n.getExtent();t=b5(Rx(s[0],t),s[1]);var l=yAe(n,o,s),u=[t-l,t+l],c=za(t,s,o,!0),h=[za(u[0],s,o,!0),za(u[1],s,o,!0)];u[0]<s[0]&&(h[0]=-1/0),u[1]>s[1]&&(h[1]=1/0),i&&(h[0]===-1/0?this._showIndicator(c,h[1],"< ",l):h[1]===1/0?this._showIndicator(c,h[0],"> ",l):this._showIndicator(c,c,"≈ ",l));var d=this._hoverLinkDataIndices,f=[];(i||T5(n))&&(f=this._hoverLinkDataIndices=n.findTargetDataIndices(h));var p=dce(d,f);this._dispatchHighDown("downplay",Ky(p[0],n)),this._dispatchHighDown("highlight",Ky(p[1],n))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){var i;if(Du(t.target,function(l){var u=ke(l);if(u.dataIndex!=null)return i=u,!0},!0),!!i){var n=this.ecModel.getSeriesByIndex(i.seriesIndex),a=this.visualMapModel;if(a.isTargetSeries(n)){var s=n.getData(i.dataType),o=s.getStore().get(a.getDataDimensionIndex(s),i.dataIndex);isNaN(o)||this._showIndicator(o,o)}}},e.prototype._hideIndicator=function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0);var i=this._shapes.handleLabels;if(i)for(var n=0;n<i.length;n++)this.api.leaveBlur(i[n])},e.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",Ky(t,this.visualMapModel)),t.length=0},e.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},e.prototype._applyTransform=function(t,i,n,a){var s=Zo(i,a?null:this.group);return ie(t)?Ca(t,s,n):O1(t,s,n)},e.prototype._dispatchHighDown=function(t,i){i&&i.length&&this.api.dispatchAction({type:t,batch:i})},e.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},e.type="visualMap.continuous",e}(NX);function S5(r,e,t,i){return new pi({shape:{points:r},draggable:!!t,cursor:e,drift:t,onmousemove:function(n){Qs(n.event)},ondragend:i})}function yAe(r,e,t){var i=vAe/2,n=r.get("hoverLinkDataSize");return n&&(i=za(n,e,t,!0)/2),i}function T5(r){var e=r.get("hoverLinkOnHandle");return!!(e??r.get("realtime"))}function x5(r){return r==="vertical"?"ns-resize":"ew-resize"}var _Ae={type:"selectDataRange",event:"dataRangeSelected",update:"update"},bAe=function(r,e){e.eachComponent({mainType:"visualMap",query:r},function(t){t.setSelected(r.selected)})},SAe=[{createOnAllSeries:!0,reset:function(r,e){var t=[];return e.eachComponent("visualMap",function(i){var n=r.pipelineContext;!i.isTargetSeries(r)||n&&n.large||t.push(H2e(i.stateList,i.targetVisuals,ge(i.getValueState,i),i.getDataDimensionIndex(r.getData())))}),t}},{createOnAllSeries:!0,reset:function(r,e){var t=r.getData(),i=[];e.eachComponent("visualMap",function(n){if(n.isTargetSeries(r)){var a=n.getVisualMeta(ge(TAe,null,r,n))||{stops:[],outerColors:[]},s=n.getDataDimensionIndex(t);s>=0&&(a.dimension=s,i.push(a))}}),r.getData().setVisual("visualMeta",i)}}];function TAe(r,e,t,i){for(var n=e.targetVisuals[i],a=Nr.prepareVisualTypes(n),s={color:Cg(r.getData(),"color")},o=0,l=a.length;o<l;o++){var u=a[o],c=n[u==="opacity"?"__alphaForOpacity":u];c&&c.applyVisual(t,h,d)}return s.color;function h(f){return s[f]}function d(f,p){s[f]=p}}var w5=R;function xAe(r){var e=r&&r.visualMap;ie(e)||(e=e?[e]:[]),w5(e,function(t){if(t){sh(t,"splitList")&&!sh(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var i=t.pieces;i&&ie(i)&&w5(i,function(n){Ae(n)&&(sh(n,"start")&&!sh(n,"min")&&(n.min=n.start),sh(n,"end")&&!sh(n,"max")&&(n.max=n.end))})}})}function sh(r,e){return r&&r.hasOwnProperty&&r.hasOwnProperty(e)}var C5=!1;function FX(r){C5||(C5=!0,r.registerSubTypeDefaulter("visualMap",function(e){return!e.categories&&(!(e.pieces?e.pieces.length>0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),r.registerAction(_Ae,bAe),R(SAe,function(e){r.registerVisual(r.PRIORITY.VISUAL.COMPONENT,e)}),r.registerPreprocessor(xAe))}function UX(r){r.registerComponentModel(dAe),r.registerComponentView(mAe),FX(r)}var wAe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._pieceList=[],t}return e.prototype.optionUpdated=function(t,i){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var n=this._mode=this._determineMode();this._pieceList=[],CAe[this._mode].call(this,this._pieceList),this._resetSelected(t,i);var a=this.option.categories;this.resetVisual(function(s,o){n==="categories"?(s.mappingMethod="category",s.categories=Ee(a)):(s.dataExtent=this.getExtent(),s.mappingMethod="piecewise",s.pieceList=ae(this._pieceList,function(l){return l=Ee(l),o!=="inRange"&&(l.visual=null),l}))})},e.prototype.completeVisualOption=function(){var t=this.option,i={},n=Nr.listVisualTypes(),a=this.isCategory();R(t.pieces,function(o){R(n,function(l){o.hasOwnProperty(l)&&(i[l]=1)})}),R(i,function(o,l){var u=!1;R(this.stateList,function(c){u=u||s(t,c,l)||s(t.target,c,l)},this),!u&&R(this.stateList,function(c){(t[c]||(t[c]={}))[l]=OX.get(l,c==="inRange"?"active":"inactive",a)})},this);function s(o,l,u){return o&&o[l]&&o[l].hasOwnProperty(u)}r.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,i){var n=this.option,a=this._pieceList,s=(i?n:t).selected||{};if(n.selected=s,R(a,function(l,u){var c=this.getSelectedMapKey(l);s.hasOwnProperty(c)||(s[c]=!0)},this),n.selectedMode==="single"){var o=!1;R(a,function(l,u){var c=this.getSelectedMapKey(l);s[c]&&(o?s[c]=!1:o=!0)},this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(t){return this._mode==="categories"?t.value+"":t.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(t){this.option.selected=Ee(t)},e.prototype.getValueState=function(t){var i=Nr.findPieceIndex(t,this._pieceList);return i!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[i])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var i=[],n=this._pieceList;return this.eachTargetSeries(function(a){var s=[],o=a.getData();o.each(this.getDataDimensionIndex(o),function(l,u){var c=Nr.findPieceIndex(l,n);c===t&&s.push(u)},this),i.push({seriesId:a.id,dataIndex:s})},this),i},e.prototype.getRepresentValue=function(t){var i;if(this.isCategory())i=t.value;else if(t.value!=null)i=t.value;else{var n=t.interval||[];i=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return i},e.prototype.getVisualMeta=function(t){if(this.isCategory())return;var i=[],n=["",""],a=this;function s(c,h){var d=a.getRepresentValue({interval:c});h||(h=a.getValueState(d));var f=t(d,h);c[0]===-1/0?n[0]=f:c[1]===1/0?n[1]=f:i.push({value:c[0],color:f},{value:c[1],color:f})}var o=this._pieceList.slice();if(!o.length)o.push({interval:[-1/0,1/0]});else{var l=o[0].interval[0];l!==-1/0&&o.unshift({interval:[-1/0,l]}),l=o[o.length-1].interval[1],l!==1/0&&o.push({interval:[l,1/0]})}var u=-1/0;return R(o,function(c){var h=c.interval;h&&(h[0]>u&&s([u,h[0]],"outOfRange"),s(h.slice()),u=h[1])},this),{stops:i,outerColors:n}},e.type="visualMap.piecewise",e.defaultOption=ml(P_.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e}(P_),CAe={splitNumber:function(r){var e=this.option,t=Math.min(e.precision,20),i=this.getExtent(),n=e.splitNumber;n=Math.max(parseInt(n,10),1),e.splitNumber=n;for(var a=(i[1]-i[0])/n;+a.toFixed(t)!==a&&t<5;)t++;e.precision=t,a=+a.toFixed(t),e.minOpen&&r.push({interval:[-1/0,i[0]],close:[0,0]});for(var s=0,o=i[0];s<n;o+=a,s++){var l=s===n-1?i[1]:o+a;r.push({interval:[o,l],close:[1,1]})}e.maxOpen&&r.push({interval:[i[1],1/0],close:[0,0]}),c2(r),R(r,function(u,c){u.index=c,u.text=this.formatValueText(u.interval)},this)},categories:function(r){var e=this.option;R(e.categories,function(t){r.push({text:this.formatValueText(t,!0),value:t})},this),A5(e,r)},pieces:function(r){var e=this.option;R(e.pieces,function(t,i){Ae(t)||(t={value:t});var n={text:"",index:i};if(t.label!=null&&(n.text=t.label),t.hasOwnProperty("value")){var a=n.value=t.value;n.interval=[a,a],n.close=[1,1]}else{for(var s=n.interval=[],o=n.close=[0,0],l=[1,0,1],u=[-1/0,1/0],c=[],h=0;h<2;h++){for(var d=[["gte","gt","min"],["lte","lt","max"]][h],f=0;f<3&&s[h]==null;f++)s[h]=t[d[f]],o[h]=l[f],c[h]=f===2;s[h]==null&&(s[h]=u[h])}c[0]&&s[1]===1/0&&(o[0]=0),c[1]&&s[0]===-1/0&&(o[1]=0),s[0]===s[1]&&o[0]&&o[1]&&(n.value=s[0])}n.visual=Nr.retrieveVisuals(t),r.push(n)},this),A5(e,r),c2(r),R(r,function(t){var i=t.close,n=[["<","≤"][i[1]],[">","≥"][i[0]]];t.text=t.text||this.formatValueText(t.value!=null?t.value:t.interval,!1,n)},this)}};function A5(r,e){var t=r.inverse;(r.orient==="vertical"?!t:t)&&e.reverse()}var AAe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.doRender=function(){var t=this.group;t.removeAll();var i=this.visualMapModel,n=i.get("textGap"),a=i.textStyleModel,s=a.getFont(),o=a.getTextColor(),l=this._getItemAlign(),u=i.itemSize,c=this._getViewData(),h=c.endsText,d=Rr(i.get("showLabel",!0),!h);h&&this._renderEndsText(t,h[0],u,d,l),R(c.viewPieceList,function(f){var p=f.piece,v=new Le;v.onclick=ge(this._onItemClick,this,p),this._enableHoverLink(v,f.indexInModelPieceList);var g=i.getRepresentValue(p);if(this._createItemSymbol(v,g,[0,0,u[0],u[1]]),d){var m=this.visualMapModel.getValueState(g);v.add(new nt({style:{x:l==="right"?-n:u[0]+n,y:u[1]/2,text:p.text,verticalAlign:"middle",align:l,font:s,fill:o,opacity:m==="outOfRange"?.5:1}}))}t.add(v)},this),h&&this._renderEndsText(t,h[1],u,d,l),ju(i.get("orient"),t,i.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,i){var n=this;t.on("mouseover",function(){return a("highlight")}).on("mouseout",function(){return a("downplay")});var a=function(s){var o=n.visualMapModel;o.option.hoverLink&&n.api.dispatchAction({type:s,batch:Ky(o.findTargetDataIndices(i),o)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,i=t.option;if(i.orient==="vertical")return BX(t,this.api,t.itemSize);var n=i.align;return(!n||n==="auto")&&(n="left"),n},e.prototype._renderEndsText=function(t,i,n,a,s){if(i){var o=new Le,l=this.visualMapModel.textStyleModel;o.add(new nt({style:Mt(l,{x:a?s==="right"?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:a?s:"center",text:i})})),t.add(o)}},e.prototype._getViewData=function(){var t=this.visualMapModel,i=ae(t.getPieceList(),function(o,l){return{piece:o,indexInModelPieceList:l}}),n=t.get("text"),a=t.get("orient"),s=t.get("inverse");return(a==="horizontal"?s:!s)?i.reverse():n&&(n=n.slice().reverse()),{viewPieceList:i,endsText:n}},e.prototype._createItemSymbol=function(t,i,n){t.add(cr(this.getControllerVisual(i,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(i,"color")))},e.prototype._onItemClick=function(t){var i=this.visualMapModel,n=i.option,a=n.selectedMode;if(a){var s=Ee(n.selected),o=i.getSelectedMapKey(t);a==="single"||a===!0?(s[o]=!0,R(s,function(l,u){s[u]=u===o})):s[o]=!s[o],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:s})}},e.type="visualMap.piecewise",e}(NX);function VX(r){r.registerComponentModel(wAe),r.registerComponentView(AAe),FX(r)}function DAe(r){Ye(UX),Ye(VX)}var EAe={label:{enabled:!0},decal:{show:!1}},D5=lt(),IAe={};function PAe(r,e){var t=r.getModel("aria");if(!t.get("enabled"))return;var i=Ee(EAe);He(i.label,r.getLocaleModel().get("aria"),!1),He(t.option,i,!1),n(),a();function n(){var u=t.getModel("decal"),c=u.get("show");if(c){var h=be();r.eachSeries(function(d){if(!d.isColorBySeries()){var f=h.get(d.type);f||(f={},h.set(d.type,f)),D5(d).scope=f}}),r.eachRawSeries(function(d){if(r.isSeriesFiltered(d))return;if(xe(d.enableAriaDecal)){d.enableAriaDecal();return}var f=d.getData();if(d.isColorBySeries()){var y=A2(d.ecModel,d.name,IAe,r.getSeriesCount()),_=f.getVisual("decal");f.setVisual("decal",b(_,y))}else{var p=d.getRawData(),v={},g=D5(d).scope;f.each(function(T){var x=f.getRawIndex(T);v[x]=T});var m=p.count();p.each(function(T){var x=v[T],C=p.getName(T)||T+"",D=A2(d.ecModel,C,g,m),I=f.getItemVisual(x,"decal");f.setItemVisual(x,"decal",b(I,D))})}function b(T,x){var C=T?Q(Q({},x),T):x;return C.dirty=!0,C}})}}function a(){var u=e.getZr().dom;if(u){var c=r.getLocaleModel().get("aria"),h=t.getModel("label");if(h.option=Ce(h.option,c),!!h.get("enabled")){if(h.get("description")){u.setAttribute("aria-label",h.get("description"));return}var d=r.getSeriesCount(),f=h.get(["data","maxCount"])||10,p=h.get(["series","maxCount"])||10,v=Math.min(d,p),g;if(!(d<1)){var m=o();if(m){var y=h.get(["general","withTitle"]);g=s(y,{title:m})}else g=h.get(["general","withoutTitle"]);var _=[],b=d>1?h.get(["series","multiple","prefix"]):h.get(["series","single","prefix"]);g+=s(b,{seriesCount:d}),r.eachSeries(function(D,I){if(I<v){var M=void 0,L=D.get("name"),N=L?"withName":"withoutName";M=d>1?h.get(["series","multiple",N]):h.get(["series","single",N]),M=s(M,{seriesId:D.seriesIndex,seriesName:D.get("name"),seriesType:l(D.subType)});var O=D.getData();if(O.count()>f){var B=h.get(["data","partialData"]);M+=s(B,{displayCnt:f})}else M+=h.get(["data","allData"]);for(var F=h.get(["data","separator","middle"]),U=h.get(["data","separator","end"]),$=[],q=0;q<O.count();q++)if(q<f){var Z=O.getName(q),te=O.getValues(q),J=h.get(["data",Z?"withName":"withoutName"]);$.push(s(J,{name:Z,value:te.join(F)}))}M+=$.join(F)+U,_.push(M)}});var T=h.getModel(["series","multiple","separator"]),x=T.get("middle"),C=T.get("end");g+=_.join(x)+C,u.setAttribute("aria-label",g)}}}}function s(u,c){if(!de(u))return u;var h=u;return R(c,function(d,f){h=h.replace(new RegExp("\\{\\s*"+f+"\\s*\\}","g"),d)}),h}function o(){var u=r.get("title");return u&&u.length&&(u=u[0]),u&&u.text}function l(u){var c=r.getLocaleModel().get(["series","typeNames"]);return c[u]||c.chart}}function MAe(r){if(!(!r||!r.aria)){var e=r.aria;e.show!=null&&(e.enabled=e.show),e.label=e.label||{},R(["description","general","series","data"],function(t){e[t]!=null&&(e.label[t]=e[t])})}}function LAe(r){r.registerPreprocessor(MAe),r.registerVisual(r.PRIORITY.VISUAL.ARIA,PAe)}var E5={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},kAe=function(){function r(e){var t=this._condVal=de(e)?new RegExp(e):f9(e)?e:null;if(t==null){var i="";gt(i)}}return r.prototype.evaluate=function(e){var t=typeof e;return de(t)?this._condVal.test(e):ut(t)?this._condVal.test(e+""):!1},r}(),RAe=function(){function r(){}return r.prototype.evaluate=function(){return this.value},r}(),OAe=function(){function r(){}return r.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(!e[t].evaluate())return!1;return!0},r}(),NAe=function(){function r(){}return r.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(e[t].evaluate())return!0;return!1},r}(),BAe=function(){function r(){}return r.prototype.evaluate=function(){return!this.child.evaluate()},r}(),FAe=function(){function r(){}return r.prototype.evaluate=function(){for(var e=!!this.valueParser,t=this.getValue,i=t(this.valueGetterParam),n=e?this.valueParser(i):null,a=0;a<this.subCondList.length;a++)if(!this.subCondList[a].evaluate(e?n:i))return!1;return!0},r}();function DI(r,e){if(r===!0||r===!1){var t=new RAe;return t.value=r,t}var i="";return zX(r)||gt(i),r.and?I5("and",r,e):r.or?I5("or",r,e):r.not?UAe(r,e):VAe(r,e)}function I5(r,e,t){var i=e[r],n="";ie(i)||gt(n),i.length||gt(n);var a=r==="and"?new OAe:new NAe;return a.children=ae(i,function(s){return DI(s,t)}),a.children.length||gt(n),a}function UAe(r,e){var t=r.not,i="";zX(t)||gt(i);var n=new BAe;return n.child=DI(t,e),n.child||gt(i),n}function VAe(r,e){for(var t="",i=e.prepareGetValue(r),n=[],a=rt(r),s=r.parser,o=s?b$(s):null,l=0;l<a.length;l++){var u=a[l];if(!(u==="parser"||e.valueGetterAttrMap.get(u))){var c=ye(E5,u)?E5[u]:u,h=r[u],d=o?o(h):h,f=dde(c,d)||c==="reg"&&new kAe(d);f||gt(t),n.push(f)}}n.length||gt(t);var p=new FAe;return p.valueGetterParam=i,p.valueParser=o,p.getValue=e.getValue,p.subCondList=n,p}function zX(r){return Ae(r)&&!Jr(r)}var zAe=function(){function r(e,t){this._cond=DI(e,t)}return r.prototype.evaluate=function(){return this._cond.evaluate()},r}();function GAe(r,e){return new zAe(r,e)}var HAe={type:"echarts:filter",transform:function(r){for(var e=r.upstream,t,i=GAe(r.config,{valueGetterAttrMap:be({dimension:!0}),prepareGetValue:function(o){var l="",u=o.dimension;ye(o,"dimension")||gt(l);var c=e.getDimensionInfo(u);return c||gt(l),{dimIdx:c.index}},getValue:function(o){return e.retrieveValueFromItem(t,o.dimIdx)}}),n=[],a=0,s=e.count();a<s;a++)t=e.getRawDataItem(a),i.evaluate()&&n.push(t);return{data:n}}},$Ae={type:"echarts:sort",transform:function(r){var e=r.upstream,t=r.config,i="",n=wt(t);n.length||gt(i);var a=[];R(n,function(c){var h=c.dimension,d=c.order,f=c.parser,p=c.incomparable;if(h==null&>(i),d!=="asc"&&d!=="desc"&>(i),p&&p!=="min"&&p!=="max"){var v="";gt(v)}if(d!=="asc"&&d!=="desc"){var g="";gt(g)}var m=e.getDimensionInfo(h);m||gt(i);var y=f?b$(f):null;f&&!y&>(i),a.push({dimIdx:m.index,parser:y,comparator:new T$(d,p)})});var s=e.sourceFormat;s!==vi&&s!==na&>(i);for(var o=[],l=0,u=e.count();l<u;l++)o.push(e.getRawDataItem(l));return o.sort(function(c,h){for(var d=0;d<a.length;d++){var f=a[d],p=e.retrieveValueFromItem(c,f.dimIdx),v=e.retrieveValueFromItem(h,f.dimIdx);f.parser&&(p=f.parser(p),v=f.parser(v));var g=f.comparator.evaluate(p,v);if(g!==0)return g}return 0}),{data:o}}};function WAe(r){r.registerTransform(HAe),r.registerTransform($Ae)}var qAe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataset",t}return e.prototype.init=function(t,i,n){r.prototype.init.call(this,t,i,n),this._sourceManager=new A$(this),kR(this)},e.prototype.mergeOption=function(t,i){r.prototype.mergeOption.call(this,t,i),kR(this)},e.prototype.optionUpdated=function(){this._sourceManager.dirty()},e.prototype.getSourceManager=function(){return this._sourceManager},e.type="dataset",e.defaultOption={seriesLayoutBy:ls},e}(Qe),jAe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataset",t}return e.type="dataset",e}(Nt);function XAe(r){r.registerComponentModel(qAe),r.registerComponentView(jAe)}var Ua=gs.CMD;function Dh(r,e){return Math.abs(r-e)<1e-5}function EC(r){var e=r.data,t=r.len(),i=[],n,a=0,s=0,o=0,l=0;function u(O,B){n&&n.length>2&&i.push(n),n=[O,B]}function c(O,B,F,U){Dh(O,F)&&Dh(B,U)||n.push(O,B,F,U,F,U)}function h(O,B,F,U,$,q){var Z=Math.abs(B-O),te=Math.tan(Z/4)*4/3,J=B<O?-1:1,oe=Math.cos(O),he=Math.sin(O),ue=Math.cos(B),Ie=Math.sin(B),Oe=oe*$+F,Ue=he*q+U,me=ue*$+F,ze=Ie*q+U,Pe=$*te*J,_e=q*te*J;n.push(Oe-Pe*he,Ue+_e*oe,me+Pe*Ie,ze-_e*ue,me,ze)}for(var d,f,p,v,g=0;g<t;){var m=e[g++],y=g===1;switch(y&&(a=e[g],s=e[g+1],o=a,l=s,(m===Ua.L||m===Ua.C||m===Ua.Q)&&(n=[o,l])),m){case Ua.M:a=o=e[g++],s=l=e[g++],u(o,l);break;case Ua.L:d=e[g++],f=e[g++],c(a,s,d,f),a=d,s=f;break;case Ua.C:n.push(e[g++],e[g++],e[g++],e[g++],a=e[g++],s=e[g++]);break;case Ua.Q:d=e[g++],f=e[g++],p=e[g++],v=e[g++],n.push(a+2/3*(d-a),s+2/3*(f-s),p+2/3*(d-p),v+2/3*(f-v),p,v),a=p,s=v;break;case Ua.A:var _=e[g++],b=e[g++],T=e[g++],x=e[g++],C=e[g++],D=e[g++]+C;g+=1;var I=!e[g++];d=Math.cos(C)*T+_,f=Math.sin(C)*x+b,y?(o=d,l=f,u(o,l)):c(a,s,d,f),a=Math.cos(D)*T+_,s=Math.sin(D)*x+b;for(var M=(I?-1:1)*Math.PI/2,L=C;I?L>D:L<D;L+=M){var N=I?Math.max(L+M,D):Math.min(L+M,D);h(L,N,_,b,T,x)}break;case Ua.R:o=a=e[g++],l=s=e[g++],d=o+e[g++],f=l+e[g++],u(d,l),c(d,l,d,f),c(d,f,o,f),c(o,f,o,l),c(o,l,d,l);break;case Ua.Z:n&&c(a,s,o,l),a=o,s=l;break}}return n&&n.length>2&&i.push(n),i}function IC(r,e,t,i,n,a,s,o,l,u){if(Dh(r,t)&&Dh(e,i)&&Dh(n,s)&&Dh(a,o)){l.push(s,o);return}var c=2/u,h=c*c,d=s-r,f=o-e,p=Math.sqrt(d*d+f*f);d/=p,f/=p;var v=t-r,g=i-e,m=n-s,y=a-o,_=v*v+g*g,b=m*m+y*y;if(_<h&&b<h){l.push(s,o);return}var T=d*v+f*g,x=-d*m-f*y,C=_-T*T,D=b-x*x;if(C<h&&T>=0&&D<h&&x>=0){l.push(s,o);return}var I=[],M=[];sl(r,t,n,s,.5,I),sl(e,i,a,o,.5,M),IC(I[0],M[0],I[1],M[1],I[2],M[2],I[3],M[3],l,u),IC(I[4],M[4],I[5],M[5],I[6],M[6],I[7],M[7],l,u)}function YAe(r,e){var t=EC(r),i=[];e=e||1;for(var n=0;n<t.length;n++){var a=t[n],s=[],o=a[0],l=a[1];s.push(o,l);for(var u=2;u<a.length;){var c=a[u++],h=a[u++],d=a[u++],f=a[u++],p=a[u++],v=a[u++];IC(o,l,c,h,d,f,p,v,s,e),o=p,l=v}i.push(s)}return i}function GX(r,e,t){var i=r[e],n=r[1-e],a=Math.abs(i/n),s=Math.ceil(Math.sqrt(a*t)),o=Math.floor(t/s);o===0&&(o=1,s=t);for(var l=[],u=0;u<s;u++)l.push(o);var c=s*o,h=t-c;if(h>0)for(var u=0;u<h;u++)l[u%s]+=1;return l}function P5(r,e,t){for(var i=r.r0,n=r.r,a=r.startAngle,s=r.endAngle,o=Math.abs(s-a),l=o*n,u=n-i,c=l>Math.abs(u),h=GX([l,u],c?0:1,e),d=(c?o:u)/h.length,f=0;f<h.length;f++)for(var p=(c?u:o)/h[f],v=0;v<h[f];v++){var g={};c?(g.startAngle=a+d*f,g.endAngle=a+d*(f+1),g.r0=i+p*v,g.r=i+p*(v+1)):(g.startAngle=a+p*v,g.endAngle=a+p*(v+1),g.r0=i+d*f,g.r=i+d*(f+1)),g.clockwise=r.clockwise,g.cx=r.cx,g.cy=r.cy,t.push(g)}}function KAe(r,e,t){for(var i=r.width,n=r.height,a=i>n,s=GX([i,n],a?0:1,e),o=a?"width":"height",l=a?"height":"width",u=a?"x":"y",c=a?"y":"x",h=r[o]/s.length,d=0;d<s.length;d++)for(var f=r[l]/s[d],p=0;p<s[d];p++){var v={};v[u]=d*h,v[c]=p*f,v[o]=h,v[l]=f,v.x+=r.x,v.y+=r.y,t.push(v)}}function M5(r,e,t,i){return r*i-t*e}function ZAe(r,e,t,i,n,a,s,o){var l=t-r,u=i-e,c=s-n,h=o-a,d=M5(c,h,l,u);if(Math.abs(d)<1e-6)return null;var f=r-n,p=e-a,v=M5(f,p,c,h)/d;return v<0||v>1?null:new $e(v*l+r,v*u+e)}function QAe(r,e,t){var i=new $e;$e.sub(i,t,e),i.normalize();var n=new $e;$e.sub(n,r,e);var a=n.dot(i);return a}function oh(r,e){var t=r[r.length-1];t&&t[0]===e[0]&&t[1]===e[1]||r.push(e)}function JAe(r,e,t){for(var i=r.length,n=[],a=0;a<i;a++){var s=r[a],o=r[(a+1)%i],l=ZAe(s[0],s[1],o[0],o[1],e.x,e.y,t.x,t.y);l&&n.push({projPt:QAe(l,e,t),pt:l,idx:a})}if(n.length<2)return[{points:r},{points:r}];n.sort(function(g,m){return g.projPt-m.projPt});var u=n[0],c=n[n.length-1];if(c.idx<u.idx){var h=u;u=c,c=h}for(var d=[u.pt.x,u.pt.y],f=[c.pt.x,c.pt.y],p=[d],v=[f],a=u.idx+1;a<=c.idx;a++)oh(p,r[a].slice());oh(p,f),oh(p,d);for(var a=c.idx+1;a<=u.idx+i;a++)oh(v,r[a%i].slice());return oh(v,d),oh(v,f),[{points:p},{points:v}]}function L5(r){var e=r.points,t=[],i=[];P1(e,t,i);var n=new We(t[0],t[1],i[0]-t[0],i[1]-t[1]),a=n.width,s=n.height,o=n.x,l=n.y,u=new $e,c=new $e;return a>s?(u.x=c.x=o+a/2,u.y=l,c.y=l+s):(u.y=c.y=l+s/2,u.x=o,c.x=o+a),JAe(e,u,c)}function M_(r,e,t,i){if(t===1)i.push(e);else{var n=Math.floor(t/2),a=r(e);M_(r,a[0],n,i),M_(r,a[1],t-n,i)}return i}function eDe(r,e){for(var t=[],i=0;i<e;i++)t.push(RD(r));return t}function tDe(r,e){e.setStyle(r.style),e.z=r.z,e.z2=r.z2,e.zlevel=r.zlevel}function rDe(r){for(var e=[],t=0;t<r.length;)e.push([r[t++],r[t++]]);return e}function iDe(r,e){var t=[],i=r.shape,n;switch(r.type){case"rect":KAe(i,e,t),n=at;break;case"sector":P5(i,e,t),n=di;break;case"circle":P5({r0:0,r:i.r,startAngle:0,endAngle:Math.PI*2,cx:i.cx,cy:i.cy},e,t),n=di;break;default:var a=r.getComputedTransform(),s=a?Math.sqrt(Math.max(a[0]*a[0]+a[1]*a[1],a[2]*a[2]+a[3]*a[3])):1,o=ae(YAe(r.getUpdatedPathProxy(),s),function(m){return rDe(m)}),l=o.length;if(l===0)M_(L5,{points:o[0]},e,t);else if(l===e)for(var u=0;u<l;u++)t.push({points:o[u]});else{var c=0,h=ae(o,function(m){var y=[],_=[];P1(m,y,_);var b=(_[1]-y[1])*(_[0]-y[0]);return c+=b,{poly:m,area:b}});h.sort(function(m,y){return y.area-m.area});for(var d=e,u=0;u<l;u++){var f=h[u];if(d<=0)break;var p=u===l-1?d:Math.ceil(f.area/c*e);p<0||(M_(L5,{points:f.poly},p,t),d-=p)}}n=pi;break}if(!n)return eDe(r,e);for(var v=[],u=0;u<t.length;u++){var g=new n;g.setShape(t[u]),tDe(r,g),v.push(g)}return v}function nDe(r,e){var t=r.length,i=e.length;if(t===i)return[r,e];for(var n=[],a=[],s=t<i?r:e,o=Math.min(t,i),l=Math.abs(i-t)/6,u=(o-2)/6,c=Math.ceil(l/u)+1,h=[s[0],s[1]],d=l,f=2;f<o;){var p=s[f-2],v=s[f-1],g=s[f++],m=s[f++],y=s[f++],_=s[f++],b=s[f++],T=s[f++];if(d<=0){h.push(g,m,y,_,b,T);continue}for(var x=Math.min(d,c-1)+1,C=1;C<=x;C++){var D=C/x;sl(p,g,y,b,D,n),sl(v,m,_,T,D,a),p=n[3],v=a[3],h.push(n[1],a[1],n[2],a[2],p,v),g=n[5],m=a[5],y=n[6],_=a[6]}d-=x-1}return s===r?[h,e]:[r,h]}function k5(r,e){for(var t=r.length,i=r[t-2],n=r[t-1],a=[],s=0;s<e.length;)a[s++]=i,a[s++]=n;return a}function aDe(r,e){for(var t,i,n,a=[],s=[],o=0;o<Math.max(r.length,e.length);o++){var l=r[o],u=e[o],c=void 0,h=void 0;l?u?(t=nDe(l,u),c=t[0],h=t[1],i=c,n=h):(h=k5(n||l,l),c=l):(c=k5(i||u,u),h=u),a.push(c),s.push(h)}return[a,s]}function R5(r){for(var e=0,t=0,i=0,n=r.length,a=0,s=n-2;a<n;s=a,a+=2){var o=r[s],l=r[s+1],u=r[a],c=r[a+1],h=o*c-u*l;e+=h,t+=(o+u)*h,i+=(l+c)*h}return e===0?[r[0]||0,r[1]||0]:[t/e/3,i/e/3,e]}function sDe(r,e,t,i){for(var n=(r.length-2)/6,a=1/0,s=0,o=r.length,l=o-2,u=0;u<n;u++){for(var c=u*6,h=0,d=0;d<o;d+=2){var f=d===0?c:(c+d-2)%l+2,p=r[f]-t[0],v=r[f+1]-t[1],g=e[d]-i[0],m=e[d+1]-i[1],y=g-p,_=m-v;h+=y*y+_*_}h<a&&(a=h,s=u)}return s}function oDe(r){for(var e=[],t=r.length,i=0;i<t;i+=2)e[i]=r[t-i-2],e[i+1]=r[t-i-1];return e}function lDe(r,e,t,i){for(var n=[],a,s=0;s<r.length;s++){var o=r[s],l=e[s],u=R5(o),c=R5(l);a==null&&(a=u[2]<0!=c[2]<0);var h=[],d=[],f=0,p=1/0,v=[],g=o.length;a&&(o=oDe(o));for(var m=sDe(o,l,u,c)*6,y=g-2,_=0;_<y;_+=2){var b=(m+_)%y+2;h[_+2]=o[b]-u[0],h[_+3]=o[b+1]-u[1]}h[0]=o[m]-u[0],h[1]=o[m+1]-u[1];for(var T=i/t,x=-i/2;x<=i/2;x+=T){for(var C=Math.sin(x),D=Math.cos(x),I=0,_=0;_<o.length;_+=2){var M=h[_],L=h[_+1],N=l[_]-c[0],O=l[_+1]-c[1],B=N*D-O*C,F=N*C+O*D;v[_]=B,v[_+1]=F;var U=B-M,$=F-L;I+=U*U+$*$}if(I<p){p=I,f=x;for(var q=0;q<v.length;q++)d[q]=v[q]}}n.push({from:h,to:d,fromCp:u,toCp:c,rotation:-f})}return n}function L_(r){return r.__isCombineMorphing}var HX="__mOriginal_";function k_(r,e,t){var i=HX+e,n=r[i]||r[e];r[i]||(r[i]=r[e]);var a=t.replace,s=t.after,o=t.before;r[e]=function(){var l=arguments,u;return o&&o.apply(this,l),a?u=a.apply(this,l):u=n.apply(this,l),s&&s.apply(this,l),u}}function iv(r,e){var t=HX+e;r[t]&&(r[e]=r[t],r[t]=null)}function O5(r,e){for(var t=0;t<r.length;t++)for(var i=r[t],n=0;n<i.length;){var a=i[n],s=i[n+1];i[n++]=e[0]*a+e[2]*s+e[4],i[n++]=e[1]*a+e[3]*s+e[5]}}function $X(r,e){var t=r.getUpdatedPathProxy(),i=e.getUpdatedPathProxy(),n=aDe(EC(t),EC(i)),a=n[0],s=n[1],o=r.getComputedTransform(),l=e.getComputedTransform();function u(){this.transform=null}o&&O5(a,o),l&&O5(s,l),k_(e,"updateTransform",{replace:u}),e.transform=null;var c=lDe(a,s,10,Math.PI),h=[];k_(e,"buildPath",{replace:function(d){for(var f=e.__morphT,p=1-f,v=[],g=0;g<c.length;g++){var m=c[g],y=m.from,_=m.to,b=m.rotation*f,T=m.fromCp,x=m.toCp,C=Math.sin(b),D=Math.cos(b);Hp(v,T,x,f);for(var I=0;I<y.length;I+=2){var M=y[I],L=y[I+1],N=_[I],O=_[I+1],B=M*p+N*f,F=L*p+O*f;h[I]=B*D-F*C+v[0],h[I+1]=B*C+F*D+v[1]}var U=h[0],$=h[1];d.moveTo(U,$);for(var I=2;I<y.length;){var N=h[I++],O=h[I++],q=h[I++],Z=h[I++],te=h[I++],J=h[I++];U===N&&$===O&&q===te&&Z===J?d.lineTo(te,J):d.bezierCurveTo(N,O,q,Z,te,J),U=te,$=J}}}})}function EI(r,e,t){if(!r||!e)return e;var i=t.done,n=t.during;$X(r,e),e.__morphT=0;function a(){iv(e,"buildPath"),iv(e,"updateTransform"),e.__morphT=-1,e.createPathProxy(),e.dirtyShape()}return e.animateTo({__morphT:1},Ce({during:function(s){e.dirtyShape(),n&&n(s)},done:function(){a(),i&&i()}},t)),e}function uDe(r,e,t,i,n,a){var s=16;r=n===t?0:Math.round(32767*(r-t)/(n-t)),e=a===i?0:Math.round(32767*(e-i)/(a-i));for(var o=0,l,u=(1<<s)/2;u>0;u/=2){var c=0,h=0;(r&u)>0&&(c=1),(e&u)>0&&(h=1),o+=u*u*(3*c^h),h===0&&(c===1&&(r=u-1-r,e=u-1-e),l=r,r=e,e=l)}return o}function R_(r){var e=1/0,t=1/0,i=-1/0,n=-1/0,a=ae(r,function(o){var l=o.getBoundingRect(),u=o.getComputedTransform(),c=l.x+l.width/2+(u?u[4]:0),h=l.y+l.height/2+(u?u[5]:0);return e=Math.min(c,e),t=Math.min(h,t),i=Math.max(c,i),n=Math.max(h,n),[c,h]}),s=ae(a,function(o,l){return{cp:o,z:uDe(o[0],o[1],e,t,i,n),path:r[l]}});return s.sort(function(o,l){return o.z-l.z}).map(function(o){return o.path})}function WX(r){return iDe(r.path,r.count)}function PC(){return{fromIndividuals:[],toIndividuals:[],count:0}}function cDe(r,e,t){var i=[];function n(T){for(var x=0;x<T.length;x++){var C=T[x];L_(C)?n(C.childrenRef()):C instanceof Je&&i.push(C)}}n(r);var a=i.length;if(!a)return PC();var s=t.dividePath||WX,o=s({path:e,count:a});if(o.length!==a)return console.error("Invalid morphing: unmatched splitted path"),PC();i=R_(i),o=R_(o);for(var l=t.done,u=t.during,c=t.individualDelay,h=new Vs,d=0;d<a;d++){var f=i[d],p=o[d];p.parent=e,p.copyTransform(h),c||$X(f,p)}e.__isCombineMorphing=!0,e.childrenRef=function(){return o};function v(T){for(var x=0;x<o.length;x++)o[x].addSelfToZr(T)}k_(e,"addSelfToZr",{after:function(T){v(T)}}),k_(e,"removeSelfFromZr",{after:function(T){for(var x=0;x<o.length;x++)o[x].removeSelfFromZr(T)}});function g(){e.__isCombineMorphing=!1,e.__morphT=-1,e.childrenRef=null,iv(e,"addSelfToZr"),iv(e,"removeSelfFromZr")}var m=o.length;if(c)for(var y=m,_=function(){y--,y===0&&(g(),l&&l())},d=0;d<m;d++){var b=c?Ce({delay:(t.delay||0)+c(d,m,i[d],o[d]),done:_},t):t;EI(i[d],o[d],b)}else e.__morphT=0,e.animateTo({__morphT:1},Ce({during:function(T){for(var x=0;x<m;x++){var C=o[x];C.__morphT=e.__morphT,C.dirtyShape()}u&&u(T)},done:function(){g();for(var T=0;T<r.length;T++)iv(r[T],"updateTransform");l&&l()}},t));return e.__zr&&v(e.__zr),{fromIndividuals:i,toIndividuals:o,count:m}}function hDe(r,e,t){var i=e.length,n=[],a=t.dividePath||WX;function s(f){for(var p=0;p<f.length;p++){var v=f[p];L_(v)?s(v.childrenRef()):v instanceof Je&&n.push(v)}}if(L_(r)){s(r.childrenRef());var o=n.length;if(o<i)for(var l=0,u=o;u<i;u++)n.push(RD(n[l++%o]));n.length=i}else{n=a({path:r,count:i});for(var c=r.getComputedTransform(),u=0;u<n.length;u++)n[u].setLocalTransform(c);if(n.length!==i)return console.error("Invalid morphing: unmatched splitted path"),PC()}n=R_(n),e=R_(e);for(var h=t.individualDelay,u=0;u<i;u++){var d=h?Ce({delay:(t.delay||0)+h(u,i,n[u],e[u])},t):t;EI(n[u],e[u],d)}return{fromIndividuals:n,toIndividuals:e,count:e.length}}function N5(r){return ie(r[0])}function B5(r,e){for(var t=[],i=r.length,n=0;n<i;n++)t.push({one:r[n],many:[]});for(var n=0;n<e.length;n++){var a=e[n].length,s=void 0;for(s=0;s<a;s++)t[s%i].many.push(e[n][s])}for(var o=0,n=i-1;n>=0;n--)if(!t[n].many.length){var l=t[o].many;if(l.length<=1)if(o)o=0;else return t;var a=l.length,u=Math.ceil(a/2);t[n].many=l.slice(u,a),t[o].many=l.slice(0,u),o++}return t}var fDe={clone:function(r){for(var e=[],t=1-Math.pow(1-r.path.style.opacity,1/r.count),i=0;i<r.count;i++){var n=RD(r.path);n.setStyle("opacity",t),e.push(n)}return e},split:null};function Ox(r,e,t,i,n,a){if(!r.length||!e.length)return;var s=Hf("update",i,n);if(!(s&&s.duration>0))return;var o=i.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},s),u,c;N5(r)&&(u=r,c=e),N5(e)&&(u=e,c=r);function h(m,y,_,b,T){var x=m.many,C=m.one;if(x.length===1&&!T){var D=y?x[0]:C,I=y?C:x[0];if(L_(D))h({many:[D],one:I},!0,_,b,!0);else{var M=o?Ce({delay:o(_,b)},l):l;EI(D,I,M),a(D,I,D,I,M)}}else for(var L=Ce({dividePath:fDe[t],individualDelay:o&&function($,q,Z,te){return o($+_,b)}},l),N=y?cDe(x,C,L):hDe(C,x,L),O=N.fromIndividuals,B=N.toIndividuals,F=O.length,U=0;U<F;U++){var M=o?Ce({delay:o(U,F)},l):l;a(O[U],B[U],y?x[U]:m.one,y?m.one:x[U],M)}}for(var d=u?u===r:r.length>e.length,f=u?B5(c,u):B5(d?e:r,[d?r:e]),p=0,v=0;v<f.length;v++)p+=f[v].many.length;for(var g=0,v=0;v<f.length;v++)h(f[v],d,g,p),g+=f[v].many.length}function hu(r){if(!r)return[];if(ie(r)){for(var e=[],t=0;t<r.length;t++)e.push(hu(r[t]));return e}var i=[];return r.traverse(function(n){n instanceof Je&&!n.disableMorphing&&!n.invisible&&!n.ignore&&i.push(n)}),i}var qX=1e4,dDe=0,F5=1,U5=2,pDe=lt();function vDe(r,e){for(var t=r.dimensions,i=0;i<t.length;i++){var n=r.getDimensionInfo(t[i]);if(n&&n.otherDims[e]===0)return t[i]}}function gDe(r,e,t){var i=r.getDimensionInfo(t),n=i&&i.ordinalMeta;if(i){var a=r.get(i.name,e);return n&&n.categories[a]||a+""}}function V5(r,e,t,i){var n=i?"itemChildGroupId":"itemGroupId",a=vDe(r,n);if(a){var s=gDe(r,e,a);return s}var o=r.getRawDataItem(e),l=i?"childGroupId":"groupId";if(o&&o[l])return o[l]+"";if(!i)return t||r.getId(e)}function z5(r){var e=[];return R(r,function(t){var i=t.data,n=t.dataGroupId;if(!(i.count()>qX))for(var a=i.getIndices(),s=0;s<a.length;s++)e.push({data:i,groupId:V5(i,s,n,!1),childGroupId:V5(i,s,n,!0),divide:t.divide,dataIndex:s})}),e}function Nx(r,e,t){r.traverse(function(i){i instanceof Je&&Bt(i,{style:{opacity:0}},e,{dataIndex:t,isFrom:!0})})}function Bx(r){if(r.parent){var e=r.getComputedTransform();r.setLocalTransform(e),r.parent.remove(r)}}function lh(r){r.stopAnimation(),r.isGroup&&r.traverse(function(e){e.stopAnimation()})}function mDe(r,e,t){var i=Hf("update",t,e);i&&r.traverse(function(n){if(n instanceof Jn){var a=Zhe(n);a&&n.animateFrom({style:a},i)}})}function yDe(r,e){var t=r.length;if(t!==e.length)return!1;for(var i=0;i<t;i++){var n=r[i],a=e[i];if(n.data.getId(n.dataIndex)!==a.data.getId(a.dataIndex))return!1}return!0}function jX(r,e,t){var i=z5(r),n=z5(e);function a(_,b,T,x,C){(T||_)&&b.animateFrom({style:T&&T!==_?Q(Q({},T.style),_.style):_.style},C)}var s=!1,o=dDe,l=be(),u=be();i.forEach(function(_){_.groupId&&l.set(_.groupId,!0),_.childGroupId&&u.set(_.childGroupId,!0)});for(var c=0;c<n.length;c++){var h=n[c].groupId;if(u.get(h)){o=F5;break}var d=n[c].childGroupId;if(d&&l.get(d)){o=U5;break}}function f(_,b){return function(T){var x=T.data,C=T.dataIndex;return b?x.getId(C):_?o===F5?T.childGroupId:T.groupId:o===U5?T.childGroupId:T.groupId}}var p=yDe(i,n),v={};if(!p)for(var c=0;c<n.length;c++){var g=n[c],m=g.data.getItemGraphicEl(g.dataIndex);m&&(v[m.id]=!0)}function y(_,b){var T=i[b],x=n[_],C=x.data.hostModel,D=T.data.getItemGraphicEl(T.dataIndex),I=x.data.getItemGraphicEl(x.dataIndex);if(D===I){I&&mDe(I,x.dataIndex,C);return}D&&v[D.id]||I&&(lh(I),D?(lh(D),Bx(D),s=!0,Ox(hu(D),hu(I),x.divide,C,_,a)):Nx(I,C,_))}new to(i,n,f(!0,p),f(!1,p),null,"multiple").update(y).updateManyToOne(function(_,b){var T=n[_],x=T.data,C=x.hostModel,D=x.getItemGraphicEl(T.dataIndex),I=_t(ae(b,function(M){return i[M].data.getItemGraphicEl(i[M].dataIndex)}),function(M){return M&&M!==D&&!v[M.id]});D&&(lh(D),I.length?(R(I,function(M){lh(M),Bx(M)}),s=!0,Ox(hu(I),hu(D),T.divide,C,_,a)):Nx(D,C,T.dataIndex))}).updateOneToMany(function(_,b){var T=i[b],x=T.data.getItemGraphicEl(T.dataIndex);if(!(x&&v[x.id])){var C=_t(ae(_,function(I){return n[I].data.getItemGraphicEl(n[I].dataIndex)}),function(I){return I&&I!==x}),D=n[_[0]].data.hostModel;C.length&&(R(C,function(I){return lh(I)}),x?(lh(x),Bx(x),s=!0,Ox(hu(x),hu(C),T.divide,D,_[0],a)):R(C,function(I){return Nx(I,D,_[0])}))}}).updateManyToMany(function(_,b){new to(b,_,function(T){return i[T].data.getId(i[T].dataIndex)},function(T){return n[T].data.getId(n[T].dataIndex)}).update(function(T,x){y(_[T],b[x])}).execute()}).execute(),s&&R(e,function(_){var b=_.data,T=b.hostModel,x=T&&t.getViewOfSeriesModel(T),C=Hf("update",T,0);x&&T.isAnimationEnabled()&&C&&C.duration>0&&x.group.traverse(function(D){D instanceof Je&&!D.animators.length&&D.animateFrom({style:{opacity:0}},C)})})}function G5(r){var e=r.getModel("universalTransition").get("seriesKey");return e||r.id}function H5(r){return ie(r)?r.sort().join(","):r}function Ro(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function _De(r,e){var t=be(),i=be(),n=be();return R(r.oldSeries,function(a,s){var o=r.oldDataGroupIds[s],l=r.oldData[s],u=G5(a),c=H5(u);i.set(c,{dataGroupId:o,data:l}),ie(u)&&R(u,function(h){n.set(h,{key:c,dataGroupId:o,data:l})})}),R(e.updatedSeries,function(a){if(a.isUniversalTransitionEnabled()&&a.isAnimationEnabled()){var s=a.get("dataGroupId"),o=a.getData(),l=G5(a),u=H5(l),c=i.get(u);if(c)t.set(u,{oldSeries:[{dataGroupId:c.dataGroupId,divide:Ro(c.data),data:c.data}],newSeries:[{dataGroupId:s,divide:Ro(o),data:o}]});else if(ie(l)){var h=[];R(l,function(p){var v=i.get(p);v.data&&h.push({dataGroupId:v.dataGroupId,divide:Ro(v.data),data:v.data})}),h.length&&t.set(u,{oldSeries:h,newSeries:[{dataGroupId:s,data:o,divide:Ro(o)}]})}else{var d=n.get(l);if(d){var f=t.get(d.key);f||(f={oldSeries:[{dataGroupId:d.dataGroupId,data:d.data,divide:Ro(d.data)}],newSeries:[]},t.set(d.key,f)),f.newSeries.push({dataGroupId:s,data:o,divide:Ro(o)})}}}}),t}function $5(r,e){for(var t=0;t<r.length;t++){var i=e.seriesIndex!=null&&e.seriesIndex===r[t].seriesIndex||e.seriesId!=null&&e.seriesId===r[t].id;if(i)return t}}function bDe(r,e,t,i){var n=[],a=[];R(wt(r.from),function(s){var o=$5(e.oldSeries,s);o>=0&&n.push({dataGroupId:e.oldDataGroupIds[o],data:e.oldData[o],divide:Ro(e.oldData[o]),groupIdDim:s.dimension})}),R(wt(r.to),function(s){var o=$5(t.updatedSeries,s);if(o>=0){var l=t.updatedSeries[o].getData();a.push({dataGroupId:e.oldDataGroupIds[o],data:l,divide:Ro(l),groupIdDim:s.dimension})}}),n.length>0&&a.length>0&&jX(n,a,i)}function SDe(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,i){R(wt(i.seriesTransition),function(n){R(wt(n.to),function(a){for(var s=i.updatedSeries,o=0;o<s.length;o++)(a.seriesIndex!=null&&a.seriesIndex===s[o].seriesIndex||a.seriesId!=null&&a.seriesId===s[o].id)&&(s[o][Hy]=!0)})})}),r.registerUpdateLifecycle("series:transition",function(e,t,i){var n=pDe(t);if(n.oldSeries&&i.updatedSeries&&i.optionChanged){var a=i.seriesTransition;if(a)R(wt(a),function(f){bDe(f,n,i,t)});else{var s=_De(n,i);R(s.keys(),function(f){var p=s.get(f);jX(p.oldSeries,p.newSeries,t)})}R(i.updatedSeries,function(f){f[Hy]&&(f[Hy]=!1)})}for(var o=e.getSeries(),l=n.oldSeries=[],u=n.oldDataGroupIds=[],c=n.oldData=[],h=0;h<o.length;h++){var d=o[h].getData();d.count()<qX&&(l.push(o[h]),u.push(o[h].get("dataGroupId")),c.push(d))}})}Ye([Mme]);Ye([Ame]);Ye([Zme,fye,Tye,t0e,f0e,Q0e,A_e,u1e,M1e,B1e,q1e,Vbe,hSe,TSe,FSe,GSe,QSe,aTe,gTe,TTe,LTe,vxe]);Ye(Rxe);Ye(swe);Ye(Wq);Ye(_we);Ye(Pj);Ye(xwe);Ye(Lwe);Ye(_2e);Ye(F2e);Ye(Og);Ye(tCe);Ye(nCe);Ye(pCe);Ye(SCe);Ye(DCe);Ye(kCe);Ye(HCe);Ye(oAe);Ye(kX);Ye(RX);Ye(DAe);Ye(UX);Ye(VX);Ye(LAe);Ye(WAe);Ye(XAe);Ye(SDe);Ye(qge);const TDe=Object.freeze(Object.defineProperty({__proto__:null,Axis:aa,ChartView:Tt,ComponentModel:Qe,ComponentView:Nt,List:hi,Model:ft,PRIORITY:tW,SeriesModel:Ct,color:mue,connect:tve,dataTool:lve,dependencies:Fpe,disConnect:rve,disconnect:uW,dispose:ive,env:et,extendChartView:kge,extendComponentModel:Pge,extendComponentView:Mge,extendSeriesModel:Lge,format:_ge,getCoordinateSystemDimensions:ave,getInstanceByDom:fE,getInstanceById:nve,getMap:ove,graphic:yge,helper:cge,init:hE,innerDrawElementOnCanvas:oE,matrix:Yle,number:gge,parseGeoJSON:z2,parseGeoJson:z2,registerAction:La,registerCoordinateSystem:fW,registerLayout:dW,registerLoading:mE,registerLocale:HD,registerMap:pW,registerPostInit:cW,registerPostUpdate:hW,registerPreprocessor:pE,registerProcessor:vE,registerTheme:dE,registerTransform:vW,registerUpdateLifecycle:j1,registerVisual:yl,setCanvasCreator:sve,setPlatformAPI:o9,throttle:W1,time:mge,use:Ye,util:bge,vector:Ole,version:Bpe,zrUtil:Ele,zrender:Que},Symbol.toStringTag,{value:"Module"}));window.echarts=TDe;function XX(r){let e=r.getAttribute("id");document.querySelectorAll(".panel").forEach(i=>{i.getAttribute("id")===e+"_panel"?i.hidden=!1:i.hidden=!0})}const xDe=document.querySelectorAll('input[type="radio"]');xDe.forEach(r=>{r.addEventListener("click",e=>{XX(e.target)})});const II=document.getElementById("words-count-track");II.getAttribute("data-time").split(",");const Fx=II.getAttribute("data-words").split(","),YX=hE(II),KX=document.getElementById("topic-track-worte-ctrl");function ZX(){let r=[],e=[],t=[],i=[];Fx.slice(-1);let n=KX.value,a=[],s=Fx.length,o=Math.floor(s/n);for(let c=0;c<s;c+=o){let h=Fx.slice(c,c+o),d=h[0],f=h.map(p=>p-d);a.push(f)}let l=0;a.forEach(c=>{parseInt(c.slice(-1))>l&&(l=c.slice(-1))});for(let c=0;c<n;c++)r.push({left:`${c*(100/n)}%`,top:"0",width:`${100/n}%`,height:"100%"}),e.push({type:"category",gridIndex:c,min:0,axisLabel:{show:!1},axisTick:{show:!1},axisLine:{show:!1}}),t.push({type:"value",gridIndex:c,min:0,max:l,splitLine:{lineStyle:{color:"#aaa"}},axisLabel:{show:!1}}),i.push({type:"line",name:`${c}`,xAxisIndex:c,yAxisIndex:c,data:a[c],showSymbol:!1,lineStyle:{color:"#fff"}});const u={grid:r,xAxis:e,yAxis:t,series:i,tooltip:{trigger:"axis",valueFormatter:c=>"Gesprochene Worte "+new Intl.NumberFormat("de-CH").format(c),formatter:c=>{let h=c[0].componentIndex,d=0;for(let f=0;f<h;f++)d=d+parseInt(u.series[f].data.slice(-1));return d=parseInt(c[0].axisValue)+d,`Segment: ${h+1}<br>Wort: ${d}`}}};YX.setOption(u)}KX.addEventListener("change",r=>{YX.clear(),ZX()});ZX();const sb=document.getElementById("sentiment-track"),wDe=sb.getAttribute("data-time").split(","),CDe=sb.getAttribute("data-sentiments").split(","),ADe=sb.getAttribute("data-weights").split(","),QX=hE(sb),JX={tooltip:{trigger:"axis",position:"top",formatter:r=>{let e=r[0].axisValue,t=r[0].data;return t=t==0?"Neutral":t==1?"Positiv":"Negativ",`Sekunde: ${e}<br>Sentiment: ${t}`}},grid:{show:!1,top:0,bottom:0,right:0,left:0},xAxis:{type:"category",data:wDe},yAxis:{type:"category",data:["-1","0","1"]},series:[{symbolSize:ADe,data:CDe,type:"scatter",itemStyle:{color:r=>r.data==-1?"#d01c8b":r.data==0?"#f7f7f7":"#4dac26"}}]};QX.setOption(JX);const eY=document.getElementById("video");nD.registerPlugin(ic);const Qr=new lr("my-player",{controls:!1,muted:!1,srgOptions:{liveui:!1}});Qr.src({src:eY.getAttribute("data-urn"),type:"srgssr/urn"});const DDe=document.getElementById("timeline-bar-ctrl");eY.addEventListener("click",r=>{Qr.paused()?Qr.play():Qr.pause(),IDe()});const tY=document.getElementById("transcript"),EDe=tY.querySelectorAll("[data-start]");EDe.forEach(r=>{r.addEventListener("click",e=>{Qr.currentTime(e.target.getAttribute("data-start")),Qr.play()})});const MC={timelineIndicatorIsDragged:!1};function IDe(){let e=Qr.duration()/10,t="<span>00:00:00</span>";for(let i=1;i<=10;i++)t+=`<span>${secondsToTimecode(i*e)}</span>`;document.querySelector("#timeline-bar").insertAdjacentHTML("beforeend",t)}function PDe(r){return Qr.duration()/document.getElementById("timeline-bar").offsetWidth*r}Qr.on("timeupdate",r=>{if(!MC.timelineIndicatorIsDragged){let e=document.getElementById("timeline-bar").offsetWidth/Qr.duration()*Qr.currentTime();DDe.style.transform=`translate3d(${e}px, 0px, 0px)`}});document.addEventListener("DOMContentLoaded",r=>{nD.registerPlugin(ic),ic.create("#timeline-bar-ctrl",{type:"x",bounds:document.getElementById("timeline-bar"),onDragStart:function(){MC.timelineIndicatorIsDragged=!0},onDragEnd:function(){Qr.currentTime(PDe(this.x)),Qr.play(),MC.timelineIndicatorIsDragged=!1}})});QX.on("click","series",r=>{Qr.currentTime(JX.xAxis.data[r.dataIndex]),Qr.play()});const rY=document.querySelector("#search"),MDe=document.querySelector("#searchbutton"),uh=document.querySelector("#searchresults");function iY(r){r.length>1?(uh.innerHTML="",tY.querySelectorAll("li").forEach(e=>{let t=e.querySelector("font").innerText.toLowerCase();if(r=r.toLowerCase(),t.includes(r)){let i=e.cloneNode(!0);uh.appendChild(i)}}),uh.querySelector("li")?uh.querySelectorAll("[data-start]").forEach(e=>{e.addEventListener("click",t=>{Qr.currentTime(t.target.getAttribute("data-start")),Qr.play()})}):uh.innerHTML=`<li>Keine Ergebnisse für «${r}»</li>`):uh.innerHTML="<li>Bitte gib mind. 2 Buchstaben ein.</li>"}MDe.addEventListener("click",()=>{iY(rY.value)});const LDe=document.querySelectorAll("#topicslist a");LDe.forEach(r=>{r.addEventListener("click",e=>{iY(e.target.innerText),rY.value=e.target.innerText;let t=document.getElementById("tablist_panel_search");t.checked=!0,XX(document.getElementById("tablist_panel_search"))})});
|